Fixed all typos in comments
Change-Id: Ied9378d8bcf93a60800e3246ee360d2225742db6
This commit is contained in:
parent
43cef17976
commit
6150a769ab
@ -18,8 +18,8 @@ CD_TYPES = {
|
|||||||
"iso", # "Raw" format containing ISO bytes.
|
"iso", # "Raw" format containing ISO bytes.
|
||||||
}
|
}
|
||||||
CD_LOCATIONS = {
|
CD_LOCATIONS = {
|
||||||
# Look into optical units devices. Only an ISO format could
|
# Look into optical devices. Only an ISO format could be
|
||||||
# be used here (vfat ignored).
|
# used here (vfat ignored).
|
||||||
"cdrom",
|
"cdrom",
|
||||||
# Search through physical disks for raw ISO content or vfat filesystems
|
# Search through physical disks for raw ISO content or vfat filesystems
|
||||||
# containing configuration drive's content.
|
# containing configuration drive's content.
|
||||||
|
@ -45,7 +45,7 @@ class CertificateVerifyFailed(ServiceException):
|
|||||||
|
|
||||||
"""The received certificate is not valid.
|
"""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
|
certificate should be disabled for the metadata provider. In order
|
||||||
to do that the `https_allow_insecure` config option should be set.
|
to do that the `https_allow_insecure` config option should be set.
|
||||||
"""
|
"""
|
||||||
|
@ -145,7 +145,7 @@ class InitManager(object):
|
|||||||
# handlers being shared between the current process and the new one,
|
# handlers being shared between the current process and the new one,
|
||||||
# any logging handlers for the current logger object will be closed.
|
# 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
|
# 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.
|
# conflicts where the logging can't be done.
|
||||||
logging.release_logging_handlers("cloudbaseinit")
|
logging.release_logging_handlers("cloudbaseinit")
|
||||||
|
|
||||||
|
@ -435,7 +435,7 @@ class AzureService(base.BaseHTTPMetadataService):
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
def get_decoded_user_data(self):
|
def get_decoded_user_data(self):
|
||||||
# Don't decode to retain compability
|
# Don't decode to retain compatibility
|
||||||
return self.get_user_data()
|
return self.get_user_data()
|
||||||
|
|
||||||
def get_content(self, name):
|
def get_content(self, name):
|
||||||
|
@ -227,7 +227,7 @@ class BaseMetadataService(object):
|
|||||||
|
|
||||||
class BaseHTTPMetadataService(BaseMetadataService):
|
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,
|
def __init__(self, base_url, https_allow_insecure=False,
|
||||||
https_ca_bundle=None):
|
https_ca_bundle=None):
|
||||||
@ -280,7 +280,7 @@ class BaseHTTPMetadataService(BaseMetadataService):
|
|||||||
return response.content
|
return response.content
|
||||||
|
|
||||||
def _get_data(self, path):
|
def _get_data(self, path):
|
||||||
"""Getting the required information ussing metadata service."""
|
"""Getting the required information using metadata service."""
|
||||||
try:
|
try:
|
||||||
response = self._http_request(path)
|
response = self._http_request(path)
|
||||||
except requests.HTTPError as exc:
|
except requests.HTTPError as exc:
|
||||||
|
@ -81,7 +81,7 @@ class CloudStack(base.BaseHTTPMetadataService):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
"""Obtain all the required informations."""
|
"""Obtain all the required information."""
|
||||||
super(CloudStack, self).load()
|
super(CloudStack, self).load()
|
||||||
if self._test_api(CONF.cloudstack.metadata_base_url):
|
if self._test_api(CONF.cloudstack.metadata_base_url):
|
||||||
return True
|
return True
|
||||||
@ -219,7 +219,7 @@ class CloudStack(base.BaseHTTPMetadataService):
|
|||||||
"Password Server.")
|
"Password Server.")
|
||||||
|
|
||||||
def get_admin_password(self):
|
def get_admin_password(self):
|
||||||
"""Get the admin pasword from the Password Server.
|
"""Get the admin password from the Password Server.
|
||||||
|
|
||||||
.. note:
|
.. note:
|
||||||
The password is deleted from the Password Server after the first
|
The password is deleted from the Password Server after the first
|
||||||
|
@ -609,7 +609,7 @@ class WindowsUtils(base.BaseOSUtils):
|
|||||||
|
|
||||||
:param token: Represents the user logon session token, resulted from
|
:param token: Represents the user logon session token, resulted from
|
||||||
running the 'create_user_logon_session' method.
|
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
|
:param wait: Specifies if it's needed to wait for the process
|
||||||
handler to finish up running all the operations
|
handler to finish up running all the operations
|
||||||
on the process object.
|
on the process object.
|
||||||
|
@ -133,7 +133,7 @@ class BaseCommand(object):
|
|||||||
The parameter *target_path* represents the file which will be
|
The parameter *target_path* represents the file which will be
|
||||||
executed. The optional parameter *cleanup* can be a callable,
|
executed. The optional parameter *cleanup* can be a callable,
|
||||||
which will be called after executing a command, no matter if the
|
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
|
self._target_path = target_path
|
||||||
|
@ -27,7 +27,7 @@ from cloudbaseinit.utils import network
|
|||||||
LOG = oslo_logging.getLogger(__name__)
|
LOG = oslo_logging.getLogger(__name__)
|
||||||
|
|
||||||
# Mandatory network details are marked with True. And
|
# 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 = {
|
NET_REQUIRE = {
|
||||||
("name", "mac"): True,
|
("name", "mac"): True,
|
||||||
("address", "address6"): True,
|
("address", "address6"): True,
|
||||||
|
@ -93,7 +93,7 @@ def _write_file(path, content, permissions=DEFAULT_PERMISSIONS,
|
|||||||
path: The absolute path to the location on the filesystem where
|
path: The absolute path to the location on the filesystem where
|
||||||
the file should be written.
|
the file should be written.
|
||||||
content: The content that should be placed in the file.
|
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.
|
this file.
|
||||||
open_mode: The open mode used when opening the file.
|
open_mode: The open mode used when opening the file.
|
||||||
"""
|
"""
|
||||||
|
@ -26,7 +26,7 @@ class CreateUserPlugin(createuser.BaseCreateUserPlugin):
|
|||||||
def _create_user_logon(user_name, password, osutils):
|
def _create_user_logon(user_name, password, osutils):
|
||||||
try:
|
try:
|
||||||
# Create a user profile in order for other plugins
|
# 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,
|
token = osutils.create_user_logon_session(user_name,
|
||||||
password,
|
password,
|
||||||
True)
|
True)
|
||||||
|
@ -189,7 +189,7 @@ kernel32.FileTimeToSystemTime.argtypes = [ctypes.POINTER(FILETIME),
|
|||||||
ctypes.POINTER(SYSTEMTIME)]
|
ctypes.POINTER(SYSTEMTIME)]
|
||||||
FileTimeToSystemTime = kernel32.FileTimeToSystemTime
|
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
|
# module would be more correct
|
||||||
kernel32.GetLastError.restype = wintypes.DWORD
|
kernel32.GetLastError.restype = wintypes.DWORD
|
||||||
kernel32.GetLastError.argtypes = []
|
kernel32.GetLastError.argtypes = []
|
||||||
|
@ -28,7 +28,7 @@ LOG = oslo_logging.getLogger(__name__)
|
|||||||
|
|
||||||
def _read_url(url):
|
def _read_url(url):
|
||||||
# Disable certificate verification on Python 2 as
|
# 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,
|
req = requests.get(url, verify=six.PY3,
|
||||||
headers={'User-Agent': _PRODUCT_NAME})
|
headers={'User-Agent': _PRODUCT_NAME})
|
||||||
req.raise_for_status()
|
req.raise_for_status()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user