diff options
Diffstat (limited to 'nova/api')
-rw-r--r-- | nova/api/ec2/__init__.py | 3 | ||||
-rw-r--r-- | nova/api/ec2/cloud.py | 9 | ||||
-rw-r--r-- | nova/api/openstack/compute/consoles.py | 3 | ||||
-rw-r--r-- | nova/api/openstack/compute/contrib/hosts.py | 7 | ||||
-rw-r--r-- | nova/api/openstack/compute/contrib/simple_tenant_usage.py | 3 |
5 files changed, 17 insertions, 8 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index 12ea5f615..061495e71 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -158,7 +158,8 @@ class Lockout(wsgi.Middleware): There is a possible race condition where simultaneous requests could sneak in before the lockout hits, but this is extremely rare and would - only result in a couple of extra failed attempts.""" + only result in a couple of extra failed attempts. + """ def __init__(self, application): """middleware can use fake for testing.""" diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 00a35d05e..47575b201 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -1369,7 +1369,8 @@ class CloudController(object): def terminate_instances(self, context, instance_id, **kwargs): """Terminate each instance in instance_id, which is a list of ec2 ids. - instance_id is a kwarg so its name cannot be modified.""" + instance_id is a kwarg so its name cannot be modified. + """ previous_states = self._ec2_ids_to_instances(context, instance_id) LOG.debug(_("Going to start terminating instances")) for instance in previous_states: @@ -1388,7 +1389,8 @@ class CloudController(object): def stop_instances(self, context, instance_id, **kwargs): """Stop each instances in instance_id. - Here instance_id is a list of instance ids""" + Here instance_id is a list of instance ids + """ instances = self._ec2_ids_to_instances(context, instance_id, True) LOG.debug(_("Going to stop instances")) for instance in instances: @@ -1397,7 +1399,8 @@ class CloudController(object): def start_instances(self, context, instance_id, **kwargs): """Start each instances in instance_id. - Here instance_id is a list of instance ids""" + Here instance_id is a list of instance ids + """ instances = self._ec2_ids_to_instances(context, instance_id, True) LOG.debug(_("Going to start instances")) for instance in instances: diff --git a/nova/api/openstack/compute/consoles.py b/nova/api/openstack/compute/consoles.py index f9c30943a..7e540ad17 100644 --- a/nova/api/openstack/compute/consoles.py +++ b/nova/api/openstack/compute/consoles.py @@ -34,7 +34,8 @@ def _translate_keys(cons): def _translate_detail_keys(cons): """Coerces a console instance into proper dictionary format with - correctly mapped attributes """ + correctly mapped attributes. + """ pool = cons['pool'] info = {'id': cons['id'], 'console_type': pool['console_type'], diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py index e0ea1203b..ea9528340 100644 --- a/nova/api/openstack/compute/contrib/hosts.py +++ b/nova/api/openstack/compute/contrib/hosts.py @@ -201,7 +201,8 @@ class HostController(object): def _set_host_maintenance(self, context, host_name, mode=True): """Start/Stop host maintenance window. On start, it triggers - guest VMs evacuation.""" + guest VMs evacuation. + """ LOG.audit(_("Putting host %(host_name)s in maintenance mode " "%(mode)s."), {'host_name': host_name, 'mode': mode}) @@ -218,8 +219,10 @@ class HostController(object): def _set_enabled_status(self, context, host_name, enabled): """Sets the specified host's ability to accept new instances. + :param enabled: a boolean - if False no new VMs will be able to start - on the host""" + on the host + """ if enabled: LOG.audit(_("Enabling host %s.") % host_name) else: diff --git a/nova/api/openstack/compute/contrib/simple_tenant_usage.py b/nova/api/openstack/compute/contrib/simple_tenant_usage.py index cee1f6d85..ceac605c5 100644 --- a/nova/api/openstack/compute/contrib/simple_tenant_usage.py +++ b/nova/api/openstack/compute/contrib/simple_tenant_usage.py @@ -106,7 +106,8 @@ class SimpleTenantUsageController(object): def _get_flavor(self, context, compute_api, instance, flavors_cache): """Get flavor information from the instance's system_metadata, - allowing a fallback to lookup by-id for deleted instances only.""" + allowing a fallback to lookup by-id for deleted instances only. + """ try: return flavors.extract_flavor(instance) except KeyError: |