Skip to content

Commit

Permalink
Fix typos in the code using codespell.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed Jul 31, 2023
1 parent 2ba6985 commit 86d92d2
Show file tree
Hide file tree
Showing 59 changed files with 137 additions and 135 deletions.
6 changes: 3 additions & 3 deletions libcloud/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def connect(self, host=None, port=None, base_url=None, **kwargs):
kwargs.update({"proxy_url": self.proxy_url})

connection = self.conn_class(**kwargs)
# You can uncoment this line, if you setup a reverse proxy server
# You can uncomment this line, if you setup a reverse proxy server
# which proxies to your endpoint, and lets you easily capture
# connections in cleartext when you setup the proxy to do SSL
# for you
Expand Down Expand Up @@ -714,11 +714,11 @@ def _retryable_request(

def morph_action_hook(self, action):
"""
Here we strip any duplicated leading or traling slashes to
Here we strip any duplicated leading or trailing slashes to
prevent typos and other issues where some APIs don't correctly
handle double slashes.
Keep in mind that in some situations, "/" is a vallid path name
Keep in mind that in some situations, "/" is a valid path name
so we have a module flag which disables this behavior
(https://github.com/apache/libcloud/issues/1529).
"""
Expand Down
2 changes: 1 addition & 1 deletion libcloud/common/cloudstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _sync_request(

command = command.lower()

# Work around for older verions which don't return "response" suffix
# Work around for older versions which don't return "response" suffix
# in delete ingress rule response command name
if (
command == "revokesecuritygroupingress"
Expand Down
8 changes: 4 additions & 4 deletions libcloud/common/dimensiondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from time import sleep
from base64 import b64encode

# TODO: use disutils.version when Travis CI fixed the pylint issue with version
# TODO: use distutils.version when Travis CI fixed the pylint issue with version
# from distutils.version import LooseVersion
from libcloud.utils.py3 import b, httplib, basestring
from libcloud.utils.xml import findtext
Expand Down Expand Up @@ -225,7 +225,7 @@ def dd_object_to_id(obj, obj_type, id_value="id"):
)


# TODO: use disutils.version when Travis CI fixed the pylint issue with version
# TODO: use distutils.version when Travis CI fixed the pylint issue with version
# This is a temporary workaround.
def LooseVersion(version):
return float(version)
Expand Down Expand Up @@ -1430,7 +1430,7 @@ def __init__(self, id, status, percentage=0):
"""
Initialize an instance of :class:`DimensionDataBackupClientRunningJob`
:param id: The unqiue ID of the job
:param id: The unique ID of the job
:type id: ``str``
:param status: The status of the job i.e. Waiting
Expand All @@ -1456,7 +1456,7 @@ def __init__(self, type, is_file_system, description):
"""
Initialize an instance of :class:`DimensionDataBackupClientType`
:param type: The type of client i.e. (FA.Linux, MySQL, ect.)
:param type: The type of client i.e. (FA.Linux, MySQL, etc.)
:type type: ``str``
:param is_file_system: The name of the iRule
Expand Down
2 changes: 1 addition & 1 deletion libcloud/common/gridscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def add_default_headers(self, headers):
"""
add parameters that are necessary for each request to be successful
:param headers: Authentification token
:param headers: Authentication token
:type headers: ``str``
:return: None
"""
Expand Down
10 changes: 5 additions & 5 deletions libcloud/common/nttcis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from typing import Dict
from functools import wraps

# TODO: use disutils.version when Travis CI fixed the pylint issue with version
# TODO: use distutils.version when Travis CI fixed the pylint issue with version
# from distutils.version import LooseVersion
from libcloud.utils.py3 import b, httplib, basestring
from libcloud.utils.xml import findtext
Expand Down Expand Up @@ -251,7 +251,7 @@ def dd_object_to_id(obj, obj_type, id_value="id"):
)


# TODO: use disutils.version when Travis CI fixed the pylint issue with version
# TODO: use distutils.version when Travis CI fixed the pylint issue with version
# This is a temporary workaround.
def LooseVersion(version):
return float(version)
Expand Down Expand Up @@ -803,7 +803,7 @@ def __init__(self, id, adapter_type, bus_number, state):
:param bus_number: The bus number occupied on the virtual hardware
:type bus_nubmer: ``str``
:param state: Curent state (i.e. NORMAL)
:param state: Current state (i.e. NORMAL)
:type speed: ``str``
:param state: State of the disk (i.e. PENDING)
Expand Down Expand Up @@ -1614,7 +1614,7 @@ def __init__(self, id, status, percentage=0):
"""
Initialize an instance of :class:`NttCisBackupClientRunningJob`
:param id: The unqiue ID of the job
:param id: The unique ID of the job
:type id: ``str``
:param status: The status of the job i.e. Waiting
Expand All @@ -1640,7 +1640,7 @@ def __init__(self, type, is_file_system, description):
"""
Initialize an instance of :class:`NttCisBackupClientType`
:param type: The type of client i.e. (FA.Linux, MySQL, ect.)
:param type: The type of client i.e. (FA.Linux, MySQL, etc.)
:type type: ``str``
:param is_file_system: The name of the iRule
Expand Down
2 changes: 1 addition & 1 deletion libcloud/common/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def add_default_headers(self, headers):
headers[AUTH_TOKEN_HEADER] = self.auth_token
headers["Accept"] = self.accept_format
if self._ex_force_microversion:
# If service not set in microversion, asume compute
# If service not set in microversion, assume compute
microversion = self._ex_force_microversion.strip().split()
if len(microversion) == 2:
service_type = microversion[0]
Expand Down
4 changes: 2 additions & 2 deletions libcloud/common/upcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _do_destroy_node(self, node_id):
self._sleep()
return self._do_destroy_node(node_id)
elif state == "maintenance":
# Lets wait maintenace state to go away and retry destroy
# Lets wait maintenance state to go away and retry destroy
self._sleep()
return self._do_destroy_node(node_id)
elif state is None: # Server not found any more
Expand All @@ -153,7 +153,7 @@ class UpcloudNodeOperations:
"""
Helper class to start and stop node.
:param conneciton: Connection instance
:param connection: Connection instance
:type connection: :class:`.UpcloudConnection`
"""

Expand Down
2 changes: 1 addition & 1 deletion libcloud/common/worldwidedns.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, http_code, driver=None):

