summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-09 15:02:47 +0000
committerGerrit Code Review <review@openstack.org>2013-01-09 15:02:47 +0000
commit8b83990c12e4dc03aa599dd5e68ce91a9cab4eb7 (patch)
tree766cd076354cc2e387a0f9bb147520dee4d23c42 /nova/api
parent1db4b13d86d748d9619ea9ce37bb4663285468b5 (diff)
parentf20c3a4ea5227a2dd9e923676611d4f6fbb404bb (diff)
downloadnova-8b83990c12e4dc03aa599dd5e68ce91a9cab4eb7.tar.gz
nova-8b83990c12e4dc03aa599dd5e68ce91a9cab4eb7.tar.xz
nova-8b83990c12e4dc03aa599dd5e68ce91a9cab4eb7.zip
Merge "Fix N402 for nova/api"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/auth.py4
-rw-r--r--nova/api/ec2/__init__.py2
-rw-r--r--nova/api/ec2/apirequest.py2
-rw-r--r--nova/api/ec2/cloud.py10
-rw-r--r--nova/api/ec2/ec2utils.py6
-rw-r--r--nova/api/openstack/__init__.py2
-rw-r--r--nova/api/openstack/common.py8
-rw-r--r--nova/api/openstack/compute/consoles.py14
-rw-r--r--nova/api/openstack/compute/contrib/admin_actions.py20
-rw-r--r--nova/api/openstack/compute/contrib/agents.py2
-rw-r--r--nova/api/openstack/compute/contrib/aggregates.py2
-rw-r--r--nova/api/openstack/compute/contrib/availability_zone.py2
-rw-r--r--nova/api/openstack/compute/contrib/certificates.py2
-rw-r--r--nova/api/openstack/compute/contrib/cloudpipe.py2
-rw-r--r--nova/api/openstack/compute/contrib/cloudpipe_update.py2
-rw-r--r--nova/api/openstack/compute/contrib/config_drive.py4
-rw-r--r--nova/api/openstack/compute/contrib/coverage_ext.py8
-rw-r--r--nova/api/openstack/compute/contrib/createserverext.py2
-rw-r--r--nova/api/openstack/compute/contrib/deferred_delete.py2
-rw-r--r--nova/api/openstack/compute/contrib/disk_config.py2
-rw-r--r--nova/api/openstack/compute/contrib/extended_status.py2
-rw-r--r--nova/api/openstack/compute/contrib/fixed_ips.py2
-rw-r--r--nova/api/openstack/compute/contrib/flavor_access.py2
-rw-r--r--nova/api/openstack/compute/contrib/flavor_disabled.py2
-rw-r--r--nova/api/openstack/compute/contrib/flavor_rxtx.py2
-rw-r--r--nova/api/openstack/compute/contrib/flavor_swap.py2
-rw-r--r--nova/api/openstack/compute/contrib/flavorextradata.py2
-rw-r--r--nova/api/openstack/compute/contrib/flavorextraspecs.py12
-rw-r--r--nova/api/openstack/compute/contrib/floating_ip_dns.py14
-rw-r--r--nova/api/openstack/compute/contrib/floating_ip_pools.py2
-rw-r--r--nova/api/openstack/compute/contrib/floating_ips.py2
-rw-r--r--nova/api/openstack/compute/contrib/floating_ips_bulk.py10
-rw-r--r--nova/api/openstack/compute/contrib/hosts.py2
-rw-r--r--nova/api/openstack/compute/contrib/hypervisors.py2
-rw-r--r--nova/api/openstack/compute/contrib/instance_usage_audit_log.py2
-rw-r--r--nova/api/openstack/compute/contrib/keypairs.py6
-rw-r--r--nova/api/openstack/compute/contrib/multinic.py2
-rw-r--r--nova/api/openstack/compute/contrib/multiple_create.py2
-rw-r--r--nova/api/openstack/compute/contrib/networks.py2
-rw-r--r--nova/api/openstack/compute/contrib/networks_associate.py2
-rw-r--r--nova/api/openstack/compute/contrib/quota_classes.py4
-rw-r--r--nova/api/openstack/compute/contrib/quotas.py4
-rw-r--r--nova/api/openstack/compute/contrib/rescue.py2
-rw-r--r--nova/api/openstack/compute/contrib/scheduler_hints.py2
-rw-r--r--nova/api/openstack/compute/contrib/security_groups.py10
-rw-r--r--nova/api/openstack/compute/contrib/server_diagnostics.py2
-rw-r--r--nova/api/openstack/compute/contrib/server_start_stop.py4
-rw-r--r--nova/api/openstack/compute/contrib/services.py4
-rw-r--r--nova/api/openstack/compute/contrib/simple_tenant_usage.py6
-rw-r--r--nova/api/openstack/compute/contrib/user_data.py2
-rw-r--r--nova/api/openstack/compute/contrib/virtual_interfaces.py2
-rw-r--r--nova/api/openstack/compute/contrib/volumes.py2
-rw-r--r--nova/api/openstack/compute/image_metadata.py4
-rw-r--r--nova/api/openstack/compute/server_metadata.py8
-rw-r--r--nova/api/openstack/compute/servers.py4
-rw-r--r--nova/api/openstack/wsgi.py20
-rw-r--r--nova/api/validator.py2
57 files changed, 127 insertions, 127 deletions
diff --git a/nova/api/auth.py b/nova/api/auth.py
index 72be952b0..83388d638 100644
--- a/nova/api/auth.py
+++ b/nova/api/auth.py
@@ -76,7 +76,7 @@ class InjectContext(wsgi.Middleware):
class NovaKeystoneContext(wsgi.Middleware):
- """Make a request context from keystone headers"""
+ """Make a request context from keystone headers."""
@webob.dec.wsgify(RequestClass=wsgi.Request)
def __call__(self, req):
@@ -128,7 +128,7 @@ class NovaKeystoneContext(wsgi.Middleware):
return self.application
def _get_roles(self, req):
- """Get the list of roles"""
+ """Get the list of roles."""
if 'X_ROLES' in req.headers:
roles = req.headers.get('X_ROLES', '')
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py
index f1ee0154e..b7742a53c 100644
--- a/nova/api/ec2/__init__.py
+++ b/nova/api/ec2/__init__.py
@@ -77,7 +77,7 @@ CONF.import_opt('use_forwarded_for', 'nova.api.auth')
def ec2_error(req, request_id, code, message):
- """Helper to send an ec2_compatible error"""
+ """Helper to send an ec2_compatible error."""
LOG.error(_('%(code)s: %(message)s') % locals())
resp = webob.Response()
resp.status = 400
diff --git a/nova/api/ec2/apirequest.py b/nova/api/ec2/apirequest.py
index 7e0f7986a..ca1302fad 100644
--- a/nova/api/ec2/apirequest.py
+++ b/nova/api/ec2/apirequest.py
@@ -41,7 +41,7 @@ def _underscore_to_xmlcase(str):
def _database_to_isoformat(datetimeobj):
- """Return a xs:dateTime parsable string from datatime"""
+ """Return a xs:dateTime parsable string from datatime."""
return datetimeobj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + 'Z'
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 66ef7fe37..f570b566f 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -110,7 +110,7 @@ _STATE_DESCRIPTION_MAP = {
def _state_description(vm_state, _shutdown_terminate):
- """Map the vm state to the server status string"""
+ """Map the vm state to the server status string."""
# Note(maoy): We do not provide EC2 compatibility
# in shutdown_terminate flag behavior. So we ignore
# it here.
@@ -180,7 +180,7 @@ def _format_block_device_mapping(bdm):
def _format_mappings(properties, result):
- """Format multiple BlockDeviceMappingItemType"""
+ """Format multiple BlockDeviceMappingItemType."""
mappings = [{'virtualName': m['virtual'], 'deviceName': m['device']}
for m in _properties_get_mappings(properties)
if block_device.is_swap_or_ephemeral(m['virtual'])]
@@ -1045,7 +1045,7 @@ class CloudController(object):
def _format_instance_bdm(self, context, instance_uuid, root_device_name,
result):
- """Format InstanceBlockDeviceMappingResponseItemType"""
+ """Format InstanceBlockDeviceMappingResponseItemType."""
root_device_type = 'instance-store'
mapping = []
for bdm in db.block_device_mapping_get_all_by_instance(context,
@@ -1328,7 +1328,7 @@ class CloudController(object):
return self._format_run_instances(context, resv_id)
def _ec2_ids_to_instances(self, context, instance_id):
- """Get all instances first, to prevent partial executions"""
+ """Get all instances first, to prevent partial executions."""
instances = []
for ec2_id in instance_id:
validate_ec2_id(ec2_id)
@@ -1349,7 +1349,7 @@ class CloudController(object):
previous_states)
def reboot_instances(self, context, instance_id, **kwargs):
- """instance_id is a list of instance ids"""
+ """instance_id is a list of instance ids."""
instances = self._ec2_ids_to_instances(context, instance_id)
LOG.audit(_("Reboot instance %r"), instance_id, context=context)
for instance in instances:
diff --git a/nova/api/ec2/ec2utils.py b/nova/api/ec2/ec2utils.py
index f86642ff6..cfe0d7879 100644
--- a/nova/api/ec2/ec2utils.py
+++ b/nova/api/ec2/ec2utils.py
@@ -73,7 +73,7 @@ def glance_id_to_ec2_id(context, glance_id, image_type='ami'):
def ec2_id_to_id(ec2_id):
- """Convert an ec2 ID (i-[base 16 number]) to an instance id (int)"""
+ """Convert an ec2 ID (i-[base 16 number]) to an instance id (int)."""
try:
return int(ec2_id.split('-')[-1], 16)
except ValueError:
@@ -104,7 +104,7 @@ def get_ip_info_for_instance_from_nw_info(nw_info):
def get_ip_info_for_instance(context, instance):
- """Return a dictionary of IP information for an instance"""
+ """Return a dictionary of IP information for an instance."""
info_cache = instance['info_cache'] or {}
cached_nwinfo = info_cache.get('network_info')
@@ -122,7 +122,7 @@ def get_availability_zone_by_host(services, host):
def id_to_ec2_id(instance_id, template='i-%08x'):
- """Convert an instance ID (int) to an ec2 ID (i-[base 16 number])"""
+ """Convert an instance ID (int) to an ec2 ID (i-[base 16 number])."""
return template % int(instance_id)
diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py
index 4808f9ce9..d812cef18 100644
--- a/nova/api/openstack/__init__.py
+++ b/nova/api/openstack/__init__.py
@@ -124,7 +124,7 @@ class APIRouter(base_wsgi.Router):
@classmethod
def factory(cls, global_config, **local_config):
- """Simple paste factory, :class:`nova.wsgi.Router` doesn't have one"""
+ """Simple paste factory, :class:`nova.wsgi.Router` doesn't have one."""
return cls()
def __init__(self, ext_mgr=None, init_only=None):
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py
index 4645659bf..b2583588d 100644
--- a/nova/api/openstack/common.py
+++ b/nova/api/openstack/common.py
@@ -146,7 +146,7 @@ def get_pagination_params(request):
def _get_limit_param(request):
- """Extract integer limit from request or fail"""
+ """Extract integer limit from request or fail."""
try:
limit = int(request.GET['limit'])
except ValueError:
@@ -159,7 +159,7 @@ def _get_limit_param(request):
def _get_marker_param(request):
- """Extract marker id from request or fail"""
+ """Extract marker id from request or fail."""
return request.GET['marker']
@@ -201,7 +201,7 @@ def limited(items, request, max_limit=CONF.osapi_max_limit):
def get_limit_and_marker(request, max_limit=CONF.osapi_max_limit):
- """get limited parameter from request"""
+ """get limited parameter from request."""
params = get_pagination_params(request)
limit = params.get('limit', max_limit)
limit = min(max_limit, limit)
@@ -372,7 +372,7 @@ class MetaItemDeserializer(wsgi.MetadataXMLDeserializer):
class MetadataXMLDeserializer(wsgi.XMLDeserializer):
def extract_metadata(self, metadata_node):
- """Marshal the metadata attribute of a parsed request"""
+ """Marshal the metadata attribute of a parsed request."""
if metadata_node is None:
return {}
metadata = {}
diff --git a/nova/api/openstack/compute/consoles.py b/nova/api/openstack/compute/consoles.py
index c0097b0eb..613a375f2 100644
--- a/nova/api/openstack/compute/consoles.py
+++ b/nova/api/openstack/compute/consoles.py
@@ -25,7 +25,7 @@ from nova import exception
def _translate_keys(cons):
- """Coerces a console instance into proper dictionary format """
+ """Coerces a console instance into proper dictionary format."""
pool = cons['pool']
info = {'id': cons['id'],
'console_type': pool['console_type']}
@@ -80,14 +80,14 @@ class ConsolesTemplate(xmlutil.TemplateBuilder):
class Controller(object):
- """The Consoles controller for the OpenStack API"""
+ """The Consoles controller for the OpenStack API."""
def __init__(self):
self.console_api = console_api.API()
@wsgi.serializers(xml=ConsolesTemplate)
def index(self, req, server_id):
- """Returns a list of consoles for this instance"""
+ """Returns a list of consoles for this instance."""
consoles = self.console_api.get_consoles(
req.environ['nova.context'],
server_id)
@@ -95,14 +95,14 @@ class Controller(object):
for console in consoles])
def create(self, req, server_id):
- """Creates a new console"""
+ """Creates a new console."""
self.console_api.create_console(
req.environ['nova.context'],
server_id)
@wsgi.serializers(xml=ConsoleTemplate)
def show(self, req, server_id, id):
- """Shows in-depth information on a specific console"""
+ """Shows in-depth information on a specific console."""
try:
console = self.console_api.get_console(
req.environ['nova.context'],
@@ -113,11 +113,11 @@ class Controller(object):
return _translate_detail_keys(console)
def update(self, req, server_id, id):
- """You can't update a console"""
+ """You can't update a console."""
raise exc.HTTPNotImplemented()
def delete(self, req, server_id, id):
- """Deletes a console"""
+ """Deletes a console."""
try:
self.console_api.delete_console(req.environ['nova.context'],
server_id,
diff --git a/nova/api/openstack/compute/contrib/admin_actions.py b/nova/api/openstack/compute/contrib/admin_actions.py
index 799b0914a..f345d9617 100644
--- a/nova/api/openstack/compute/contrib/admin_actions.py
+++ b/nova/api/openstack/compute/contrib/admin_actions.py
@@ -46,7 +46,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('pause')
def _pause(self, req, id, body):
- """Permit Admins to pause the server"""
+ """Permit Admins to pause the server."""
ctxt = req.environ['nova.context']
authorize(ctxt, 'pause')
try:
@@ -63,7 +63,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('unpause')
def _unpause(self, req, id, body):
- """Permit Admins to unpause the server"""
+ """Permit Admins to unpause the server."""
ctxt = req.environ['nova.context']
authorize(ctxt, 'unpause')
try:
@@ -80,7 +80,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('suspend')
def _suspend(self, req, id, body):
- """Permit admins to suspend the server"""
+ """Permit admins to suspend the server."""
context = req.environ['nova.context']
authorize(context, 'suspend')
try:
@@ -97,7 +97,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('resume')
def _resume(self, req, id, body):
- """Permit admins to resume the server from suspend"""
+ """Permit admins to resume the server from suspend."""
context = req.environ['nova.context']
authorize(context, 'resume')
try:
@@ -114,7 +114,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('migrate')
def _migrate(self, req, id, body):
- """Permit admins to migrate a server to a new host"""
+ """Permit admins to migrate a server to a new host."""
context = req.environ['nova.context']
authorize(context, 'migrate')
try:
@@ -130,7 +130,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('resetNetwork')
def _reset_network(self, req, id, body):
- """Permit admins to reset networking on an server"""
+ """Permit admins to reset networking on an server."""
context = req.environ['nova.context']
authorize(context, 'resetNetwork')
try:
@@ -144,7 +144,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('injectNetworkInfo')
def _inject_network_info(self, req, id, body):
- """Permit admins to inject network info into a server"""
+ """Permit admins to inject network info into a server."""
context = req.environ['nova.context']
authorize(context, 'injectNetworkInfo')
try:
@@ -160,7 +160,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('lock')
def _lock(self, req, id, body):
- """Permit admins to lock a server"""
+ """Permit admins to lock a server."""
context = req.environ['nova.context']
authorize(context, 'lock')
try:
@@ -176,7 +176,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('unlock')
def _unlock(self, req, id, body):
- """Permit admins to lock a server"""
+ """Permit admins to lock a server."""
context = req.environ['nova.context']
authorize(context, 'unlock')
try:
@@ -266,7 +266,7 @@ class AdminActionsController(wsgi.Controller):
@wsgi.action('os-migrateLive')
def _migrate_live(self, req, id, body):
- """Permit admins to (live) migrate a server to a new host"""
+ """Permit admins to (live) migrate a server to a new host."""
context = req.environ["nova.context"]
authorize(context, 'migrateLive')
diff --git a/nova/api/openstack/compute/contrib/agents.py b/nova/api/openstack/compute/contrib/agents.py
index 218f06b52..6590deafe 100644
--- a/nova/api/openstack/compute/contrib/agents.py
+++ b/nova/api/openstack/compute/contrib/agents.py
@@ -156,7 +156,7 @@ class AgentController(object):
class Agents(extensions.ExtensionDescriptor):
- """Agents support"""
+ """Agents support."""
name = "Agents"
alias = "os-agents"
diff --git a/nova/api/openstack/compute/contrib/aggregates.py b/nova/api/openstack/compute/contrib/aggregates.py
index ef9679f5a..91d138be4 100644
--- a/nova/api/openstack/compute/contrib/aggregates.py
+++ b/nova/api/openstack/compute/contrib/aggregates.py
@@ -203,7 +203,7 @@ class AggregateController(object):
class Aggregates(extensions.ExtensionDescriptor):
- """Admin-only aggregate administration"""
+ """Admin-only aggregate administration."""
name = "Aggregates"
alias = "os-aggregates"
diff --git a/nova/api/openstack/compute/contrib/availability_zone.py b/nova/api/openstack/compute/contrib/availability_zone.py
index 524f454ea..2955b68eb 100644
--- a/nova/api/openstack/compute/contrib/availability_zone.py
+++ b/nova/api/openstack/compute/contrib/availability_zone.py
@@ -18,7 +18,7 @@ from nova.api.openstack import extensions
class Availability_zone(extensions.ExtensionDescriptor):
- """Add availability_zone to the Create Server v1.1 API"""
+ """Add availability_zone to the Create Server v1.1 API."""
name = "AvailabilityZone"
alias = "os-availability-zone"
diff --git a/nova/api/openstack/compute/contrib/certificates.py b/nova/api/openstack/compute/contrib/certificates.py
index 11d819315..d2ce7bc5d 100644
--- a/nova/api/openstack/compute/contrib/certificates.py
+++ b/nova/api/openstack/compute/contrib/certificates.py
@@ -88,7 +88,7 @@ class CertificatesController(object):
class Certificates(extensions.ExtensionDescriptor):
- """Certificates support"""
+ """Certificates support."""
name = "Certificates"
alias = "os-certificates"
diff --git a/nova/api/openstack/compute/contrib/cloudpipe.py b/nova/api/openstack/compute/contrib/cloudpipe.py
index bb3007735..a58e80282 100644
--- a/nova/api/openstack/compute/contrib/cloudpipe.py
+++ b/nova/api/openstack/compute/contrib/cloudpipe.py
@@ -73,7 +73,7 @@ class CloudpipeController(object):
fileutils.ensure_tree(CONF.keys_path)
def _get_all_cloudpipes(self, context):
- """Get all cloudpipes"""
+ """Get all cloudpipes."""
instances = self.compute_api.get_all(context,
search_opts={'deleted': False})
return [instance for instance in instances
diff --git a/nova/api/openstack/compute/contrib/cloudpipe_update.py b/nova/api/openstack/compute/contrib/cloudpipe_update.py
index b23e7b794..f6ed7bb3a 100644
--- a/nova/api/openstack/compute/contrib/cloudpipe_update.py
+++ b/nova/api/openstack/compute/contrib/cloudpipe_update.py
@@ -35,7 +35,7 @@ class CloudpipeUpdateController(wsgi.Controller):
@wsgi.action("update")
def update(self, req, id, body):
- """Configure cloudpipe parameters for the project"""
+ """Configure cloudpipe parameters for the project."""
context = req.environ['nova.context']
authorize(context)
diff --git a/nova/api/openstack/compute/contrib/config_drive.py b/nova/api/openstack/compute/contrib/config_drive.py
index efdfe13ca..5f1f7b16d 100644
--- a/nova/api/openstack/compute/contrib/config_drive.py
+++ b/nova/api/openstack/compute/contrib/config_drive.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""Config Drive extension"""
+"""Config Drive extension."""
from nova.api.openstack.compute import servers
from nova.api.openstack import extensions
@@ -71,7 +71,7 @@ class Controller(servers.Controller):
class Config_drive(extensions.ExtensionDescriptor):
- """Config Drive Extension"""
+ """Config Drive Extension."""
name = "ConfigDrive"
alias = "os-config-drive"
diff --git a/nova/api/openstack/compute/contrib/coverage_ext.py b/nova/api/openstack/compute/contrib/coverage_ext.py
index 7ad549d4c..875fa6051 100644
--- a/nova/api/openstack/compute/contrib/coverage_ext.py
+++ b/nova/api/openstack/compute/contrib/coverage_ext.py
@@ -43,7 +43,7 @@ authorize = extensions.extension_authorizer('compute', 'coverage_ext')
class CoverageController(object):
- """The Coverage report API controller for the OpenStack API"""
+ """The Coverage report API controller for the OpenStack API."""
def __init__(self):
self.data_path = tempfile.mkdtemp(prefix='nova-coverage_')
data_out = os.path.join(self.data_path, '.nova-coverage')
@@ -60,7 +60,7 @@ class CoverageController(object):
super(CoverageController, self).__init__()
def _find_services(self, req):
- """Returns a list of services"""
+ """Returns a list of services."""
context = req.environ['nova.context']
services = db.service_get_all(context, False)
hosts = []
@@ -69,7 +69,7 @@ class CoverageController(object):
return hosts
def _find_ports(self, req, hosts):
- """Return a list of backdoor ports for all services in the list"""
+ """Return a list of backdoor ports for all services in the list."""
context = req.environ['nova.context']
apicommands = {
@@ -247,7 +247,7 @@ class CoverageController(object):
class Coverage_ext(extensions.ExtensionDescriptor):
- """Enable Nova Coverage"""
+ """Enable Nova Coverage."""
name = "Coverage"
alias = "os-coverage"
diff --git a/nova/api/openstack/compute/contrib/createserverext.py b/nova/api/openstack/compute/contrib/createserverext.py
index 116511fe5..db9838c98 100644
--- a/nova/api/openstack/compute/contrib/createserverext.py
+++ b/nova/api/openstack/compute/contrib/createserverext.py
@@ -18,7 +18,7 @@ from nova.api.openstack import extensions
class Createserverext(extensions.ExtensionDescriptor):
- """Extended support to the Create Server v1.1 API"""
+ """Extended support to the Create Server v1.1 API."""
name = "Createserverext"
alias = "os-create-server-ext"
diff --git a/nova/api/openstack/compute/contrib/deferred_delete.py b/nova/api/openstack/compute/contrib/deferred_delete.py
index 14b608677..94bf63ab4 100644
--- a/nova/api/openstack/compute/contrib/deferred_delete.py
+++ b/nova/api/openstack/compute/contrib/deferred_delete.py
@@ -66,7 +66,7 @@ class DeferredDeleteController(wsgi.Controller):
class Deferred_delete(extensions.ExtensionDescriptor):
- """Instance deferred delete"""
+ """Instance deferred delete."""
name = "DeferredDelete"
alias = "os-deferred-delete"
diff --git a/nova/api/openstack/compute/contrib/disk_config.py b/nova/api/openstack/compute/contrib/disk_config.py
index 903f930fc..4a8fe9ce5 100644
--- a/nova/api/openstack/compute/contrib/disk_config.py
+++ b/nova/api/openstack/compute/contrib/disk_config.py
@@ -170,7 +170,7 @@ class ServerDiskConfigController(wsgi.Controller):
class Disk_config(extensions.ExtensionDescriptor):
- """Disk Management Extension"""
+ """Disk Management Extension."""
name = "DiskConfig"
alias = ALIAS
diff --git a/nova/api/openstack/compute/contrib/extended_status.py b/nova/api/openstack/compute/contrib/extended_status.py
index 759e361da..8a7c67f18 100644
--- a/nova/api/openstack/compute/contrib/extended_status.py
+++ b/nova/api/openstack/compute/contrib/extended_status.py
@@ -61,7 +61,7 @@ class ExtendedStatusController(wsgi.Controller):
class Extended_status(extensions.ExtensionDescriptor):
- """Extended Status support"""
+ """Extended Status support."""
name = "ExtendedStatus"
alias = "OS-EXT-STS"
diff --git a/nova/api/openstack/compute/contrib/fixed_ips.py b/nova/api/openstack/compute/contrib/fixed_ips.py
index da20f5334..e70416bac 100644
--- a/nova/api/openstack/compute/contrib/fixed_ips.py
+++ b/nova/api/openstack/compute/contrib/fixed_ips.py
@@ -78,7 +78,7 @@ class FixedIPController(object):
class Fixed_ips(extensions.ExtensionDescriptor):
- """Fixed IPs support"""
+ """Fixed IPs support."""
name = "FixedIPs"
alias = "os-fixed-ips"
diff --git a/nova/api/openstack/compute/contrib/flavor_access.py b/nova/api/openstack/compute/contrib/flavor_access.py
index 6fd2fc460..78bedb2e2 100644
--- a/nova/api/openstack/compute/contrib/flavor_access.py
+++ b/nova/api/openstack/compute/contrib/flavor_access.py
@@ -202,7 +202,7 @@ class FlavorActionController(wsgi.Controller):
class Flavor_access(extensions.ExtensionDescriptor):
- """Flavor access supprt"""
+ """Flavor access supprt."""
name = "FlavorAccess"
alias = "os-flavor-access"
diff --git a/nova/api/openstack/compute/contrib/flavor_disabled.py b/nova/api/openstack/compute/contrib/flavor_disabled.py
index 48181954b..62f902409 100644
--- a/nova/api/openstack/compute/contrib/flavor_disabled.py
+++ b/nova/api/openstack/compute/contrib/flavor_disabled.py
@@ -53,7 +53,7 @@ class FlavorDisabledController(wsgi.Controller):
class Flavor_disabled(extensions.ExtensionDescriptor):
- """Support to show the disabled status of a flavor"""
+ """Support to show the disabled status of a flavor."""
name = "FlavorDisabled"
alias = "OS-FLV-DISABLED"
diff --git a/nova/api/openstack/compute/contrib/flavor_rxtx.py b/nova/api/openstack/compute/contrib/flavor_rxtx.py
index 6dce1bee1..84ccd0c60 100644
--- a/nova/api/openstack/compute/contrib/flavor_rxtx.py
+++ b/nova/api/openstack/compute/contrib/flavor_rxtx.py
@@ -53,7 +53,7 @@ class FlavorRxtxController(wsgi.Controller):
class Flavor_rxtx(extensions.ExtensionDescriptor):
- """Support to show the rxtx status of a flavor"""
+ """Support to show the rxtx status of a flavor."""
name = "FlavorRxtx"
alias = "os-flavor-rxtx"
diff --git a/nova/api/openstack/compute/contrib/flavor_swap.py b/nova/api/openstack/compute/contrib/flavor_swap.py
index 8e0277979..707b3e3fa 100644
--- a/nova/api/openstack/compute/contrib/flavor_swap.py
+++ b/nova/api/openstack/compute/contrib/flavor_swap.py
@@ -53,7 +53,7 @@ class FlavorSwapController(wsgi.Controller):
class Flavor_swap(extensions.ExtensionDescriptor):
- """Support to show the swap status of a flavor"""
+ """Support to show the swap status of a flavor."""
name = "FlavorSwap"
alias = "os-flavor-swap"
diff --git a/nova/api/openstack/compute/contrib/flavorextradata.py b/nova/api/openstack/compute/contrib/flavorextradata.py
index e2bdadf16..8f9640c98 100644
--- a/nova/api/openstack/compute/contrib/flavorextradata.py
+++ b/nova/api/openstack/compute/contrib/flavorextradata.py
@@ -63,7 +63,7 @@ class FlavorextradataController(wsgi.Controller):
class Flavorextradata(extensions.ExtensionDescriptor):
- """Provide additional data for flavors"""
+ """Provide additional data for flavors."""
name = "FlavorExtraData"
alias = "OS-FLV-EXT-DATA"
diff --git a/nova/api/openstack/compute/contrib/flavorextraspecs.py b/nova/api/openstack/compute/contrib/flavorextraspecs.py
index 1abb525ad..4a27579a2 100644
--- a/nova/api/openstack/compute/contrib/flavorextraspecs.py
+++ b/nova/api/openstack/compute/contrib/flavorextraspecs.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""The instance type extra specs extension"""
+"""The instance type extra specs extension."""
from webob import exc
@@ -35,7 +35,7 @@ class ExtraSpecsTemplate(xmlutil.TemplateBuilder):
class FlavorExtraSpecsController(object):
- """The flavor extra specs API controller for the OpenStack API """
+ """The flavor extra specs API controller for the OpenStack API."""
def _get_extra_specs(self, context, flavor_id):
extra_specs = db.instance_type_extra_specs_get(context, flavor_id)
@@ -51,7 +51,7 @@ class FlavorExtraSpecsController(object):
@wsgi.serializers(xml=ExtraSpecsTemplate)
def index(self, req, flavor_id):
- """Returns the list of extra specs for a givenflavor """
+ """Returns the list of extra specs for a givenflavor."""
context = req.environ['nova.context']
authorize(context)
return self._get_extra_specs(context, flavor_id)
@@ -92,7 +92,7 @@ class FlavorExtraSpecsController(object):
@wsgi.serializers(xml=ExtraSpecsTemplate)
def show(self, req, flavor_id, id):
- """Return a single extra spec item """
+ """Return a single extra spec item."""
context = req.environ['nova.context']
authorize(context)
specs = self._get_extra_specs(context, flavor_id)
@@ -102,14 +102,14 @@ class FlavorExtraSpecsController(object):
raise exc.HTTPNotFound()
def delete(self, req, flavor_id, id):
- """Deletes an existing extra spec """
+ """Deletes an existing extra spec."""
context = req.environ['nova.context']
authorize(context)
db.instance_type_extra_specs_delete(context, flavor_id, id)
class Flavorextraspecs(extensions.ExtensionDescriptor):
- """Instance type (flavor) extra specs"""
+ """Instance type (flavor) extra specs."""
name = "FlavorExtraSpecs"
alias = "os-flavor-extra-specs"
diff --git a/nova/api/openstack/compute/contrib/floating_ip_dns.py b/nova/api/openstack/compute/contrib/floating_ip_dns.py
index 667bec294..fbea0acf9 100644
--- a/nova/api/openstack/compute/contrib/floating_ip_dns.py
+++ b/nova/api/openstack/compute/contrib/floating_ip_dns.py
@@ -129,7 +129,7 @@ def _create_domain_entry(domain, scope=None, project=None, av_zone=None):
class FloatingIPDNSDomainController(object):
- """DNS domain controller for OpenStack API"""
+ """DNS domain controller for OpenStack API."""
def __init__(self):
self.network_api = network.API()
@@ -151,7 +151,7 @@ class FloatingIPDNSDomainController(object):
@wsgi.serializers(xml=DomainTemplate)
def update(self, req, id, body):
- """Add or modify domain entry"""
+ """Add or modify domain entry."""
context = req.environ['nova.context']
authorize(context)
fqdomain = _unquote_domain(id)
@@ -179,7 +179,7 @@ class FloatingIPDNSDomainController(object):
area_name: area})
def delete(self, req, id):
- """Delete the domain identified by id. """
+ """Delete the domain identified by id."""
context = req.environ['nova.context']
authorize(context)
domain = _unquote_domain(id)
@@ -194,7 +194,7 @@ class FloatingIPDNSDomainController(object):
class FloatingIPDNSEntryController(object):
- """DNS Entry controller for OpenStack API"""
+ """DNS Entry controller for OpenStack API."""
def __init__(self):
self.network_api = network.API()
@@ -235,7 +235,7 @@ class FloatingIPDNSEntryController(object):
@wsgi.serializers(xml=FloatingIPDNSTemplate)
def update(self, req, domain_id, id, body):
- """Add or modify dns entry"""
+ """Add or modify dns entry."""
context = req.environ['nova.context']
authorize(context)
domain = _unquote_domain(domain_id)
@@ -263,7 +263,7 @@ class FloatingIPDNSEntryController(object):
'domain': domain})
def delete(self, req, domain_id, id):
- """Delete the entry identified by req and id. """
+ """Delete the entry identified by req and id."""
context = req.environ['nova.context']
authorize(context)
domain = _unquote_domain(domain_id)
@@ -278,7 +278,7 @@ class FloatingIPDNSEntryController(object):
class Floating_ip_dns(extensions.ExtensionDescriptor):
- """Floating IP DNS support"""
+ """Floating IP DNS support."""
name = "FloatingIpDns"
alias = "os-floating-ip-dns"
diff --git a/nova/api/openstack/compute/contrib/floating_ip_pools.py b/nova/api/openstack/compute/contrib/floating_ip_pools.py
index abd422f0d..3361230dd 100644
--- a/nova/api/openstack/compute/contrib/floating_ip_pools.py
+++ b/nova/api/openstack/compute/contrib/floating_ip_pools.py
@@ -76,7 +76,7 @@ class FloatingIPPoolsController(object):
class Floating_ip_pools(extensions.ExtensionDescriptor):
- """Floating IPs support"""
+ """Floating IPs support."""
name = "FloatingIpPools"
alias = "os-floating-ip-pools"
diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py
index c2e1cadce..3f00136f5 100644
--- a/nova/api/openstack/compute/contrib/floating_ips.py
+++ b/nova/api/openstack/compute/contrib/floating_ips.py
@@ -317,7 +317,7 @@ class FloatingIPActionController(wsgi.Controller):
class Floating_ips(extensions.ExtensionDescriptor):
- """Floating IPs support"""
+ """Floating IPs support."""
name = "FloatingIps"
alias = "os-floating-ips"
diff --git a/nova/api/openstack/compute/contrib/floating_ips_bulk.py b/nova/api/openstack/compute/contrib/floating_ips_bulk.py
index cbd95d2d6..f5b8d24dd 100644
--- a/nova/api/openstack/compute/contrib/floating_ips_bulk.py
+++ b/nova/api/openstack/compute/contrib/floating_ips_bulk.py
@@ -36,14 +36,14 @@ authorize = extensions.extension_authorizer('compute', 'floating_ips_bulk')
class FloatingIPBulkController(object):
def index(self, req):
- """Return a list of all floating ips"""
+ """Return a list of all floating ips."""
context = req.environ['nova.context']
authorize(context)
return self._get_floating_ip_info(context)
def show(self, req, id):
- """Return a list of all floating ips for a given host"""
+ """Return a list of all floating ips for a given host."""
context = req.environ['nova.context']
authorize(context)
@@ -76,7 +76,7 @@ class FloatingIPBulkController(object):
return floating_ip_info
def create(self, req, body):
- """Bulk create floating ips"""
+ """Bulk create floating ips."""
context = req.environ['nova.context']
authorize(context)
@@ -111,7 +111,7 @@ class FloatingIPBulkController(object):
"interface": interface}}
def update(self, req, id, body):
- """Bulk delete floating IPs"""
+ """Bulk delete floating IPs."""
context = req.environ['nova.context']
authorize(context)
@@ -154,7 +154,7 @@ class FloatingIPBulkController(object):
class Floating_ips_bulk(extensions.ExtensionDescriptor):
- """Bulk handling of Floating IPs"""
+ """Bulk handling of Floating IPs."""
name = "FloatingIpsBulk"
alias = "os-floating-ips-bulk"
diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py
index 2401147f4..9812ceba3 100644
--- a/nova/api/openstack/compute/contrib/hosts.py
+++ b/nova/api/openstack/compute/contrib/hosts.py
@@ -298,7 +298,7 @@ class HostController(object):
class Hosts(extensions.ExtensionDescriptor):
- """Admin-only host administration"""
+ """Admin-only host administration."""
name = "Hosts"
alias = "os-hosts"
diff --git a/nova/api/openstack/compute/contrib/hypervisors.py b/nova/api/openstack/compute/contrib/hypervisors.py
index 2760e6c19..6580212a9 100644
--- a/nova/api/openstack/compute/contrib/hypervisors.py
+++ b/nova/api/openstack/compute/contrib/hypervisors.py
@@ -241,7 +241,7 @@ class HypervisorsController(object):
class Hypervisors(extensions.ExtensionDescriptor):
- """Admin-only hypervisor administration"""
+ """Admin-only hypervisor administration."""
name = "Hypervisors"
alias = "os-hypervisors"
diff --git a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py
index 5d4db686c..4b0afdecf 100644
--- a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py
+++ b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py
@@ -122,7 +122,7 @@ class InstanceUsageAuditLogController(object):
class Instance_usage_audit_log(extensions.ExtensionDescriptor):
- """Admin-only Task Log Monitoring"""
+ """Admin-only Task Log Monitoring."""
name = "OSInstanceUsageAuditLog"
alias = "os-instance_usage_audit_log"
namespace = "http://docs.openstack.org/ext/services/api/v1.1"
diff --git a/nova/api/openstack/compute/contrib/keypairs.py b/nova/api/openstack/compute/contrib/keypairs.py
index 9b3b39384..ef93fb048 100644
--- a/nova/api/openstack/compute/contrib/keypairs.py
+++ b/nova/api/openstack/compute/contrib/keypairs.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""Keypair management extension"""
+"""Keypair management extension."""
import webob
import webob.exc
@@ -49,7 +49,7 @@ class KeypairsTemplate(xmlutil.TemplateBuilder):
class KeypairController(object):
- """Keypair API controller for the OpenStack API """
+ """Keypair API controller for the OpenStack API."""
def __init__(self):
self.api = compute_api.KeypairAPI()
@@ -187,7 +187,7 @@ class Controller(servers.Controller):
class Keypairs(extensions.ExtensionDescriptor):
- """Keypair Support"""
+ """Keypair Support."""
name = "Keypairs"
alias = "os-keypairs"
diff --git a/nova/api/openstack/compute/contrib/multinic.py b/nova/api/openstack/compute/contrib/multinic.py
index 29409c050..7017422a1 100644
--- a/nova/api/openstack/compute/contrib/multinic.py
+++ b/nova/api/openstack/compute/contrib/multinic.py
@@ -84,7 +84,7 @@ class MultinicController(wsgi.Controller):
# Note: The class name is as it has to be for this to be loaded as an
# extension--only first character capitalized.
class Multinic(extensions.ExtensionDescriptor):
- """Multiple network support"""
+ """Multiple network support."""
name = "Multinic"
alias = "NMN"
diff --git a/nova/api/openstack/compute/contrib/multiple_create.py b/nova/api/openstack/compute/contrib/multiple_create.py
index 9b3ca8a57..cbad2d439 100644
--- a/nova/api/openstack/compute/contrib/multiple_create.py
+++ b/nova/api/openstack/compute/contrib/multiple_create.py
@@ -18,7 +18,7 @@ from nova.api.openstack import extensions
class Multiple_create(extensions.ExtensionDescriptor):
- """Allow multiple create in the Create Server v1.1 API"""
+ """Allow multiple create in the Create Server v1.1 API."""
name = "MultipleCreate"
alias = "os-multiple-create"
diff --git a/nova/api/openstack/compute/contrib/networks.py b/nova/api/openstack/compute/contrib/networks.py
index 9689a2451..e21c06813 100644
--- a/nova/api/openstack/compute/contrib/networks.py
+++ b/nova/api/openstack/compute/contrib/networks.py
@@ -150,7 +150,7 @@ class NetworkController(wsgi.Controller):
class Networks(extensions.ExtensionDescriptor):
- """Admin-only Network Management Extension"""
+ """Admin-only Network Management Extension."""
name = "Networks"
alias = "os-networks"
diff --git a/nova/api/openstack/compute/contrib/networks_associate.py b/nova/api/openstack/compute/contrib/networks_associate.py
index 10f6e7d8e..3cdda1d76 100644
--- a/nova/api/openstack/compute/contrib/networks_associate.py
+++ b/nova/api/openstack/compute/contrib/networks_associate.py
@@ -52,7 +52,7 @@ class NetworkAssociateActionController(wsgi.Controller):
class Networks_associate(extensions.ExtensionDescriptor):
- """Network association support"""
+ """Network association support."""
name = "NetworkAssociationSupport"
alias = "os-networks-associate"
diff --git a/nova/api/openstack/compute/contrib/quota_classes.py b/nova/api/openstack/compute/contrib/quota_classes.py
index 437b58005..f3f5b9b08 100644
--- a/nova/api/openstack/compute/contrib/quota_classes.py
+++ b/nova/api/openstack/compute/contrib/quota_classes.py
@@ -45,7 +45,7 @@ class QuotaClassTemplate(xmlutil.TemplateBuilder):
class QuotaClassSetsController(object):
def _format_quota_set(self, quota_class, quota_set):
- """Convert the quota object to a result dict"""
+ """Convert the quota object to a result dict."""
result = dict(id=str(quota_class))
@@ -84,7 +84,7 @@ class QuotaClassSetsController(object):
class Quota_classes(extensions.ExtensionDescriptor):
- """Quota classes management support"""
+ """Quota classes management support."""
name = "QuotaClasses"
alias = "os-quota-class-sets"
diff --git a/nova/api/openstack/compute/contrib/quotas.py b/nova/api/openstack/compute/contrib/quotas.py
index 33584badc..bdf82ea86 100644
--- a/nova/api/openstack/compute/contrib/quotas.py
+++ b/nova/api/openstack/compute/contrib/quotas.py
@@ -48,7 +48,7 @@ class QuotaTemplate(xmlutil.TemplateBuilder):
class QuotaSetsController(object):
def _format_quota_set(self, project_id, quota_set):
- """Convert the quota object to a result dict"""
+ """Convert the quota object to a result dict."""
result = dict(id=str(project_id))
@@ -106,7 +106,7 @@ class QuotaSetsController(object):
class Quotas(extensions.ExtensionDescriptor):
- """Quotas management support"""
+ """Quotas management support."""
name = "Quotas"
alias = "os-quota-sets"
diff --git a/nova/api/openstack/compute/contrib/rescue.py b/nova/api/openstack/compute/contrib/rescue.py
index ce3dfaf97..29135418e 100644
--- a/nova/api/openstack/compute/contrib/rescue.py
+++ b/nova/api/openstack/compute/contrib/rescue.py
@@ -81,7 +81,7 @@ class RescueController(wsgi.Controller):
class Rescue(exts.ExtensionDescriptor):
- """Instance rescue mode"""
+ """Instance rescue mode."""
name = "Rescue"
alias = "os-rescue"
diff --git a/nova/api/openstack/compute/contrib/scheduler_hints.py b/nova/api/openstack/compute/contrib/scheduler_hints.py
index f5c10fea1..5e54fbd37 100644
--- a/nova/api/openstack/compute/contrib/scheduler_hints.py
+++ b/nova/api/openstack/compute/contrib/scheduler_hints.py
@@ -53,7 +53,7 @@ class SchedulerHintsController(wsgi.Controller):
class Scheduler_hints(extensions.ExtensionDescriptor):
- """Pass arbitrary key/value pairs to the scheduler"""
+ """Pass arbitrary key/value pairs to the scheduler."""
name = "SchedulerHints"
alias = "OS-SCH-HNT"
diff --git a/nova/api/openstack/compute/contrib/security_groups.py b/nova/api/openstack/compute/contrib/security_groups.py
index 73f025c4d..a15c395ae 100644
--- a/nova/api/openstack/compute/contrib/security_groups.py
+++ b/nova/api/openstack/compute/contrib/security_groups.py
@@ -107,7 +107,7 @@ class SecurityGroupXMLDeserializer(wsgi.MetadataXMLDeserializer):
Deserializer to handle xml-formatted security group requests.
"""
def default(self, string):
- """Deserialize an xml-formatted security group create request"""
+ """Deserialize an xml-formatted security group create request."""
dom = minidom.parseString(string)
security_group = {}
sg_node = self.find_first_child_named(dom,
@@ -128,13 +128,13 @@ class SecurityGroupRulesXMLDeserializer(wsgi.MetadataXMLDeserializer):
"""
def default(self, string):
- """Deserialize an xml-formatted security group create request"""
+ """Deserialize an xml-formatted security group create request."""
dom = minidom.parseString(string)
security_group_rule = self._extract_security_group_rule(dom)
return {'body': {'security_group_rule': security_group_rule}}
def _extract_security_group_rule(self, node):
- """Marshal the security group rule attribute of a parsed request"""
+ """Marshal the security group rule attribute of a parsed request."""
sg_rule = {}
sg_rule_node = self.find_first_child_named(node,
'security_group_rule')
@@ -261,7 +261,7 @@ class SecurityGroupController(SecurityGroupControllerBase):
@wsgi.serializers(xml=SecurityGroupsTemplate)
def index(self, req):
- """Returns a list of security groups"""
+ """Returns a list of security groups."""
context = self._authorize_context(req)
search_opts = {}
@@ -522,7 +522,7 @@ class SecurityGroupServersTemplate(xmlutil.TemplateBuilder):
class Security_groups(extensions.ExtensionDescriptor):
- """Security group support"""
+ """Security group support."""
name = "SecurityGroups"
alias = "os-security-groups"
namespace = "http://docs.openstack.org/compute/ext/securitygroups/api/v1.1"
diff --git a/nova/api/openstack/compute/contrib/server_diagnostics.py b/nova/api/openstack/compute/contrib/server_diagnostics.py
index 2bd020e43..1be4b664c 100644
--- a/nova/api/openstack/compute/contrib/server_diagnostics.py
+++ b/nova/api/openstack/compute/contrib/server_diagnostics.py
@@ -50,7 +50,7 @@ class ServerDiagnosticsController(object):
class Server_diagnostics(extensions.ExtensionDescriptor):
- """Allow Admins to view server diagnostics through server action"""
+ """Allow Admins to view server diagnostics through server action."""
name = "ServerDiagnostics"
alias = "os-server-diagnostics"
diff --git a/nova/api/openstack/compute/contrib/server_start_stop.py b/nova/api/openstack/compute/contrib/server_start_stop.py
index 049fa393b..733972083 100644
--- a/nova/api/openstack/compute/contrib/server_start_stop.py
+++ b/nova/api/openstack/compute/contrib/server_start_stop.py
@@ -40,7 +40,7 @@ class ServerStartStopActionController(wsgi.Controller):
@wsgi.action('os-start')
def _start_server(self, req, id, body):
- """Start an instance. """
+ """Start an instance."""
context = req.environ['nova.context']
instance = self._get_instance(context, id)
LOG.debug(_('start instance'), instance=instance)
@@ -58,7 +58,7 @@ class ServerStartStopActionController(wsgi.Controller):
class Server_start_stop(extensions.ExtensionDescriptor):
- """Start/Stop instance compute API support"""
+ """Start/Stop instance compute API support."""
name = "ServerStartStop"
alias = "os-server-start-stop"
diff --git a/nova/api/openstack/compute/contrib/services.py b/nova/api/openstack/compute/contrib/services.py
index 3114c3ae4..dad77e61b 100644
--- a/nova/api/openstack/compute/contrib/services.py
+++ b/nova/api/openstack/compute/contrib/services.py
@@ -97,7 +97,7 @@ class ServiceController(object):
@wsgi.serializers(xml=ServicesUpdateTemplate)
def update(self, req, id, body):
- """Enable/Disable scheduling for a service"""
+ """Enable/Disable scheduling for a service."""
context = req.environ['nova.context']
authorize(context)
@@ -127,7 +127,7 @@ class ServiceController(object):
class Services(extensions.ExtensionDescriptor):
- """Services support"""
+ """Services support."""
name = "Services"
alias = "os-services"
diff --git a/nova/api/openstack/compute/contrib/simple_tenant_usage.py b/nova/api/openstack/compute/contrib/simple_tenant_usage.py
index 9fc2e97fb..8502e93c4 100644
--- a/nova/api/openstack/compute/contrib/simple_tenant_usage.py
+++ b/nova/api/openstack/compute/contrib/simple_tenant_usage.py
@@ -209,7 +209,7 @@ class SimpleTenantUsageController(object):
@wsgi.serializers(xml=SimpleTenantUsagesTemplate)
def index(self, req):
- """Retrieve tenant_usage for all tenants"""
+ """Retrieve tenant_usage for all tenants."""
context = req.environ['nova.context']
authorize_list(context)
@@ -226,7 +226,7 @@ class SimpleTenantUsageController(object):
@wsgi.serializers(xml=SimpleTenantUsageTemplate)
def show(self, req, id):
- """Retrieve tenant_usage for a specified tenant"""
+ """Retrieve tenant_usage for a specified tenant."""
tenant_id = id
context = req.environ['nova.context']
@@ -249,7 +249,7 @@ class SimpleTenantUsageController(object):
class Simple_tenant_usage(extensions.ExtensionDescriptor):
- """Simple tenant usage extension"""
+ """Simple tenant usage extension."""
name = "SimpleTenantUsage"
alias = "os-simple-tenant-usage"
diff --git a/nova/api/openstack/compute/contrib/user_data.py b/nova/api/openstack/compute/contrib/user_data.py
index debd1176e..1f58c102d 100644
--- a/nova/api/openstack/compute/contrib/user_data.py
+++ b/nova/api/openstack/compute/contrib/user_data.py
@@ -18,7 +18,7 @@ from nova.api.openstack import extensions
class User_data(extensions.ExtensionDescriptor):
- """Add user_data to the Create Server v1.1 API"""
+ """Add user_data to the Create Server v1.1 API."""
name = "UserData"
alias = "os-user-data"
diff --git a/nova/api/openstack/compute/contrib/virtual_interfaces.py b/nova/api/openstack/compute/contrib/virtual_interfaces.py
index 1e5d0342d..50c26d754 100644
--- a/nova/api/openstack/compute/contrib/virtual_interfaces.py
+++ b/nova/api/openstack/compute/contrib/virtual_interfaces.py
@@ -77,7 +77,7 @@ class ServerVirtualInterfaceController(object):
class Virtual_interfaces(extensions.ExtensionDescriptor):
- """Virtual interface support"""
+ """Virtual interface support."""
name = "VirtualInterfaces"
alias = "os-virtual-interfaces"
diff --git a/nova/api/openstack/compute/contrib/volumes.py b/nova/api/openstack/compute/contrib/volumes.py
index 9564921f4..47c717495 100644
--- a/nova/api/openstack/compute/contrib/volumes.py
+++ b/nova/api/openstack/compute/contrib/volumes.py
@@ -616,7 +616,7 @@ class SnapshotController(wsgi.Controller):
class Volumes(extensions.ExtensionDescriptor):
- """Volumes support"""
+ """Volumes support."""
name = "Volumes"
alias = "os-volumes"
diff --git a/nova/api/openstack/compute/image_metadata.py b/nova/api/openstack/compute/image_metadata.py
index 0c673f35e..1a467f3a7 100644
--- a/nova/api/openstack/compute/image_metadata.py
+++ b/nova/api/openstack/compute/image_metadata.py
@@ -24,7 +24,7 @@ from nova.image import glance
class Controller(object):
- """The image metadata API controller for the OpenStack API"""
+ """The image metadata API controller for the OpenStack API."""
def __init__(self):
self.image_service = glance.get_default_image_service()
@@ -38,7 +38,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetadataTemplate)
def index(self, req, image_id):
- """Returns the list of metadata for a given instance"""
+ """Returns the list of metadata for a given instance."""
context = req.environ['nova.context']
metadata = self._get_image(context, image_id)['properties']
return dict(metadata=metadata)
diff --git a/nova/api/openstack/compute/server_metadata.py b/nova/api/openstack/compute/server_metadata.py
index 910d88c30..023a054d0 100644
--- a/nova/api/openstack/compute/server_metadata.py
+++ b/nova/api/openstack/compute/server_metadata.py
@@ -24,7 +24,7 @@ from nova import exception
class Controller(object):
- """The server metadata API controller for the OpenStack API """
+ """The server metadata API controller for the OpenStack API."""
def __init__(self):
self.compute_api = compute.API()
@@ -45,7 +45,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetadataTemplate)
def index(self, req, server_id):
- """Returns the list of metadata for a given instance """
+ """Returns the list of metadata for a given instance."""
context = req.environ['nova.context']
return {'metadata': self._get_metadata(context, server_id)}
@@ -138,7 +138,7 @@ class Controller(object):
@wsgi.serializers(xml=common.MetaItemTemplate)
def show(self, req, server_id, id):
- """Return a single metadata item """
+ """Return a single metadata item."""
context = req.environ['nova.context']
data = self._get_metadata(context, server_id)
@@ -150,7 +150,7 @@ class Controller(object):
@wsgi.response(204)
def delete(self, req, server_id, id):
- """Deletes an existing metadata """
+ """Deletes an existing metadata."""
context = req.environ['nova.context']
metadata = self._get_metadata(context, server_id)
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 196baf7a1..d3a6fc8a9 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -230,7 +230,7 @@ class CommonDeserializer(wsgi.MetadataXMLDeserializer):
return server
def _extract_block_device_mapping(self, server_node):
- """Marshal the block_device_mapping node of a parsed request"""
+ """Marshal the block_device_mapping node of a parsed request."""
node = self.find_first_child_named(server_node, "block_device_mapping")
if node:
block_device_mapping = []
@@ -255,7 +255,7 @@ class CommonDeserializer(wsgi.MetadataXMLDeserializer):
return None
def _extract_scheduler_hints(self, server_node):
- """Marshal the scheduler hints attribute of a parsed request"""
+ """Marshal the scheduler hints attribute of a parsed request."""
node = self.find_first_child_named_in_namespace(server_node,
"http://docs.openstack.org/compute/ext/scheduler-hints/api/v2",
"scheduler_hints")
diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py
index d28345dd8..519669134 100644
--- a/nova/api/openstack/wsgi.py
+++ b/nova/api/openstack/wsgi.py
@@ -181,7 +181,7 @@ class ActionDispatcher(object):
class TextDeserializer(ActionDispatcher):
- """Default request body deserialization"""
+ """Default request body deserialization."""
def deserialize(self, datastring, action='default'):
return self.dispatch(datastring, action=action)
@@ -245,7 +245,7 @@ class XMLDeserializer(TextDeserializer):
return result
def find_first_child_named_in_namespace(self, parent, namespace, name):
- """Search a nodes children for the first child with a given name"""
+ """Search a nodes children for the first child with a given name."""
for node in parent.childNodes:
if (node.localName == name and
node.namespaceURI and
@@ -254,20 +254,20 @@ class XMLDeserializer(TextDeserializer):
return None
def find_first_child_named(self, parent, name):
- """Search a nodes children for the first child with a given name"""
+ """Search a nodes children for the first child with a given name."""
for node in parent.childNodes:
if node.localName == name:
return node
return None
def find_children_named(self, parent, name):
- """Return all of a nodes children who have the given name"""
+ """Return all of a nodes children who have the given name."""
for node in parent.childNodes:
if node.localName == name:
yield node
def extract_text(self, node):
- """Get the text field contained by the given node"""
+ """Get the text field contained by the given node."""
if len(node.childNodes) == 1:
child = node.childNodes[0]
if child.nodeType == child.TEXT_NODE:
@@ -275,7 +275,7 @@ class XMLDeserializer(TextDeserializer):
return ""
def extract_elements(self, node):
- """Get only Element type childs from node"""
+ """Get only Element type childs from node."""
elements = []
for child in node.childNodes:
if child.nodeType == child.ELEMENT_NODE:
@@ -283,7 +283,7 @@ class XMLDeserializer(TextDeserializer):
return elements
def find_attribute_or_element(self, parent, name):
- """Get an attribute value; fallback to an element if not found"""
+ """Get an attribute value; fallback to an element if not found."""
if parent.hasAttribute(name):
return parent.getAttribute(name)
@@ -300,7 +300,7 @@ class XMLDeserializer(TextDeserializer):
class MetadataXMLDeserializer(XMLDeserializer):
def extract_metadata(self, metadata_node):
- """Marshal the metadata attribute of a parsed request"""
+ """Marshal the metadata attribute of a parsed request."""
metadata = {}
if metadata_node is not None:
for meta_node in self.find_children_named(metadata_node, "meta"):
@@ -310,7 +310,7 @@ class MetadataXMLDeserializer(XMLDeserializer):
class DictSerializer(ActionDispatcher):
- """Default request body serialization"""
+ """Default request body serialization."""
def serialize(self, data, action='default'):
return self.dispatch(data, action=action)
@@ -320,7 +320,7 @@ class DictSerializer(ActionDispatcher):
class JSONDictSerializer(DictSerializer):
- """Default JSON request body serialization"""
+ """Default JSON request body serialization."""
def default(self, data):
return jsonutils.dumps(data)
diff --git a/nova/api/validator.py b/nova/api/validator.py
index beee370b9..ddcc3ed2a 100644
--- a/nova/api/validator.py
+++ b/nova/api/validator.py
@@ -101,7 +101,7 @@ def validate_ipv4(addr):
def validate_user_data(user_data):
- """Check if the user_data is encoded properly"""
+ """Check if the user_data is encoded properly."""
try:
user_data = base64.b64decode(user_data)
except TypeError: