pep8 fixes
This commit is contained in:
@@ -141,6 +141,7 @@ class APIRouter(wsgi.Router):
|
||||
|
||||
super(APIRouter, self).__init__(mapper)
|
||||
|
||||
|
||||
class APIRouterV10(APIRouter):
|
||||
"""Define routes specific to OpenStack API V1.0."""
|
||||
|
||||
|
||||
@@ -62,17 +62,17 @@ def _translate_summary_view(context, vol):
|
||||
|
||||
class Controller(wsgi.Controller):
|
||||
""" The volume attachment API controller for the Openstack API
|
||||
|
||||
|
||||
A child resource of the server. Note that we use the volume id
|
||||
as the ID of the attachment (though this is not guaranteed externally)"""
|
||||
|
||||
_serialization_metadata = {
|
||||
'application/xml': {
|
||||
'attributes': {
|
||||
'volumeAttachment': [ 'id',
|
||||
'serverId',
|
||||
'volumeId',
|
||||
'device' ]}}}
|
||||
'volumeAttachment': ['id',
|
||||
'serverId',
|
||||
'volumeId',
|
||||
'device']}}}
|
||||
|
||||
def __init__(self):
|
||||
self.compute_api = compute.API()
|
||||
|
||||
@@ -226,7 +226,7 @@ class TestOpenStackClient(object):
|
||||
def get_server_volume(self, server_id, attachment_id):
|
||||
return self.api_get('/servers/%s/volume_attachments/%s' %
|
||||
(server_id, attachment_id))['volumeAttachment']
|
||||
|
||||
|
||||
def get_server_volumes(self, server_id):
|
||||
return self.api_get('/servers/%s/volume_attachments' %
|
||||
(server_id))['volumeAttachments']
|
||||
|
||||
@@ -159,8 +159,8 @@ class VolumesTest(integrated_helpers._IntegratedTestBase):
|
||||
|
||||
# Template attach request
|
||||
device = '/dev/sdc'
|
||||
attach_req = { 'device': device }
|
||||
post_req = { 'volumeAttachment': attach_req }
|
||||
attach_req = {'device': device}
|
||||
post_req = {'volumeAttachment': attach_req}
|
||||
|
||||
# Try to attach to a non-existent volume; should fail
|
||||
attach_req['volumeId'] = 3405691582
|
||||
|
||||
Reference in New Issue
Block a user