Fix more typos (#7439)

* Fix more typos in plugins/.

* Fix typos in tests/unit/.

* Fix typos in tests/integration/.

* Fix more typos.

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

---------

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
This commit is contained in:
Felix Fontein 2023-10-29 18:04:44 +01:00 committed by GitHub
parent f7532c7d9d
commit 2b62826082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 99 additions and 99 deletions

View file

@ -39,7 +39,7 @@ except ImportError:
LIBCLOUD_IMP_ERR = traceback.format_exc()
HAS_LIBCLOUD = False
# MCP 2.x version patten for location (datacenter) names.
# MCP 2.x version pattern for location (datacenter) names.
#
# Note that this is not a totally reliable way of determining MCP version.
# Unfortunately, libcloud's NodeLocation currently makes no provision for extended properties.

View file

@ -203,7 +203,7 @@ class Config(object):
if url == "":
raise HwcClientException(
0, "Can not find the enpoint for %s" % service_type)
0, "Cannot find the endpoint for %s" % service_type)
if url[-1] != "/":
url += "/"
@ -351,7 +351,7 @@ def wait_to_finish(target, pending, refresh, timeout, min_interval=1, delay=3):
if pending and status not in pending:
raise HwcModuleException(
"unexpect status(%s) occurred" % status)
"unexpected status(%s) occurred" % status)
if not is_last_time:
wait *= 2
@ -362,7 +362,7 @@ def wait_to_finish(target, pending, refresh, timeout, min_interval=1, delay=3):
time.sleep(wait)
raise HwcModuleException("asycn wait timeout after %d seconds" % timeout)
raise HwcModuleException("async wait timeout after %d seconds" % timeout)
def navigate_value(data, index, array_index=None):

View file

@ -544,7 +544,7 @@ class KeycloakAPI(object):
return None
def get_client_group_available_rolemappings(self, gid, cid, realm="master"):
""" Fetch the available role of a client in a specified goup on the Keycloak server.
""" Fetch the available role of a client in a specified group on the Keycloak server.
:param gid: ID of the group from which to obtain the rolemappings.
:param cid: ID of the client from which to obtain the rolemappings.
@ -627,7 +627,7 @@ class KeycloakAPI(object):
% (rid, realm, str(e)))
def add_group_rolemapping(self, gid, cid, role_rep, realm="master"):
""" Fetch the composite role of a client in a specified goup on the Keycloak server.
""" Fetch the composite role of a client in a specified group on the Keycloak server.
:param gid: ID of the group from which to obtain the rolemappings.
:param cid: ID of the client from which to obtain the rolemappings.
@ -1238,7 +1238,7 @@ class KeycloakAPI(object):
:param realm: Realm in which the clientscope resides.
:param client_id: The client in which the clientscope resides.
:return The optinal clientscopes of this realm or client
:return The optional clientscopes of this realm or client
"""
url = URL_OPTIONAL_CLIENTSCOPES if client_id is None else URL_CLIENT_OPTIONAL_CLIENTSCOPES
return self._get_clientscopes_of_type(realm, url, 'optional', client_id)
@ -1251,7 +1251,7 @@ class KeycloakAPI(object):
:param realm: Realm in which the clientscope resides.
:param url_template the template for the right type
:param scope_type this can be either optinal or default
:param scope_type this can be either optional or default
:param client_id: The client in which the clientscope resides.
:return The clientscopes of the specified type of this realm
"""
@ -1273,7 +1273,7 @@ class KeycloakAPI(object):
def _decide_url_type_clientscope(self, client_id=None, scope_type="default"):
"""Decides which url to use.
:param scope_type this can be either optinal or default
:param scope_type this can be either optional or default
:param client_id: The client in which the clientscope resides.
"""
if client_id is None:
@ -1520,7 +1520,7 @@ class KeycloakAPI(object):
def get_subgroup_direct_parent(self, parents, realm="master", children_to_resolve=None):
""" Get keycloak direct parent group API object for a given chain of parents.
To succesfully work the API for subgroups we actually dont need
To successfully work the API for subgroups we actually don't need
to "walk the whole tree" for nested groups but only need to know
the ID for the direct predecessor of current subgroup. This
method will guarantee us this information getting there with
@ -2879,7 +2879,7 @@ class KeycloakAPI(object):
groups_to_add_and_remove = self.extract_groups_to_add_to_and_remove_from_user(groups)
# If group membership need to be changed
if not is_struct_included(groups_to_add_and_remove['add'], user_existing_groups):
# Get available goups in the realm
# Get available groups in the realm
realm_groups = self.get_groups(realm=realm)
for realm_group in realm_groups:
if "name" in realm_group and realm_group["name"] in groups_to_add_and_remove['add']:

View file

@ -79,7 +79,7 @@ def memset_api_call(api_key, api_method, payload=None):
msg = "Memset API returned an error ({0}, {1})." . format(response.json()['error_type'], response.json()['error'])
except urllib_error.URLError as e:
has_failed = True
msg = "An URLError occured ({0})." . format(type(e))
msg = "An URLError occurred ({0})." . format(type(e))
response.stderr = "{0}" . format(e)
if msg is None:

View file

@ -331,7 +331,7 @@ def pritunl_auth_request(
):
"""
Send an API call to a Pritunl server.
Taken from https://pritunl.com/api and adaped work with Ansible open_url
Taken from https://pritunl.com/api and adapted to work with Ansible open_url
"""
auth_timestamp = str(int(time.time()))
auth_nonce = uuid.uuid4().hex

View file

@ -434,7 +434,7 @@ def check_and_update_attributes(
target_instance, attr_name, input_value, existing_value, changed
):
"""
This function checks the difference between two resource attributes of literal types and sets the attrbute
This function checks the difference between two resource attributes of literal types and sets the attribute
value in the target instance type holding the attribute.
:param target_instance: The instance which contains the attribute whose values to be compared
:param attr_name: Name of the attribute whose value required to be compared
@ -785,7 +785,7 @@ def _get_attributes_to_consider(exclude_attributes, model, module):
attributes_to_consider = list(model.attribute_map)
if "freeform_tags" in attributes_to_consider:
attributes_to_consider.remove("freeform_tags")
# Temporarily removing node_count as the exisiting resource does not reflect it
# Temporarily removing node_count as the existing resource does not reflect it
if "node_count" in attributes_to_consider:
attributes_to_consider.remove("node_count")
_debug("attributes to consider: {0}".format(attributes_to_consider))
@ -1771,7 +1771,7 @@ def update_class_type_attr_difference(
):
"""
Checks the difference and updates an attribute which is represented by a class
instance. Not aplicable if the attribute type is a primitive value.
instance. Not applicable if the attribute type is a primitive value.
For example, if a class name is A with an attribute x, then if A.x = X(), then only
this method works.
:param update_class_details The instance which should be updated if there is change in
@ -1933,7 +1933,7 @@ def get_target_resource_from_list(
module, list_resource_fn, target_resource_id=None, **kwargs
):
"""
Returns a resource filtered by identifer from a list of resources. This method should be
Returns a resource filtered by identifier from a list of resources. This method should be
used as an alternative of 'get resource' method when 'get resource' is nor provided by
resource api. This method returns a wrapper of response object but that should not be
used as an input to 'wait_until' utility as this is only a partial wrapper of response object.

