summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/db/sqlalchemy/models.py3
-rw-r--r--openstack/common/memorycache.py3
-rw-r--r--openstack/common/notifier/log_notifier.py4
-rw-r--r--openstack/common/rpc/common.py6
-rw-r--r--openstack/common/rpc/impl_kombu.py5
-rw-r--r--openstack/common/rpc/service.py3
-rw-r--r--openstack/common/scheduler/filters/capabilities_filter.py5
-rw-r--r--openstack/common/timeutils.py3
8 files changed, 21 insertions, 11 deletions
diff --git a/openstack/common/db/sqlalchemy/models.py b/openstack/common/db/sqlalchemy/models.py
index 6638c83..f61bb39 100644
--- a/openstack/common/db/sqlalchemy/models.py
+++ b/openstack/common/db/sqlalchemy/models.py
@@ -81,7 +81,8 @@ class ModelBase(object):
def iteritems(self):
"""Make the model object behave like a dict.
- Includes attributes from joins."""
+ Includes attributes from joins.
+ """
local = dict(self)
joined = dict([(k, v) for k, v in self.__dict__.iteritems()
if not k[0] == '_'])
diff --git a/openstack/common/memorycache.py b/openstack/common/memorycache.py
index 23847e6..f60143a 100644
--- a/openstack/common/memorycache.py
+++ b/openstack/common/memorycache.py
@@ -57,7 +57,8 @@ class Client(object):
def get(self, key):
"""Retrieves the value for a key or None.
- this expunges expired keys during each get"""
+ This expunges expired keys during each get.
+ """
now = timeutils.utcnow_ts()
for k in self.cache.keys():
diff --git a/openstack/common/notifier/log_notifier.py b/openstack/common/notifier/log_notifier.py
index aa3bc0a..d3ef0ae 100644
--- a/openstack/common/notifier/log_notifier.py
+++ b/openstack/common/notifier/log_notifier.py
@@ -24,7 +24,9 @@ CONF = cfg.CONF
def notify(_context, message):
"""Notifies the recipient of the desired event given the model.
- Log notifications using openstack's default logging system"""
+
+ Log notifications using openstack's default logging system.
+ """
priority = message.get('priority',
CONF.default_notification_level)
diff --git a/openstack/common/rpc/common.py b/openstack/common/rpc/common.py
index 5a7e525..28dcacd 100644
--- a/openstack/common/rpc/common.py
+++ b/openstack/common/rpc/common.py
@@ -417,7 +417,8 @@ class ClientException(Exception):
"""This encapsulates some actual exception that is expected to be
hit by an RPC proxy object. Merely instantiating it records the
current exception information, which will be passed back to the
- RPC client without exceptional logging."""
+ RPC client without exceptional logging.
+ """
def __init__(self):
self._exc_info = sys.exc_info()
@@ -438,7 +439,8 @@ def client_exceptions(*exceptions):
of expected exceptions that the RPC layer should not consider fatal,
and not log as if they were generated in a real error scenario. Note
that this will cause listed exceptions to be wrapped in a
- ClientException, which is used internally by the RPC layer."""
+ ClientException, which is used internally by the RPC layer.
+ """
def outer(func):
def inner(*args, **kwargs):
return catch_client_exception(exceptions, func, *args, **kwargs)
diff --git a/openstack/common/rpc/impl_kombu.py b/openstack/common/rpc/impl_kombu.py
index 0648e4b..0960b9a 100644
--- a/openstack/common/rpc/impl_kombu.py
+++ b/openstack/common/rpc/impl_kombu.py
@@ -447,8 +447,9 @@ class Connection(object):
self.reconnect()
def _fetch_ssl_params(self):
- """Handles fetching what ssl params
- should be used for the connection (if any)"""
+ """Handles fetching what ssl params should be used for the connection
+ (if any).
+ """
ssl_params = dict()
# http://docs.python.org/library/ssl.html - ssl.wrap_socket
diff --git a/openstack/common/rpc/service.py b/openstack/common/rpc/service.py
index 6b56ebb..3f51d0b 100644
--- a/openstack/common/rpc/service.py
+++ b/openstack/common/rpc/service.py
@@ -30,7 +30,8 @@ LOG = logging.getLogger(__name__)
class Service(service.Service):
"""Service object for binaries running on hosts.
- A service enables rpc by listening to queues based on topic and host."""
+ A service enables rpc by listening to queues based on topic and host.
+ """
def __init__(self, host, topic, manager=None):
super(Service, self).__init__()
self.host = host
diff --git a/openstack/common/scheduler/filters/capabilities_filter.py b/openstack/common/scheduler/filters/capabilities_filter.py
index df69955..89e2bdb 100644
--- a/openstack/common/scheduler/filters/capabilities_filter.py
+++ b/openstack/common/scheduler/filters/capabilities_filter.py
@@ -25,8 +25,9 @@ class CapabilitiesFilter(filters.BaseHostFilter):
"""HostFilter to work with resource (instance & volume) type records."""
def _satisfies_extra_specs(self, capabilities, resource_type):
- """Check that the capabilities provided by the services
- satisfy the extra specs associated with the instance type"""
+ """Check that the capabilities provided by the services satisfy
+ the extra specs associated with the instance type.
+ """
extra_specs = resource_type.get('extra_specs', [])
if not extra_specs:
return True
diff --git a/openstack/common/timeutils.py b/openstack/common/timeutils.py
index 6094365..cb17487 100644
--- a/openstack/common/timeutils.py
+++ b/openstack/common/timeutils.py
@@ -141,7 +141,8 @@ def clear_time_override():
def marshall_now(now=None):
"""Make an rpc-safe datetime with microseconds.
- Note: tzinfo is stripped, but not required for relative times."""
+ Note: tzinfo is stripped, but not required for relative times.
+ """
if not now:
now = utcnow()
return dict(day=now.day, month=now.month, year=now.year, hour=now.hour,