class CouldntRemoveDomain(WorldWideDNSException):
def __init__(self, http_code, driver=None):
value = "Error occured removing domain from name server, try again"
value = "Error occurred removing domain from name server, try again"
super().__init__(value, http_code, 406, driver)


Expand Down
8 changes: 4 additions & 4 deletions libcloud/common/zonomi.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ def parse_body_and_errors(self):
errors.append(error_dict)

# Data handling
childrens = list(xml_body)
if len(childrens) == 3:
result_counts = childrens[1]
actions = childrens[2]
children = list(xml_body)
if len(children) == 3:
result_counts = children[1]
actions = children[2]

if actions is not None:
actions_childrens = list(actions)
Expand Down
4 changes: 2 additions & 2 deletions libcloud/compute/drivers/abiquo.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def list_sizes(self, location=None):
If you call the method :class:`AbiquoNodeDriver.create_node` with the
size informed, it will just override the 'ram' value of the 'image'
template. So it is no too much usefull work with sizes...
template. So it is no too much useful work with sizes...
:return: The list of sizes
:rtype: ``list`` of :class:`NodeSizes`
Expand Down Expand Up @@ -546,7 +546,7 @@ def reboot_node(self, node):
return res.async_success() # pylint: disable=maybe-no-member

# -------------------------
# Extenstion methods
# Extension methods
# -------------------------

def _ex_connection_class_kwargs(self):
Expand Down
2 changes: 1 addition & 1 deletion libcloud/compute/drivers/cloudscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def ex_stop_node(self, node):

