More spelling fixes inside of nova
Change-Id: I79daf7519c99cc363ac7175c85912298f273da8a
This commit is contained in:
@@ -114,7 +114,7 @@ def _match_query(query, attrs):
|
|||||||
"""Match an ldap query to an attribute dictionary.
|
"""Match an ldap query to an attribute dictionary.
|
||||||
|
|
||||||
The characters &, |, and ! are supported in the query. No syntax checking
|
The characters &, |, and ! are supported in the query. No syntax checking
|
||||||
is performed, so malformed querys will not work correctly.
|
is performed, so malformed queries will not work correctly.
|
||||||
"""
|
"""
|
||||||
# cut off the parentheses
|
# cut off the parentheses
|
||||||
inner = query[1:-1]
|
inner = query[1:-1]
|
||||||
@@ -171,7 +171,7 @@ def _match(key, value, attrs):
|
|||||||
def _subs(value):
|
def _subs(value):
|
||||||
"""Returns a list of subclass strings.
|
"""Returns a list of subclass strings.
|
||||||
|
|
||||||
The strings represent the ldap objectclass plus any subclasses that
|
The strings represent the ldap object class plus any subclasses that
|
||||||
inherit from it. Fakeldap doesn't know about the ldap object structure,
|
inherit from it. Fakeldap doesn't know about the ldap object structure,
|
||||||
so subclasses need to be defined manually in the dictionary below.
|
so subclasses need to be defined manually in the dictionary below.
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class AuthBase(object):
|
|||||||
|
|
||||||
This method will return the id of the object if the object
|
This method will return the id of the object if the object
|
||||||
is of this class, otherwise it will return the original object.
|
is of this class, otherwise it will return the original object.
|
||||||
This allows methods to accept objects or ids as paramaters.
|
This allows methods to accept objects or ids as parameters.
|
||||||
"""
|
"""
|
||||||
if isinstance(obj, cls):
|
if isinstance(obj, cls):
|
||||||
return obj.id
|
return obj.id
|
||||||
@@ -692,7 +692,7 @@ class AuthManager(object):
|
|||||||
|
|
||||||
@type admin: bool
|
@type admin: bool
|
||||||
@param admin: Whether to set the admin flag. The admin flag gives
|
@param admin: Whether to set the admin flag. The admin flag gives
|
||||||
superuser status regardless of roles specifed for the user.
|
superuser status regardless of roles specified for the user.
|
||||||
|
|
||||||
@type create_project: bool
|
@type create_project: bool
|
||||||
@param: Whether to create a project for the user with the same name.
|
@param: Whether to create a project for the user with the same name.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Based a bit on the carrot.backeds.queue backend... but a lot better."""
|
"""Based a bit on the carrot.backends.queue backend... but a lot better."""
|
||||||
|
|
||||||
import Queue as queue
|
import Queue as queue
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ def _get_log_file_path(binary=None):
|
|||||||
class NovaLogger(logging.Logger):
|
class NovaLogger(logging.Logger):
|
||||||
"""NovaLogger manages request context and formatting.
|
"""NovaLogger manages request context and formatting.
|
||||||
|
|
||||||
This becomes the class that is instanciated by logging.getLogger.
|
This becomes the class that is instantiated by logging.getLogger.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ logging.setLoggerClass(NovaLogger)
|
|||||||
|
|
||||||
|
|
||||||
def audit(msg, *args, **kwargs):
|
def audit(msg, *args, **kwargs):
|
||||||
"""Shortcut for logging to root log with sevrity 'AUDIT'."""
|
"""Shortcut for logging to root log with severity 'AUDIT'."""
|
||||||
logging.root.log(AUDIT, msg, *args, **kwargs)
|
logging.root.log(AUDIT, msg, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def _get_drivers():
|
|||||||
|
|
||||||
|
|
||||||
def notify(message):
|
def notify(message):
|
||||||
"""Passes notification to mulitple notifiers in a list."""
|
"""Passes notification to multiple notifiers in a list."""
|
||||||
for driver in _get_drivers():
|
for driver in _get_drivers():
|
||||||
try:
|
try:
|
||||||
driver.notify(message)
|
driver.notify(message)
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ flags.DEFINE_integer('rpc_conn_pool_size', 30,
|
|||||||
class RemoteError(exception.NovaException):
|
class RemoteError(exception.NovaException):
|
||||||
"""Signifies that a remote class has raised an exception.
|
"""Signifies that a remote class has raised an exception.
|
||||||
|
|
||||||
Containes a string representation of the type of the original exception,
|
Contains a string representation of the type of the original exception,
|
||||||
the value of the original exception, and the traceback. These are
|
the value of the original exception, and the traceback. These are
|
||||||
sent to the parent as a joined string so printing the exception
|
sent to the parent as a joined string so printing the exception
|
||||||
contains all of the relevent info.
|
contains all of the relevant info.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
message = _("Remote error: %(exc_type)s %(value)s\n%(traceback)s.")
|
message = _("Remote error: %(exc_type)s %(value)s\n%(traceback)s.")
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ class AdapterConsumer(Consumer):
|
|||||||
|
|
||||||
@exception.wrap_exception()
|
@exception.wrap_exception()
|
||||||
def _process_data(self, msg_id, ctxt, method, args):
|
def _process_data(self, msg_id, ctxt, method, args):
|
||||||
"""Thread that maigcally looks for a method on the proxy
|
"""Thread that magically looks for a method on the proxy
|
||||||
object and calls it.
|
object and calls it.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ class Connection(object):
|
|||||||
self.reconnect()
|
self.reconnect()
|
||||||
|
|
||||||
def reconnect(self):
|
def reconnect(self):
|
||||||
"""Handles reconnecting and re-estblishing queues"""
|
"""Handles reconnecting and re-establishing queues"""
|
||||||
if self.connection:
|
if self.connection:
|
||||||
try:
|
try:
|
||||||
self.connection.close()
|
self.connection.close()
|
||||||
@@ -609,7 +609,7 @@ class ProxyCallback(object):
|
|||||||
|
|
||||||
@exception.wrap_exception()
|
@exception.wrap_exception()
|
||||||
def _process_data(self, ctxt, method, args):
|
def _process_data(self, ctxt, method, args):
|
||||||
"""Thread that maigcally looks for a method on the proxy
|
"""Thread that magically looks for a method on the proxy
|
||||||
object and calls it.
|
object and calls it.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ def get_host_list(context):
|
|||||||
|
|
||||||
|
|
||||||
def get_zone_list(context):
|
def get_zone_list(context):
|
||||||
"""Return a list of zones assoicated with this zone."""
|
"""Return a list of zones associated with this zone."""
|
||||||
items = _call_scheduler('get_zone_list', context)
|
items = _call_scheduler('get_zone_list', context)
|
||||||
for item in items:
|
for item in items:
|
||||||
item['api_url'] = item['api_url'].replace('\\/', '/')
|
item['api_url'] = item['api_url'].replace('\\/', '/')
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ from nova.api.ec2 import ec2utils
|
|||||||
FLAGS = flags.FLAGS
|
FLAGS = flags.FLAGS
|
||||||
LOG = logging.getLogger('nova.scheduler.driver')
|
LOG = logging.getLogger('nova.scheduler.driver')
|
||||||
flags.DEFINE_integer('service_down_time', 60,
|
flags.DEFINE_integer('service_down_time', 60,
|
||||||
'maximum time since last checkin for up service')
|
'maximum time since last check-in for up service')
|
||||||
flags.DECLARE('instances_path', 'nova.compute.manager')
|
flags.DECLARE('instances_path', 'nova.compute.manager')
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ def encode_instance(instance, local=True):
|
|||||||
|
|
||||||
|
|
||||||
class Scheduler(object):
|
class Scheduler(object):
|
||||||
"""The base class that all Scheduler clases should inherit from."""
|
"""The base class that all Scheduler classes should inherit from."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.zone_manager = None
|
self.zone_manager = None
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class SchedulerManager(manager.Manager):
|
|||||||
return self.zone_manager.get_zone_list()
|
return self.zone_manager.get_zone_list()
|
||||||
|
|
||||||
def get_zone_capabilities(self, context=None):
|
def get_zone_capabilities(self, context=None):
|
||||||
"""Get the normalized set of capabilites for this zone."""
|
"""Get the normalized set of capabilities for this zone."""
|
||||||
return self.zone_manager.get_zone_capabilities(context)
|
return self.zone_manager.get_zone_capabilities(context)
|
||||||
|
|
||||||
def update_service_capabilities(self, context=None, service_name=None,
|
def update_service_capabilities(self, context=None, service_name=None,
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class skip_test(object):
|
|||||||
|
|
||||||
|
|
||||||
class skip_if(object):
|
class skip_if(object):
|
||||||
"""Decorator that skips a test if contition is true."""
|
"""Decorator that skips a test if condition is true."""
|
||||||
def __init__(self, condition, msg):
|
def __init__(self, condition, msg):
|
||||||
self.condition = condition
|
self.condition = condition
|
||||||
self.message = msg
|
self.message = msg
|
||||||
@@ -152,7 +152,7 @@ class TestCase(unittest.TestCase):
|
|||||||
if FLAGS.image_service == 'nova.image.fake.FakeImageService':
|
if FLAGS.image_service == 'nova.image.fake.FakeImageService':
|
||||||
nova.image.fake.FakeImageService_reset()
|
nova.image.fake.FakeImageService_reset()
|
||||||
|
|
||||||
# Reset any overriden flags
|
# Reset any overridden flags
|
||||||
self.reset_flags()
|
self.reset_flags()
|
||||||
|
|
||||||
# Stop any timers
|
# Stop any timers
|
||||||
|
|||||||
@@ -872,7 +872,7 @@ def gen_uuid():
|
|||||||
|
|
||||||
|
|
||||||
def is_uuid_like(val):
|
def is_uuid_like(val):
|
||||||
"""For our purposes, a UUID is a string in canoical form:
|
"""For our purposes, a UUID is a string in canonical form:
|
||||||
|
|
||||||
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
|
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
|
||||||
"""
|
"""
|
||||||
@@ -910,7 +910,7 @@ def is_valid_ipv4(address):
|
|||||||
|
|
||||||
def monkey_patch():
|
def monkey_patch():
|
||||||
""" If the Flags.monkey_patch set as True,
|
""" If the Flags.monkey_patch set as True,
|
||||||
this functuion patches a decorator
|
this function patches a decorator
|
||||||
for all functions in specified modules.
|
for all functions in specified modules.
|
||||||
You can set decorators for each modules
|
You can set decorators for each modules
|
||||||
using FLAGS.monkey_patch_modules.
|
using FLAGS.monkey_patch_modules.
|
||||||
|
|||||||
Reference in New Issue
Block a user