View file

@ -327,7 +327,7 @@ class RedfishUtils(object):
found in ansible.module_utils.urls, but it takes files and encodes them
as Base64 strings, which is not expected by Redfish services. It also
adds escaping of certain bytes in the payload, such as inserting '\r'
any time it finds a standlone '\n', which corrupts the image payload
any time it finds a standalone '\n', which corrupts the image payload
send to the service. This implementation is simplified to Redfish's
usage and doesn't necessarily represent an exhaustive method of
building multipart requests.
@ -3703,12 +3703,12 @@ class RedfishUtils(object):
rsp_uri = loc['Uri']
if vendor == 'HPE':
# WORKAROUND
# HPE systems with iLO 4 will have BIOS Atrribute Registries location URI as a dictonary with key 'extref'
# HPE systems with iLO 4 will have BIOS Attribute Registries location URI as a dictionary with key 'extref'
# Hence adding condition to fetch the Uri
if type(loc['Uri']) is dict and "extref" in loc['Uri'].keys():
rsp_uri = loc['Uri']['extref']
if not rsp_uri:
msg = "Language 'en' not found in BIOS Atrribute Registries location, URI: %s, response: %s"
msg = "Language 'en' not found in BIOS Attribute Registries location, URI: %s, response: %s"
return {
"ret": False,
"msg": msg % (resp_uri, str(resp_data))

View file

@ -303,7 +303,7 @@ class Scaleway(object):
wait_timeout = self.module.params["wait_timeout"]
wait_sleep_time = self.module.params["wait_sleep_time"]
# Prevent requesting the ressource status too soon
# Prevent requesting the resource status too soon
time.sleep(wait_sleep_time)
start = datetime.datetime.utcnow()

View file

@ -49,7 +49,7 @@ class _Variable(object):
output (bool, optional): flag indicating whether the variable should be in the output of the module. Defaults to None.
diff (bool, optional): flag indicating whether to generate diff mode output for this variable. Defaults to None.
change (bool, optional): flag indicating whether to track if changes happened to this variable. Defaults to None.
fact (bool, optional): flag indicating whether the varaiable should be exposed as a fact of the module. Defaults to None.
fact (bool, optional): flag indicating whether the variable should be exposed as a fact of the module. Defaults to None.
initial_value (any, optional): initial value of the variable, to be used with `change`. Defaults to NOTHING.
verbosity (int, optional): level of verbosity in which this variable is reported by the module as `output`, `fact` or `diff`. Defaults to None.
"""
@ -143,7 +143,7 @@ class VarDict(object):
output (bool, optional): flag indicating whether the variable should be in the output of the module. Defaults to None.
diff (bool, optional): flag indicating whether to generate diff mode output for this variable. Defaults to None.
change (bool, optional): flag indicating whether to track if changes happened to this variable. Defaults to None.
fact (bool, optional): flag indicating whether the varaiable should be exposed as a fact of the module. Defaults to None.
fact (bool, optional): flag indicating whether the variable should be exposed as a fact of the module. Defaults to None.
initial_value (any, optional): initial value of the variable, to be used with `change`. Defaults to NOTHING.
verbosity (int, optional): level of verbosity in which this variable is reported by the module as `output`, `fact` or `diff`. Defaults to None.
"""

View file

@ -182,7 +182,7 @@ class WdcRedfishUtils(RedfishUtils):
:param str bundle_uri: HTTP URI of the firmware bundle.
:return: Firmware version number contained in the bundle, and whether or not the bundle is multi-tenant.
Either value will be None if unable to deterine.
Either value will be None if unable to determine.
:rtype: str or None, bool or None
"""
bundle_temp_filename = fetch_file(module=self.module,