def ex_node_by_uuid(self, uuid):
"""
:param str ex_user_data: A valid uuid that references your exisiting
:param str ex_user_data: A valid uuid that references your existing
cloudscale.ch server.
:type ex_user_data: ``str``
Expand Down
2 changes: 1 addition & 1 deletion libcloud/compute/drivers/cloudstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class CloudStackAddress:
:param vpc_id: VPC the ip belongs to
:type vpc_id: ``str``
:param virtualmachine_id: The ID of virutal machine this address
:param virtualmachine_id: The ID of virtual machine this address
is assigned to
:type virtualmachine_id: ``str``
"""
Expand Down
2 changes: 1 addition & 1 deletion libcloud/compute/drivers/dimensiondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2728,7 +2728,7 @@ def ex_modify_tag_key(
:param tag_key: The tag key you want to modify (required)
:type tag_key: :class:`DimensionDataTagKey` or ``str``
:param name: Set to modifiy the name of the tag key
:param name: Set to modify the name of the tag key
:type name: ``str``
:param description: Set to modify the description of the tag key
Expand Down
6 changes: 3 additions & 3 deletions libcloud/compute/drivers/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ def _wait_for_import_snapshot_completion(self, import_task_id, timeout=1800, int
:param timeout: Timeout value for snapshot generation
:type timeout: ``float``
:param interval: Time interval for repetative describe
:param interval: Time interval for repetitive describe
import snapshot tasks requests
:type interval: ``float``
Expand Down Expand Up @@ -3868,7 +3868,7 @@ def ex_list_internet_gateways(self, gateway_ids=None, filters=None):
returned.
:type gateway_ids: ``list``
:param filters: The filters so the list returned inclues
:param filters: The filters so the list returned includes
information for certain gateways only.
:type filters: ``dict``
Expand Down Expand Up @@ -5277,7 +5277,7 @@ def _get_common_security_group_params(
def _get_security_groups(self, element):
"""
Parse security groups from the provided element and return a
list of security groups with the id ane name key/value pairs.
list of security groups with the id and name key/value pairs.
:rtype: ``list`` of ``dict``
"""
Expand Down
8 changes: 4 additions & 4 deletions libcloud/compute/drivers/ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def list_nodes(self, ex_node_ids=None, ex_filters=None):
will be returned.
:type ex_node_ids: ``list`` of ``str``
:keyword ex_filters: node attribute and value pairs to filter nodes.
Only the nodes which matchs all the pairs will
Only the nodes which matches all the pairs will
be returned.
If the filter attribute need a json array value,
use ``list`` object, the driver will convert it.
Expand Down Expand Up @@ -850,7 +850,7 @@ def list_volumes(self, ex_volume_ids=None, ex_filters=None):
:type ex_volume_ids: ``list`` of ``str``
:keyword ex_filters: volume attribute and value pairs to filter
volumes. Only the volumes which matchs all will
volumes. Only the volumes which matches all will
be returned.
If the filter attribute need a json array value,
use ``list`` object, the driver will convert it.
Expand Down Expand Up @@ -889,7 +889,7 @@ def list_volume_snapshots(self, volume, ex_snapshot_ids=[], ex_filters=None):
:type ex_snapshot_ids: ``list`` of ``str``
:keyword ex_filters: snapshot attribute and value pairs to filter
snapshots. Only the snapshot which matchs all
snapshots. Only the snapshot which matches all
the pairs will be returned.
If the filter attribute need a json array value,
use ``list`` object, the driver will convert it.
Expand Down Expand Up @@ -1086,7 +1086,7 @@ def list_images(self, location=None, ex_image_ids=None, ex_filters=None):
:type ex_image_ids: ``list`` of ``str``
:keyword ex_filters: image attribute and value pairs to filter
images. Only the image which matchs all
images. Only the image which matches all
the pairs will be returned.
If the filter attribute need a json array value,
use ``list`` object, the driver will convert it.
Expand Down
4 changes: 2 additions & 2 deletions libcloud/compute/drivers/gce.py
Original file line number Diff line number Diff line change
Expand Up @@ -4812,7 +4812,7 @@ def _create_instance_properties(
:keyword accelerator_count: Support for passing in the number of
requested 'accelerator_type' accelerators
attached to the VM. Will only pay atention
attached to the VM. Will only pay attention
to this field if 'accelerator_type' is not
None.
:type accelerator_count: ``int`` or ``None``
Expand Down Expand Up @@ -10110,7 +10110,7 @@ def _set_project_metadata(self, metadata=None, force=False, current_keys=""):
:rtype: ``dict``
"""
if metadata is None:
# User wants to delete metdata, but if 'force' is False
# User wants to delete metadata, but if 'force' is False
# and we already have sshKeys, we should retain them.
# Otherwise, delete ALL THE THINGS!
if not force and current_keys:
Expand Down
6 changes: 3 additions & 3 deletions libcloud/compute/drivers/gig_g8.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def create_node(
:param network: G8 Network to place vm in
:type size: :class:`G8Network`
:param ex_description: Descripton of vm
:param ex_description: Description of vm
:type size: : ``str``
:param auth: an SSH key
Expand Down Expand Up @@ -321,7 +321,7 @@ def ex_create_network(self, name, private_network="192.168.103.0/24", type="vgw"
"""
Create network also known as cloudspace
:param name: the name to assing to the network
:param name: the name to assign to the network
:type name: ``str``
:param private_network: subnet used as private network
Expand Down Expand Up @@ -507,7 +507,7 @@ def create_volume(self, size, name, ex_description, ex_disk_type="D"):
:param name: Name of the volume
:type name: ``str``
:param description: Descripton of the volume
:param description: Description of the volume
:type description: ``str``
:param disk_type: Type of the disk depending on the G8
Expand Down
4 changes: 2 additions & 2 deletions libcloud/compute/drivers/gridscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def destroy_node(self, node, ex_destroy_associated_resources=False):
# 1. Delete the server itself
result = self._sync_request(endpoint="objects/servers/{}".format(node.id), method="DELETE")

# 2. Destroy associated resouces (if requested)
# 2. Destroy associated resources (if requested)
if ex_destroy_associated_resources:
for volume in associated_volumes:
self.destroy_volume(volume=volume)
Expand Down Expand Up @@ -752,7 +752,7 @@ def ex_link_network_to_node(self, node, network):
:param network: Network you want to link.
:type network: :class:`.GridscaleNetwork`
:return: ``True`` if linked sucessfully, otherwise ``False``
:return: ``True`` if linked successfully, otherwise ``False``
:rtype: ``bool``
"""
result = self._sync_request(
Expand Down
2 changes: 1 addition & 1 deletion libcloud/compute/drivers/kamatera.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def list_images(self, location):
"""
List available disk images.
:param location: Location of the deployement.
:param location: Location of the deployment.
Available disk images depend on location.
:type location: :class:`.NodeLocation`
Expand Down
10 changes: 5 additions & 5 deletions libcloud/compute/drivers/kubevirt.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def create_node(
:param ex_memory: The RAM in MB to be allocated to the VM
:type ex_memory: ``int``
:param ex_cpu: The ammount of cpu to be allocated in miliCPUs
:param ex_cpu: The amount of cpu to be allocated in miliCPUs
ie: 400 will mean 0.4 of a core, 1000 will mean 1 core
and 3000 will mean 3 cores.
:type ex_cpu: ``int``
Expand Down Expand Up @@ -262,9 +262,9 @@ def create_node(
:param ex_network: Only the pod type is supported, and in the
configuration masquerade or bridge are the
accepted values.
The parameter must be a tupple or list with
The parameter must be a tuple or list with
(network_type, interface, name)
:type ex_network: `iterable` (tupple or list) [network_type, inteface, name]
:type ex_network: `iterable` (tuple or list) [network_type, interface, name]
network_type: `str` | only "pod" is accepted atm
interface: `str` | "masquerade" or "bridge"
name: `str`
Expand Down Expand Up @@ -574,7 +574,7 @@ def create_volume(
msg = (
"An ex_volume_type must be provided from the list "
"of supported clouds, as well as the ex_volume_params "
"necessesary for your volume type choice."
"necessary for your volume type choice."
)
raise ValueError(msg)

Expand Down Expand Up @@ -627,7 +627,7 @@ def _create_volume_dynamic(
:param name: The name of the pvc an arbitrary string of lower letters
:type name: `str`
:param size: An int of the ammount of gigabytes desired
:param size: An int of the amount of gigabytes desired
:type size: `int`
:param namespace: The namespace where the claim will live
Expand Down
Loading

0 comments on commit 86d92d2

Please sign in to comment.