From 6150a769ab5912c5f9a4f12916f5f74f9e4a13ff Mon Sep 17 00:00:00 2001 From: Adrian Vladu Date: Wed, 5 Jul 2017 17:28:20 +0300 Subject: [PATCH] Fixed all typos in comments Change-Id: Ied9378d8bcf93a60800e3246ee360d2225742db6 --- cloudbaseinit/constant.py | 4 ++-- cloudbaseinit/exception.py | 2 +- cloudbaseinit/init.py | 2 +- cloudbaseinit/metadata/services/azureservice.py | 2 +- cloudbaseinit/metadata/services/base.py | 4 ++-- cloudbaseinit/metadata/services/cloudstack.py | 4 ++-- cloudbaseinit/osutils/windows.py | 2 +- cloudbaseinit/plugins/common/execcmd.py | 2 +- cloudbaseinit/plugins/common/networkconfig.py | 2 +- .../common/userdataplugins/cloudconfigplugins/write_files.py | 2 +- cloudbaseinit/plugins/windows/createuser.py | 2 +- cloudbaseinit/utils/windows/cryptoapi.py | 2 +- cloudbaseinit/version.py | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cloudbaseinit/constant.py b/cloudbaseinit/constant.py index 887c80d3..b6ddda56 100644 --- a/cloudbaseinit/constant.py +++ b/cloudbaseinit/constant.py @@ -18,8 +18,8 @@ CD_TYPES = { "iso", # "Raw" format containing ISO bytes. } CD_LOCATIONS = { - # Look into optical units devices. Only an ISO format could - # be used here (vfat ignored). + # Look into optical devices. Only an ISO format could be + # used here (vfat ignored). "cdrom", # Search through physical disks for raw ISO content or vfat filesystems # containing configuration drive's content. diff --git a/cloudbaseinit/exception.py b/cloudbaseinit/exception.py index 5b0da21b..6ac8b2c6 100644 --- a/cloudbaseinit/exception.py +++ b/cloudbaseinit/exception.py @@ -45,7 +45,7 @@ class CertificateVerifyFailed(ServiceException): """The received certificate is not valid. - In order to avoid the current exception the validation of the SSL + In order to avoid the current exception, the validation of the SSL certificate should be disabled for the metadata provider. In order to do that the `https_allow_insecure` config option should be set. """ diff --git a/cloudbaseinit/init.py b/cloudbaseinit/init.py index a8720960..428db5c3 100644 --- a/cloudbaseinit/init.py +++ b/cloudbaseinit/init.py @@ -145,7 +145,7 @@ class InitManager(object): # handlers being shared between the current process and the new one, # any logging handlers for the current logger object will be closed. # By doing so, the next time the logger is called, it will be created - # under the newly updated proccess, thus avoiding any issues or + # under the newly updated process, thus avoiding any issues or # conflicts where the logging can't be done. logging.release_logging_handlers("cloudbaseinit") diff --git a/cloudbaseinit/metadata/services/azureservice.py b/cloudbaseinit/metadata/services/azureservice.py index c33584ea..0df0f01d 100644 --- a/cloudbaseinit/metadata/services/azureservice.py +++ b/cloudbaseinit/metadata/services/azureservice.py @@ -435,7 +435,7 @@ class AzureService(base.BaseHTTPMetadataService): raise def get_decoded_user_data(self): - # Don't decode to retain compability + # Don't decode to retain compatibility return self.get_user_data() def get_content(self, name): diff --git a/cloudbaseinit/metadata/services/base.py b/cloudbaseinit/metadata/services/base.py index d7433e91..9cb3c1a4 100644 --- a/cloudbaseinit/metadata/services/base.py +++ b/cloudbaseinit/metadata/services/base.py @@ -227,7 +227,7 @@ class BaseMetadataService(object): class BaseHTTPMetadataService(BaseMetadataService): - """Contract class for metadata services that are ussing HTTP(S).""" + """Contract class for metadata services that are using HTTP(S).""" def __init__(self, base_url, https_allow_insecure=False, https_ca_bundle=None): @@ -280,7 +280,7 @@ class BaseHTTPMetadataService(BaseMetadataService): return response.content def _get_data(self, path): - """Getting the required information ussing metadata service.""" + """Getting the required information using metadata service.""" try: response = self._http_request(path) except requests.HTTPError as exc: diff --git a/cloudbaseinit/metadata/services/cloudstack.py b/cloudbaseinit/metadata/services/cloudstack.py index f13ff57b..30cdd10c 100644 --- a/cloudbaseinit/metadata/services/cloudstack.py +++ b/cloudbaseinit/metadata/services/cloudstack.py @@ -81,7 +81,7 @@ class CloudStack(base.BaseHTTPMetadataService): return True def load(self): - """Obtain all the required informations.""" + """Obtain all the required information.""" super(CloudStack, self).load() if self._test_api(CONF.cloudstack.metadata_base_url): return True @@ -219,7 +219,7 @@ class CloudStack(base.BaseHTTPMetadataService): "Password Server.") def get_admin_password(self): - """Get the admin pasword from the Password Server. + """Get the admin password from the Password Server. .. note: The password is deleted from the Password Server after the first diff --git a/cloudbaseinit/osutils/windows.py b/cloudbaseinit/osutils/windows.py index d58a7905..5777e9d2 100644 --- a/cloudbaseinit/osutils/windows.py +++ b/cloudbaseinit/osutils/windows.py @@ -609,7 +609,7 @@ class WindowsUtils(base.BaseOSUtils): :param token: Represents the user logon session token, resulted from running the 'create_user_logon_session' method. - :param args: The arguments with which the process will be runned with. + :param args: The arguments with which the process will be run with. :param wait: Specifies if it's needed to wait for the process handler to finish up running all the operations on the process object. diff --git a/cloudbaseinit/plugins/common/execcmd.py b/cloudbaseinit/plugins/common/execcmd.py index 4046509b..b416ff60 100644 --- a/cloudbaseinit/plugins/common/execcmd.py +++ b/cloudbaseinit/plugins/common/execcmd.py @@ -133,7 +133,7 @@ class BaseCommand(object): The parameter *target_path* represents the file which will be executed. The optional parameter *cleanup* can be a callable, which will be called after executing a command, no matter if the - execution was succesful or not. + execution was successful or not. """ self._target_path = target_path diff --git a/cloudbaseinit/plugins/common/networkconfig.py b/cloudbaseinit/plugins/common/networkconfig.py index 1ba454b2..a8f4d9a9 100644 --- a/cloudbaseinit/plugins/common/networkconfig.py +++ b/cloudbaseinit/plugins/common/networkconfig.py @@ -27,7 +27,7 @@ from cloudbaseinit.utils import network LOG = oslo_logging.getLogger(__name__) # Mandatory network details are marked with True. And -# if the key is a tuple, then at least one field must exists. +# if the key is a tuple, then at least one field must exist. NET_REQUIRE = { ("name", "mac"): True, ("address", "address6"): True, diff --git a/cloudbaseinit/plugins/common/userdataplugins/cloudconfigplugins/write_files.py b/cloudbaseinit/plugins/common/userdataplugins/cloudconfigplugins/write_files.py index 56f2a726..aeb53946 100644 --- a/cloudbaseinit/plugins/common/userdataplugins/cloudconfigplugins/write_files.py +++ b/cloudbaseinit/plugins/common/userdataplugins/cloudconfigplugins/write_files.py @@ -93,7 +93,7 @@ def _write_file(path, content, permissions=DEFAULT_PERMISSIONS, path: The absolute path to the location on the filesystem where the file should be written. content: The content that should be placed in the file. - permissions:The octal permissions set that should be given for + permissions: The octal permissions set that should be given for this file. open_mode: The open mode used when opening the file. """ diff --git a/cloudbaseinit/plugins/windows/createuser.py b/cloudbaseinit/plugins/windows/createuser.py index 8b5e48a1..ba691a31 100644 --- a/cloudbaseinit/plugins/windows/createuser.py +++ b/cloudbaseinit/plugins/windows/createuser.py @@ -26,7 +26,7 @@ class CreateUserPlugin(createuser.BaseCreateUserPlugin): def _create_user_logon(user_name, password, osutils): try: # Create a user profile in order for other plugins - # to access the user home, etc + # to access the user home, etc. token = osutils.create_user_logon_session(user_name, password, True) diff --git a/cloudbaseinit/utils/windows/cryptoapi.py b/cloudbaseinit/utils/windows/cryptoapi.py index 7a4af24c..033f1a52 100644 --- a/cloudbaseinit/utils/windows/cryptoapi.py +++ b/cloudbaseinit/utils/windows/cryptoapi.py @@ -189,7 +189,7 @@ kernel32.FileTimeToSystemTime.argtypes = [ctypes.POINTER(FILETIME), ctypes.POINTER(SYSTEMTIME)] FileTimeToSystemTime = kernel32.FileTimeToSystemTime -# TODO(alexpilotti): this is not a CryptoAPI funtion, putting it in a separate +# TODO(alexpilotti): this is not a CryptoAPI function, putting it in a separate # module would be more correct kernel32.GetLastError.restype = wintypes.DWORD kernel32.GetLastError.argtypes = [] diff --git a/cloudbaseinit/version.py b/cloudbaseinit/version.py index b1cf6354..225aff47 100644 --- a/cloudbaseinit/version.py +++ b/cloudbaseinit/version.py @@ -28,7 +28,7 @@ LOG = oslo_logging.getLogger(__name__) def _read_url(url): # Disable certificate verification on Python 2 as - # requests's CA list is incomplete. Works fine on Python3. + # requests' CA list is incomplete. Works fine on Python3. req = requests.get(url, verify=six.PY3, headers={'User-Agent': _PRODUCT_NAME}) req.raise_for_status()