summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorDirk Mueller <dirk@dmllr.de>2013-06-08 13:18:51 +0200
committerDirk Mueller <dirk@dmllr.de>2013-06-12 22:07:23 +0200
commit1bf87dda57b076e042301eeafa966283265d08cf (patch)
tree103b0d02f296210ca95f1ed117347ab5d2c948b2 /nova/api
parent957bd5c780c83243c750c22925e8f61f683f2b03 (diff)
downloadnova-1bf87dda57b076e042301eeafa966283265d08cf.tar.gz
nova-1bf87dda57b076e042301eeafa966283265d08cf.tar.xz
nova-1bf87dda57b076e042301eeafa966283265d08cf.zip
Fix and enable H403 tests
Multi-line doc-strings should end on a new, separate line. Change-Id: I4cf0cfe92b634ef77971863a4df41ef43531bc20
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/__init__.py3
-rw-r--r--nova/api/ec2/cloud.py9
-rw-r--r--nova/api/openstack/compute/consoles.py3
-rw-r--r--nova/api/openstack/compute/contrib/hosts.py7
-rw-r--r--nova/api/openstack/compute/contrib/simple_tenant_usage.py3
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: