diff --git a/libcloud/common/base.py b/libcloud/common/base.py index 8ba142258b..c4cca60471 100644 --- a/libcloud/common/base.py +++ b/libcloud/common/base.py @@ -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 @@ -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). """ diff --git a/libcloud/common/cloudstack.py b/libcloud/common/cloudstack.py index 2c745c29f6..b2ecb5967d 100644 --- a/libcloud/common/cloudstack.py +++ b/libcloud/common/cloudstack.py @@ -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" diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py index ee21de042e..3cef9218fb 100644 --- a/libcloud/common/dimensiondata.py +++ b/libcloud/common/dimensiondata.py @@ -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 @@ -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) @@ -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 @@ -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 diff --git a/libcloud/common/gridscale.py b/libcloud/common/gridscale.py index 1c808f5cf8..7f8bf360cb 100644 --- a/libcloud/common/gridscale.py +++ b/libcloud/common/gridscale.py @@ -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 """ diff --git a/libcloud/common/nttcis.py b/libcloud/common/nttcis.py index 5d36dfad60..44ef90342d 100644 --- a/libcloud/common/nttcis.py +++ b/libcloud/common/nttcis.py @@ -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 @@ -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) @@ -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) @@ -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 @@ -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 diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py index 960b759af6..8f0702de3e 100644 --- a/libcloud/common/openstack.py +++ b/libcloud/common/openstack.py @@ -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] diff --git a/libcloud/common/upcloud.py b/libcloud/common/upcloud.py index 18145ac3ae..5affb939a0 100644 --- a/libcloud/common/upcloud.py +++ b/libcloud/common/upcloud.py @@ -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 @@ -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` """ diff --git a/libcloud/common/worldwidedns.py b/libcloud/common/worldwidedns.py index 2d71a716a3..cd64b65951 100644 --- a/libcloud/common/worldwidedns.py +++ b/libcloud/common/worldwidedns.py @@ -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) diff --git a/libcloud/common/zonomi.py b/libcloud/common/zonomi.py index 6996eb8582..78afab7030 100644 --- a/libcloud/common/zonomi.py +++ b/libcloud/common/zonomi.py @@ -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) diff --git a/libcloud/compute/drivers/abiquo.py b/libcloud/compute/drivers/abiquo.py index 6aa17a3f97..24c3ffcdc3 100644 --- a/libcloud/compute/drivers/abiquo.py +++ b/libcloud/compute/drivers/abiquo.py @@ -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` @@ -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): diff --git a/libcloud/compute/drivers/cloudscale.py b/libcloud/compute/drivers/cloudscale.py index 69084d75ba..7698bd65d2 100644 --- a/libcloud/compute/drivers/cloudscale.py +++ b/libcloud/compute/drivers/cloudscale.py @@ -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`` diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py index b92895df74..69605c2f1e 100644 --- a/libcloud/compute/drivers/cloudstack.py +++ b/libcloud/compute/drivers/cloudstack.py @@ -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`` """ diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py index 1d0148a890..b06d59f85d 100644 --- a/libcloud/compute/drivers/dimensiondata.py +++ b/libcloud/compute/drivers/dimensiondata.py @@ -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 diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py index 506e6f6cb4..51370d7d13 100644 --- a/libcloud/compute/drivers/ec2.py +++ b/libcloud/compute/drivers/ec2.py @@ -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`` @@ -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`` @@ -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`` """ diff --git a/libcloud/compute/drivers/ecs.py b/libcloud/compute/drivers/ecs.py index daef3c8a93..250968aacb 100644 --- a/libcloud/compute/drivers/ecs.py +++ b/libcloud/compute/drivers/ecs.py @@ -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. @@ -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. @@ -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. @@ -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. diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py index 49b50c207d..108e0e854e 100644 --- a/libcloud/compute/drivers/gce.py +++ b/libcloud/compute/drivers/gce.py @@ -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`` @@ -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: diff --git a/libcloud/compute/drivers/gig_g8.py b/libcloud/compute/drivers/gig_g8.py index 4c4a0b7734..f7de985a14 100644 --- a/libcloud/compute/drivers/gig_g8.py +++ b/libcloud/compute/drivers/gig_g8.py @@ -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 @@ -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 @@ -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 diff --git a/libcloud/compute/drivers/gridscale.py b/libcloud/compute/drivers/gridscale.py index c68c482f6a..64d5f93e0e 100644 --- a/libcloud/compute/drivers/gridscale.py +++ b/libcloud/compute/drivers/gridscale.py @@ -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) @@ -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( diff --git a/libcloud/compute/drivers/kamatera.py b/libcloud/compute/drivers/kamatera.py index d8604d783e..f959e451bc 100644 --- a/libcloud/compute/drivers/kamatera.py +++ b/libcloud/compute/drivers/kamatera.py @@ -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` diff --git a/libcloud/compute/drivers/kubevirt.py b/libcloud/compute/drivers/kubevirt.py index a76293d9d7..dd475a62a9 100644 --- a/libcloud/compute/drivers/kubevirt.py +++ b/libcloud/compute/drivers/kubevirt.py @@ -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`` @@ -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` @@ -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) @@ -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 diff --git a/libcloud/compute/drivers/libvirt_driver.py b/libcloud/compute/drivers/libvirt_driver.py index 1fd4f7f4f0..91b56eee6e 100644 --- a/libcloud/compute/drivers/libvirt_driver.py +++ b/libcloud/compute/drivers/libvirt_driver.py @@ -422,7 +422,7 @@ def _parse_ip_table_arp(self, arp_output): Sets up the regexp for parsing out IP addresses from the 'arp -an' command and pass it along to the parser function. - :return: Dictionary from the parsing funtion + :return: Dictionary from the parsing function :rtype: ``dict`` """ arp_regex = re.compile(r".*?\((.*?)\) at (.*?)\s+") diff --git a/libcloud/compute/drivers/linode.py b/libcloud/compute/drivers/linode.py index 50f2fefdde..bd213935d0 100644 --- a/libcloud/compute/drivers/linode.py +++ b/libcloud/compute/drivers/linode.py @@ -618,7 +618,7 @@ def linode_set_datacenter(self, dc): def destroy_volume(self, volume): """ Destroys disk volume for the Linode. Linode id is to be provided as - extra["LinodeId"] whithin :class:`StorageVolume`. It can be retrieved + extra["LinodeId"] within :class:`StorageVolume`. It can be retrieved by :meth:`libcloud.compute.drivers.linode.LinodeNodeDriver\ .ex_list_volumes`. @@ -730,7 +730,7 @@ def ex_list_volumes(self, node, disk_id=None): def _to_volumes(self, objs): """ - Covert returned JSON volumes into StorageVolume instances + Convert returned JSON volumes into StorageVolume instances :keyword objs: ``list`` of JSON dictionaries representing the StorageVolumes @@ -1252,7 +1252,7 @@ def attach_volume(self, node, volume, persist_across_boots=True): :param volume: Volume to be attached (required) :type volume: :class:`StorageVolume` - :keyword persist_across_boots: Wether volume should be \ + :keyword persist_across_boots: Whether volume should be \ attached to node across boots :type persist_across_boots: `bool` diff --git a/libcloud/compute/drivers/nttcis.py b/libcloud/compute/drivers/nttcis.py index a0d82868b8..0c980cb82b 100644 --- a/libcloud/compute/drivers/nttcis.py +++ b/libcloud/compute/drivers/nttcis.py @@ -795,7 +795,7 @@ def list_nodes( node_list = [] # This is a generator so we changed from the original # and if nodes is not empty, ie, the stop iteration confdition - # Then set node_list to nodes and retrn. + # Then set node_list to nodes and return. for nodes in self.ex_list_nodes_paginated( location=ex_location, name=ex_name, @@ -1378,7 +1378,7 @@ def ex_initiate_manual_snapshot(self, name=None, server_id=None): :param name: optional name of server :type name: ``str`` - :param server_id: optinal parameter to use instead of name + :param server_id: optional parameter to use instead of name :type `server_id`str`` :return: True of False @@ -3261,7 +3261,7 @@ def ex_modify_tag_key( :param tag_key: The tag key you want to modify (required) :type tag_key: :class:`NttCisTagKey` 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 @@ -4615,7 +4615,7 @@ def ex_list_consistency_groups(self, params={}): def ex_get_consistency_group(self, consistency_group_id): """ - Retrieves a Consistency by it's id and is more efficient thatn listing + Retrieves a Consistency by it's id and is more efficient than listing all consistency groups and filtering that result. :param consistency_group_id: An id of a consistency group diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py index 1ba24fa1b7..5d286e4439 100644 --- a/libcloud/compute/drivers/openstack.py +++ b/libcloud/compute/drivers/openstack.py @@ -2862,7 +2862,7 @@ class OpenStack_2_NodeDriver(OpenStack_1_1_NodeDriver): network_connectionCls = OpenStack_2_NetworkConnection network_connection = None - # Similarly all image operations are noe exposed through the block-storage + # Similarly all image operations are not exposed through the block-storage # API of the cinder service: # https://developer.openstack.org/api-ref/block-storage/ volumev2_connectionCls = OpenStack_2_VolumeV2Connection @@ -4735,7 +4735,7 @@ def __repr__(self): class OpenStack_2_QuotaSet: """ - Quota Set info. To get the informatio about quotas and used resources. + Quota Set info. To get the information about quotas and used resources. See: https://docs.openstack.org/api-ref/compute/?expanded=show-the-detail-of-quota-detail#show-a-quota diff --git a/libcloud/compute/drivers/outscale.py b/libcloud/compute/drivers/outscale.py index ea8eb76ba7..b0ae07cb99 100644 --- a/libcloud/compute/drivers/outscale.py +++ b/libcloud/compute/drivers/outscale.py @@ -705,7 +705,7 @@ def ex_list_nodes_states( permissions to perform the action. :type dry_run: ``bool`` - :return: list the status of one ore more vms + :return: list the status of one or more vms :rtype: ``list`` of ``dict`` """ action = "ReadVmsState" @@ -2571,7 +2571,7 @@ def ex_list_client_gateways( client gateways. :type tag_values: ``list`` of ``str`` - :param tags: TThe key/value combination of the tags + :param tags: the key/value combination of the tags associated with the client gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. :type tags: ``list`` of ``str`` @@ -2980,7 +2980,7 @@ def ex_delete_direct_link_interface( """ Deletes a specified DirectLink interface. - :param direct_link_interface_id: TThe ID of the DirectLink + :param direct_link_interface_id: the ID of the DirectLink interface you want to delete. (required) :type direct_link_interface_id: ``str`` @@ -4495,7 +4495,7 @@ def ex_delete_nat_service( service, but does not release this EIP from your account. However, it does not delete any NAT service routes in your route tables. - :param nat_service_id: TThe ID of the NAT service you want to + :param nat_service_id: the ID of the NAT service you want to delete. (required) :type nat_service_id: ``str`` @@ -5164,7 +5164,7 @@ def ex_list_net_peerings( peering connections. :type tag_keys: ``list`` of ``str`` - :param tag_values: TThe values of the tags associated with the + :param tag_values: the values of the tags associated with the Net peering connections. :type tag_values: ``list`` of ``str`` @@ -6360,7 +6360,7 @@ def ex_delete_security_group( to delete. :type security_group_id: ``str`` - :param security_group_name: TThe name of the security group. + :param security_group_name: the name of the security group. :type security_group_name: ``str`` :param dry_run: If true, checks whether you have the required @@ -6410,7 +6410,7 @@ def ex_list_security_groups( :param security_group_names: The names of the security groups. :type security_group_names: ``list`` of ``str`` - :param tag_keys: TThe keys of the tags associated with the + :param tag_keys: the keys of the tags associated with the security groups. :type tag_keys: ``list`` of ``str`` @@ -6418,7 +6418,7 @@ def ex_list_security_groups( security groups. :type tag_values: ``list`` of ``str`` - :param tags: TThe key/value combination of the tags associated + :param tags: the key/value combination of the tags associated with the security groups, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. :type tags: ``list`` of ``str`` @@ -6518,7 +6518,7 @@ def ex_create_security_group_rule( of the source security group. :type sg_name_to_link: ``str`` - :param to_port_range: TThe end of the port range for the TCP and + :param to_port_range: the end of the port range for the TCP and UDP protocols, or an ICMP type number. :type to_port_range: ``int`` @@ -6611,7 +6611,7 @@ def ex_delete_security_group_rule( of the source security group. :type sg_name_to_unlink: ``str`` - :param to_port_range: TThe end of the port range for the TCP and + :param to_port_range: the end of the port range for the TCP and UDP protocols, or an ICMP type number. :type to_port_range: ``int`` @@ -6934,7 +6934,7 @@ def ex_update_subnet( :param map_public_ip_on_launch: If true, a public IP address is assigned to the network interface cards (NICs) created in the s - pecified Subnet. (required) + specified Subnet. (required) :type map_public_ip_on_launch: ``bool`` :param dry_run: If true, checks whether you have the required @@ -6994,7 +6994,7 @@ def ex_list_subnets( Subnets are located. :type subregion_names: ``str`` - :param tag_keys: TThe keys of the tags associated with the + :param tag_keys: the keys of the tags associated with the subnets. :type tag_keys: ``list`` of ``str`` @@ -7002,7 +7002,7 @@ def ex_list_subnets( subnets. :type tag_values: ``list`` of ``str`` - :param tags: TThe key/value combination of the tags associated + :param tags: the key/value combination of the tags associated with the subnets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. :type tags: ``list`` of ``str`` @@ -7065,7 +7065,7 @@ def ex_create_subnet( Subnet. (required) :type net_id: ``str`` - :param subregion_name: TThe name of the Subregion in which you + :param subregion_name: the name of the Subregion in which you want to create the Subnet. :type subregion_name: ``str`` @@ -7224,7 +7224,7 @@ def ex_delete_vpn_connection( deleting the VPN connection. This enables you to delete the Net without waiting for the VPN connection to be deleted. - :param vpn_connection_id: TThe ID of the VPN connection you want + :param vpn_connection_id: the ID of the VPN connection you want to delete. (required) :type vpn_connection_id: ``str`` @@ -7258,7 +7258,7 @@ def ex_delete_vpn_connection_route( deleting the VPN connection. This enables you to delete the Net without waiting for the VPN connection to be deleted. - :param vpn_connection_id: TThe ID of the VPN connection you want + :param vpn_connection_id: the ID of the VPN connection you want to delete. (required) :type vpn_connection_id: ``str`` @@ -7328,7 +7328,7 @@ def ex_list_vpn_connections( https://docs.outscale.com/api#deletevpnconnectionroute :type static_routes_only: ``bool`` - :param tag_keys: TThe keys of the tags associated with the + :param tag_keys: the keys of the tags associated with the subnets. :type tag_keys: ``list`` of ``str`` @@ -7336,7 +7336,7 @@ def ex_list_vpn_connections( subnets. :type tag_values: ``list`` of ``str`` - :param tags: TThe key/value combination of the tags associated + :param tags: the key/value combination of the tags associated with the subnets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. :type tags: ``list`` of ``str`` @@ -7560,7 +7560,7 @@ def ex_delete_api_access_rule( permissions to perform the action. :type dry_run: ``bool`` - :return: true if successfull. + :return: true if successful. :rtype: ``bool`` if successful or ``dict`` """ action = "DeleteApiAccessRule" @@ -7605,7 +7605,7 @@ def ex_read_api_access_rules( :type dry_run: ``bool`` :return: a List of API access rules. - :rtype: ``List`` of ``dict`` if successfull or ``dict`` + :rtype: ``List`` of ``dict`` if successful or ``dict`` """ action = "ReadApiAccessRules" @@ -7666,7 +7666,7 @@ def ex_update_api_access_rule( :type dry_run: ``bool`` :return: a List of API access rules. - :rtype: ``List`` of ``dict`` if successfull or ``dict`` + :rtype: ``List`` of ``dict`` if successful or ``dict`` """ action = "UpdateApiAccessRule" diff --git a/libcloud/compute/drivers/ovh.py b/libcloud/compute/drivers/ovh.py index 072c4de2dd..ed0193c283 100644 --- a/libcloud/compute/drivers/ovh.py +++ b/libcloud/compute/drivers/ovh.py @@ -184,7 +184,7 @@ def list_images(self, location=None, ex_size=None): :keyword location: Location (region) used as filter :type location: :class:`NodeLocation` - :keyword ex_size: Exclude images which are uncompatible with given size + :keyword ex_size: Exclude images which are incompatible with given size :type ex_size: :class:`NodeImage` :return: List of images @@ -300,7 +300,7 @@ def create_volume( :keyword ex_volume_type: ``'classic'`` or ``'high-speed'`` :type ex_volume_type: ``str`` - :keyword ex_description: Optionnal description of volume + :keyword ex_description: Optional description of volume :type ex_description: str :return: Storage Volume object @@ -364,7 +364,7 @@ def attach_volume(self, node, volume, device=None): :param volume: The ID of the volume :type volume: :class:`StorageVolume` - :param device: Unsed parameter + :param device: Unused parameter :return: True or False representing operation successful :rtype: ``bool`` @@ -381,7 +381,7 @@ def detach_volume(self, volume, ex_node=None): :param volume: The ID of the volume :type volume: :class:`StorageVolume` - :param ex_node: Node to detach from (optionnal if volume is attached + :param ex_node: Node to detach from (optional if volume is attached to only one node) :type ex_node: :class:`Node` diff --git a/libcloud/compute/drivers/rimuhosting.py b/libcloud/compute/drivers/rimuhosting.py index f390856b78..78bef8ab8b 100644 --- a/libcloud/compute/drivers/rimuhosting.py +++ b/libcloud/compute/drivers/rimuhosting.py @@ -140,7 +140,7 @@ def __init__(self, key, host=API_HOST, port=443, api_context=API_CONTEXT, secure self.connection.connect() def _order_uri(self, node, resource): - # Returns the order uri with its resourse appended. + # Returns the order uri with its resource appended. return "/orders/{}/{}".format(node.id, resource) # TODO: Get the node state. diff --git a/libcloud/compute/drivers/upcloud.py b/libcloud/compute/drivers/upcloud.py index 03f3f1bace..8b90ebeb29 100644 --- a/libcloud/compute/drivers/upcloud.py +++ b/libcloud/compute/drivers/upcloud.py @@ -110,7 +110,7 @@ def list_sizes(self, location=None): """ List available plans - :param location: Location of the deployement. Price depends on + :param location: Location of the deployment. Price depends on location. lf location is not given or price not found for location, price will be None (optional) :type location: :class:`.NodeLocation` @@ -192,7 +192,7 @@ def create_node( ) response = self.connection.request("1.2/server", method="POST", data=body.to_json()) server = response.object["server"] - # Upcloud server's are in maintenace state when goind + # Upcloud server's are in maintenance state when going # from state to other, it is safe to assume STARTING state return self._to_node(server, state=NodeState.STARTING) diff --git a/libcloud/compute/drivers/vcl.py b/libcloud/compute/drivers/vcl.py index a2b5140319..299cf5ffd0 100644 --- a/libcloud/compute/drivers/vcl.py +++ b/libcloud/compute/drivers/vcl.py @@ -115,7 +115,7 @@ def create_node(self, image, start=None, length="60"): :type length: ``str`` """ - # Special case for xmlrpclib not handling 64 bit integers when writting + # Special case for xmlrpclib not handling 64 bit integers when writing # XML - we always cast value to string. start = start or str(time.time()) length = length or "60" diff --git a/libcloud/compute/drivers/vsphere.py b/libcloud/compute/drivers/vsphere.py index 3c4e45738d..98e6659479 100644 --- a/libcloud/compute/drivers/vsphere.py +++ b/libcloud/compute/drivers/vsphere.py @@ -1623,7 +1623,9 @@ def ex_list_content_library_items(self, library_id): return result["value"] except BaseHTTPError: logger.error( - "Library was cannot be accesed, " " most probably the VCenter service " "is stopped" + "Library was cannot be accessed, " + " most probably the VCenter service " + "is stopped" ) return [] @@ -1662,7 +1664,7 @@ def ex_list_datastores( def ex_update_memory(self, node, ram): """ - :param ram: The ammount of ram in MB. + :param ram: The amount of ram in MB. :type ram: `str` or `int` """ if isinstance(node, str): @@ -1698,7 +1700,7 @@ def ex_update_capacity(self, node, capacity): def ex_add_nic(self, node, network): """ - Creates a network adapater that will connect to the specified network + Creates a network adapter that will connect to the specified network for the given node. Returns a boolean indicating success or not. """ if isinstance(node, str): diff --git a/libcloud/compute/drivers/vultr.py b/libcloud/compute/drivers/vultr.py index 9c5265651b..f07f0d2d02 100644 --- a/libcloud/compute/drivers/vultr.py +++ b/libcloud/compute/drivers/vultr.py @@ -1179,7 +1179,7 @@ def create_node( Mutually exclusive with image, :type ex_snapshot: :class: `VultrNodeSnapshot` or ``str`` - :keyword ex_enable_ipv6: Wheteher to enable IPv6. + :keyword ex_enable_ipv6: Whether to enable IPv6. :type ex_enable_ipv6: ``bool`` :keyword ex_backups: Enable automatic backups for the node. (VPS only) diff --git a/libcloud/container/drivers/docker.py b/libcloud/container/drivers/docker.py index 4f64176363..f8f3d612c0 100644 --- a/libcloud/container/drivers/docker.py +++ b/libcloud/container/drivers/docker.py @@ -798,7 +798,7 @@ def _get_api_version(self): def ts_to_str(timestamp): """ - Return a timestamp as a nicely formated datetime string. + Return a timestamp as a nicely formatted datetime string. """ date = datetime.datetime.fromtimestamp(timestamp) date_string = date.strftime("%d/%m/%Y %H:%M %Z") diff --git a/libcloud/container/drivers/kubernetes.py b/libcloud/container/drivers/kubernetes.py index cbfb1f90be..498a9439d7 100644 --- a/libcloud/container/drivers/kubernetes.py +++ b/libcloud/container/drivers/kubernetes.py @@ -651,7 +651,7 @@ def _to_namespace(self, data): def ts_to_str(timestamp): """ - Return a timestamp as a nicely formated datetime string. + Return a timestamp as a nicely formatted datetime string. """ date = datetime.datetime.fromtimestamp(timestamp) date_string = date.strftime("%d/%m/%Y %H:%M %Z") diff --git a/libcloud/container/drivers/lxd.py b/libcloud/container/drivers/lxd.py index 46e3c3353e..c05a6c2ac9 100644 --- a/libcloud/container/drivers/lxd.py +++ b/libcloud/container/drivers/lxd.py @@ -532,7 +532,7 @@ def deploy_container( :param parameters: Container Image parameters. This parameter should represent the - the ``source`` dictioanry expected by the LXD API call. For more + the ``source`` dictionary expected by the LXD API call. For more information how this parameter should be structured see https://github.com/lxc/lxd/blob/master/doc/rest-api.md :type parameters: ``str`` diff --git a/libcloud/dns/drivers/durabledns.py b/libcloud/dns/drivers/durabledns.py index 0c20bc9b51..23dfd7563c 100644 --- a/libcloud/dns/drivers/durabledns.py +++ b/libcloud/dns/drivers/durabledns.py @@ -112,7 +112,7 @@ def list_zones(self): response = self.connection.request( action=action, params=params, data=req_data, method="POST", headers=headers ) - # listZones method doens't return full data in zones as getZone + # listZones method doesn't return full data in zones as getZone # method does. zones = [] for data in response.objects: @@ -157,7 +157,7 @@ def list_records(self, zone): raise ZoneDoesNotExistError(zone_id=zone.id, driver=self, value=e.message) raise e - # listRecords method doens't return full data in records as getRecord + # listRecords method doesn't return full data in records as getRecord # method does. records = [] for data in response.objects: diff --git a/libcloud/dns/drivers/gandi_live.py b/libcloud/dns/drivers/gandi_live.py index f068e5dadf..09df141a5d 100644 --- a/libcloud/dns/drivers/gandi_live.py +++ b/libcloud/dns/drivers/gandi_live.py @@ -61,8 +61,8 @@ class GandiLiveDNSDriver(BaseGandiLiveDriver, DNSDriver): Please note that the Libcloud paradigm of one zone per domain does not match exactly with Gandi LiveDNS. For Gandi, a "zone" can apply to multiple domains. This driver behaves as if the domain is a zone, but be - warned that modifying a domain means modifying the zone. Iif you have a - zone associated with mutiple domains, all of those domains will be + warned that modifying a domain means modifying the zone. If you have a + zone associated with multiple domains, all of those domains will be modified as well. """ @@ -324,7 +324,7 @@ def ex_delete_gandi_zone(self, zone_uuid): return True """ - Change the Gandi zone a domain is asociated with. + Change the Gandi zone a domain is associated with. :param domain: Domain name to switch zones. :type domain: ``str`` diff --git a/libcloud/dns/drivers/worldwidedns.py b/libcloud/dns/drivers/worldwidedns.py index aca9641e1f..5b8c72a11c 100644 --- a/libcloud/dns/drivers/worldwidedns.py +++ b/libcloud/dns/drivers/worldwidedns.py @@ -292,7 +292,7 @@ def create_zone(self, domain, type="master", ttl=None, extra=None): :param extra: Extra attributes (driver specific). (optional). Possible parameter in here should be *DYN* which values should be - 1 for standart and 2 for dynamic. Default is 1. + 1 for standard and 2 for dynamic. Default is 1. :type extra: ``dict`` :rtype: :class:`Zone` diff --git a/libcloud/loadbalancer/drivers/alb.py b/libcloud/loadbalancer/drivers/alb.py index 8ab3ea46eb..747ae8e590 100644 --- a/libcloud/loadbalancer/drivers/alb.py +++ b/libcloud/loadbalancer/drivers/alb.py @@ -301,7 +301,7 @@ def create_balancer( :type algorithm: :class:`Algorithm` or ``None`` :param members: List of Members to attach to the balancer. If 'port' - attribute is set for the memeber - load balancer will + attribute is set for the member - load balancer will send traffic there. Otherwise - load balancer port is used on the memeber's side. 'ip' attribute is ignored. :type members: ``list`` of :class:`Member` @@ -557,7 +557,7 @@ def ex_register_targets(self, target_group, members=None): :type target_group: ``dict`` :param members: List of Members to attach to the balancer. If 'port' - attribute is set for the memeber - load balancer will + attribute is set for the member - load balancer will send traffic there. Otherwise - load balancer port is used on the memeber's side. 'ip' attribute is ignored. :type members: ``list`` of :class:`Member` @@ -1016,7 +1016,7 @@ def _ex_connection_class_kwargs(self): # # def balancer_list_members(self, balancer): # """ -# List memebers of load balancer +# List members of load balancer # # :param balancer: LoadBalancer to list members for # :type balancer: :class:`LoadBalancer` @@ -1029,7 +1029,7 @@ def _ex_connection_class_kwargs(self): # """ # Fetch members across all listeners/rules/target groups # -# :param balancer: load balancer to fetch memebers for +# :param balancer: load balancer to fetch members for # :type balancer: :class:`LoadBalancer` # # :return: list of load balancer members across all target groups @@ -1038,7 +1038,7 @@ def _ex_connection_class_kwargs(self): # balancer_members = [] # for listener in balancer.extra.get('listeners', []): # for rule in listener.rules: -# for tg_member in rule.target_group.memebers: +# for tg_member in rule.target_group.members: # tg_member.balancer = balancer # tg_member.extra['target_group'] = rule.target_group # balancer_members.append(tg_member) diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py b/libcloud/loadbalancer/drivers/dimensiondata.py index 11644d44ab..5f250ae068 100644 --- a/libcloud/loadbalancer/drivers/dimensiondata.py +++ b/libcloud/loadbalancer/drivers/dimensiondata.py @@ -624,7 +624,7 @@ def ex_create_virtual_listener( :param protocol: For STANDARD type, ANY, TCP or UDP for PERFORMANCE_LAYER_4 choice of ANY, TCP, UDP, HTTP - :type protcol: ``str`` + :type protocol: ``str`` :param connection_limit: Maximum number of concurrent connections per sec diff --git a/libcloud/loadbalancer/drivers/nttcis.py b/libcloud/loadbalancer/drivers/nttcis.py index ecd1499f4c..122726467d 100644 --- a/libcloud/loadbalancer/drivers/nttcis.py +++ b/libcloud/loadbalancer/drivers/nttcis.py @@ -150,7 +150,7 @@ def create_balancer( an optimization type of TCP, LAN_OPT, WAN_OPT, MOBILE_OPT, or TCP_LEGACY is required. Default is TCP - :type protcol: ``str`` + :type protocol: ``str`` :param ex_listener_ip_address: Must be a valid IPv4 in dot-decimal notation (x.x.x.x). @@ -681,14 +681,14 @@ def ex_create_virtual_listener( :param protocol: For STANDARD type, ANY, TCP or UDP for PERFORMANCE_LAYER_4 choice of ANY, TCP, UDP, HTTP - :type protcol: ``str`` + :type protocol: ``str`` :param optimization_profile: For STANDARD type and protocol TCP an optimization type of TCP, LAN_OPT, WAN_OPT, MOBILE_OPT, or TCP_LEGACY is required. Default is 'TCP'. - :type protcol: ``str`` + :type protocol: ``str`` :param connection_limit: Maximum number of concurrent connections per sec diff --git a/libcloud/loadbalancer/drivers/slb.py b/libcloud/loadbalancer/drivers/slb.py index 56bb03a088..32b1cec471 100644 --- a/libcloud/loadbalancer/drivers/slb.py +++ b/libcloud/loadbalancer/drivers/slb.py @@ -437,7 +437,7 @@ def create_balancer( # NOTE(samsong8610): Use http listener as default protocol = "http" if protocol not in PROTOCOL_TO_LISTENER_MAP: - raise AttributeError("unsupport protocol %s" % protocol) + raise AttributeError("unsupported protocol %s" % protocol) # Bandwidth in range [1, 1000] Mbps bandwidth = -1 diff --git a/libcloud/pricing.py b/libcloud/pricing.py index 496eccb079..869da614b8 100644 --- a/libcloud/pricing.py +++ b/libcloud/pricing.py @@ -83,7 +83,7 @@ def get_pricing(driver_type, driver_name, pricing_file_path=None, cache_all=Fals We intentionally only cache data for the requested driver and not all the pricing data since the whole pricing data is quite large (~2 MB). This - way we avoid unncessary memory overhead. + way we avoid unnecessary memory overhead. :type driver_type: ``str`` :param driver_type: Driver type ('compute' or 'storage') diff --git a/libcloud/storage/base.py b/libcloud/storage/base.py index 783544797d..42b80f6fcf 100644 --- a/libcloud/storage/base.py +++ b/libcloud/storage/base.py @@ -872,7 +872,7 @@ def _hash_buffered_stream(self, stream, hasher, blocksize=65536): total_len = 0 if hasattr(stream, "__next__") or hasattr(stream, "next"): - # Ensure we start from the begining of a stream in case stream is + # Ensure we start from the beginning of a stream in case stream is # not at the beginning if hasattr(stream, "seek"): try: diff --git a/libcloud/storage/drivers/azure_blobs.py b/libcloud/storage/drivers/azure_blobs.py index 1fafbe9efd..d7e14f1db2 100644 --- a/libcloud/storage/drivers/azure_blobs.py +++ b/libcloud/storage/drivers/azure_blobs.py @@ -855,7 +855,7 @@ def _upload_in_chunks( headers, ): """ - Uploads data from an interator in fixed sized chunks to Azure Storage + Uploads data from an iterator in fixed sized chunks to Azure Storage """ data_hash = None diff --git a/libcloud/storage/drivers/backblaze_b2.py b/libcloud/storage/drivers/backblaze_b2.py index 3ea831101c..299623ae34 100644 --- a/libcloud/storage/drivers/backblaze_b2.py +++ b/libcloud/storage/drivers/backblaze_b2.py @@ -131,7 +131,7 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Stores info retrieved after authentication (auth token, api url, - # dowload url). + # download url). self._auth_conn = self.authCls(*args, **kwargs) def download_request(self, action, params=None): diff --git a/libcloud/storage/drivers/google_storage.py b/libcloud/storage/drivers/google_storage.py index 3631768202..f08409a224 100644 --- a/libcloud/storage/drivers/google_storage.py +++ b/libcloud/storage/drivers/google_storage.py @@ -221,7 +221,7 @@ def _get_container_permissions(self, container_name): """ # Try OWNER permissions first: try listing the bucket ACL. # FORBIDDEN -> exists, but not an OWNER. - # NOT_FOUND -> bucket DNE, return NONE. + # NOT_FOUND -> bucket DONE, return NONE. try: self.json_connection.request("/storage/v1/b/%s/acl" % container_name) return ContainerPermissions.OWNER diff --git a/libcloud/storage/drivers/oss.py b/libcloud/storage/drivers/oss.py index b43cdaa67a..3d1ef34717 100644 --- a/libcloud/storage/drivers/oss.py +++ b/libcloud/storage/drivers/oss.py @@ -511,7 +511,7 @@ def ex_iterate_multipart_uploads( being split by this delimiter :type delimiter: ``str`` - :keyword max_uploads: The max uplod items returned for one request + :keyword max_uploads: The max upload items returned for one request :type max_uploads: ``int`` :return: A generator of OSSMultipartUpload instances. @@ -791,7 +791,7 @@ def _upload_from_iterator( self, iterator, object_path, upload_id, calculate_hash=True, container=None ): """ - Uploads data from an interator in fixed sized chunks to OSS + Uploads data from an iterator in fixed sized chunks to OSS :param iterator: The generator for fetching the upload data :type iterator: ``generator`` @@ -990,7 +990,7 @@ def _to_obj(self, element, container): def _safe_decode(self, encoded): """ - Decode it as an escaped string and then treate the content as + Decode it as an escaped string and then treat the content as UTF-8 encoded. """ try: diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py index a46a7bd004..8ee11a06ba 100644 --- a/libcloud/storage/drivers/s3.py +++ b/libcloud/storage/drivers/s3.py @@ -1275,7 +1275,7 @@ def get_object_cdn_url(self, obj, ex_expiry=S3_CDN_URL_EXPIRY_HOURS): """ Return a "presigned URL" for read-only access to object - AWS only - requires AWS signature V4 authenticaiton. + AWS only - requires AWS signature V4 authentication. :param obj: Object instance. :type obj: :class:`Object` diff --git a/libcloud/storage/types.py b/libcloud/storage/types.py index c23c41fd3d..f3cf90818f 100644 --- a/libcloud/storage/types.py +++ b/libcloud/storage/types.py @@ -109,7 +109,7 @@ class Provider: SCALEWAY = "scaleway" OVH = "ovh" - # Deperecated + # Deprecated CLOUDFILES_US = "cloudfiles_us" CLOUDFILES_UK = "cloudfiles_uk" CLOUDFILES_SWIFT = "cloudfiles_swift" diff --git a/libcloud/test/__init__.py b/libcloud/test/__init__.py index aa5fb19b5f..37a74b2b3b 100644 --- a/libcloud/test/__init__.py +++ b/libcloud/test/__init__.py @@ -104,7 +104,7 @@ class MockHttp(LibcloudConnection): proxy_url = None def __init__(self, *args, **kwargs): - # Load assertion methods into the class, incase people want to assert + # Load assertion methods into the class, in case people want to assert # within a response if isinstance(self, unittest.TestCase): unittest.TestCase.__init__(self, "__init__") @@ -193,7 +193,7 @@ def _example(self, method, url, body, headers): def _example_fail(self, method, url, body, headers): return ( httplib.FORBIDDEN, - "Oh Noes!", + "Oh No!", {"X-Foo": "fail"}, httplib.responses[httplib.FORBIDDEN], ) diff --git a/libcloud/test/common/test_base.py b/libcloud/test/common/test_base.py index 1d1809cb7e..5dd7dcb63c 100644 --- a/libcloud/test/common/test_base.py +++ b/libcloud/test/common/test_base.py @@ -70,7 +70,7 @@ def test_rate_limit_response(self): self.assertEqual(e.retry_after, 120) except Exception: # We should have got a RateLimitReachedError - self.fail("Catched exception should have been RateLimitReachedError") + self.fail("Caught exception should have been RateLimitReachedError") else: # We should have got an exception self.fail("HTTP Status 429 response didn't raised an exception") diff --git a/libcloud/test/compute/test_abiquo.py b/libcloud/test/compute/test_abiquo.py index 13ae1b8901..9e4a6ad0db 100644 --- a/libcloud/test/compute/test_abiquo.py +++ b/libcloud/test/compute/test_abiquo.py @@ -238,7 +238,7 @@ def test_run_node(self): node = self.driver.list_nodes()[0] # Node is by default in NodeState.TERMINATED and AbiquoState == # 'NOT_ALLOCATED' - # so it is available to be runned + # so it is available to be ran self.driver.ex_run_node(node) def test_run_node_invalid_state(self): @@ -251,7 +251,7 @@ def test_run_node_invalid_state(self): self.driver = AbiquoNodeDriver("go", "trunks", "http://dummy.host.com/api") node = self.driver.list_nodes()[0] # Node is by default in AbiquoState = 'ON' for user 'go:trunks' - # so is not available to be runned + # so is not available to be ran self.assertRaises(LibcloudError, self.driver.ex_run_node, node) def test_run_node_failed(self): @@ -292,7 +292,7 @@ def test_get_href(self): class AbiquoMockHttp(MockHttp): """ - Mock the functionallity of the remote Abiquo API. + Mock the functionality of the remote Abiquo API. """ fixtures = ComputeFileFixtures("abiquo") diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py index 36c209f78d..cc83bd1395 100644 --- a/libcloud/test/compute/test_ec2.py +++ b/libcloud/test/compute/test_ec2.py @@ -131,7 +131,7 @@ def test_regions_and_signature_versions(self): driver = EC2NodeDriver(*EC2_PARAMS, region="eu-south-1") self.assertEqual(driver.signature_version, "4") - # Verify that signature_version can be overriden via constructor argument + # Verify that signature_version can be overridden via constructor argument driver = EC2NodeDriver(*EC2_PARAMS, region="us-east-1", signature_version="2") self.assertEqual(driver.signature_version, "2") diff --git a/libcloud/test/compute/test_openstack.py b/libcloud/test/compute/test_openstack.py index e8bf332222..fcb135ded1 100644 --- a/libcloud/test/compute/test_openstack.py +++ b/libcloud/test/compute/test_openstack.py @@ -1988,7 +1988,7 @@ def test__paginated_request_two_pages(self): def test_list_images_with_pagination_invalid_response_no_infinite_loop(self): # "next" attribute matches the current page, but it shouldn't result in - # an infite loop + # an infinite loop OpenStack_2_0_MockHttp.type = "invalid_next" ret = self.driver.list_images() self.assertEqual(len(ret), 2) @@ -3857,7 +3857,7 @@ class OpenStack_AllAuthVersions_MockHttp(MockHttp): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - # Lazy import to avoid cyclic depedency issue + # Lazy import to avoid cyclic dependency issue from libcloud.test.common.test_openstack_identity import ( OpenStackIdentity_2_0_MockHttp, OpenStackIdentity_3_0_MockHttp, diff --git a/libcloud/test/storage/test_digitalocean_spaces.py b/libcloud/test/storage/test_digitalocean_spaces.py index 7c97b49ed9..4c8146a68c 100644 --- a/libcloud/test/storage/test_digitalocean_spaces.py +++ b/libcloud/test/storage/test_digitalocean_spaces.py @@ -116,7 +116,7 @@ def test_connection_class_type(self): res = self.driver_v4.connectionCls is DOSpacesConnectionAWS4 self.assertTrue(res, "driver.connectionCls does not match!") - # Verify again that connection class hasn't been overriden when + # Verify again that connection class hasn't been overridden when # instantiating a second driver class res = self.driver_v2.connectionCls is DOSpacesConnectionAWS2 self.assertTrue(res, "driver.connectionCls does not match!") diff --git a/libcloud/test/storage/test_google_storage.py b/libcloud/test/storage/test_google_storage.py index 5c1ff2b927..6406618105 100644 --- a/libcloud/test/storage/test_google_storage.py +++ b/libcloud/test/storage/test_google_storage.py @@ -512,7 +512,7 @@ def test_download_object_data_is_not_buffered_in_memory(self): # Test case which verifies that response.body attribute is not accessed # and as such, whole body response is not buffered into RAM - # If content is consumed and response.content attribute accessed execption + # If content is consumed and response.content attribute accessed exception # will be thrown and test will fail mock_response = Mock(name="mock response") diff --git a/libcloud/test/storage/test_rgw.py b/libcloud/test/storage/test_rgw.py index 3017db3120..554c7cb920 100644 --- a/libcloud/test/storage/test_rgw.py +++ b/libcloud/test/storage/test_rgw.py @@ -78,7 +78,7 @@ def test_connection_class_type(self): res = self.driver_v4.connectionCls is S3RGWConnectionAWS4 self.assertTrue(res, "driver.connectionCls does not match!") - # Verify again that connection class hasn't been overriden when + # Verify again that connection class hasn't been overridden when # instantiating a second driver class res = self.driver_v2.connectionCls is S3RGWConnectionAWS2 self.assertTrue(res, "driver.connectionCls does not match!") diff --git a/libcloud/test/storage/test_s3.py b/libcloud/test/storage/test_s3.py index 46aa60a2be..d844da31e9 100644 --- a/libcloud/test/storage/test_s3.py +++ b/libcloud/test/storage/test_s3.py @@ -699,7 +699,7 @@ def test_download_object_data_is_not_buffered_in_memory(self): # Test case which verifies that response.body attribute is not accessed # and as such, whole body response is not buffered into RAM - # If content is consumed and response.content attribute accessed execption + # If content is consumed and response.content attribute accessed exception # will be thrown and test will fail mock_response = Mock(name="mock response") mock_response.headers = {} diff --git a/libcloud/utils/misc.py b/libcloud/utils/misc.py index 5c7a4a9da8..67e885c4bd 100644 --- a/libcloud/utils/misc.py +++ b/libcloud/utils/misc.py @@ -173,9 +173,9 @@ def str2list(data): continue try: - splitted = line.split(" ") - # key = splitted[0] - value = splitted[1] + split = line.split(" ") + # key = split[0] + value = split[1] except Exception: continue