Fix Pep8 1.4.6 warnings
Pep8 1.4.6 fixes some missed occassions of the indentation checks. Change-Id: Ie87005a9b204db70d4b22bc28425758b282b1eb0
This commit is contained in:
parent
8160ae2933
commit
6a4fc92cee
@ -372,7 +372,7 @@ def _dict_diff(a, b):
|
||||
'%(key)s: master "%(master_value)s" vs '
|
||||
'slave "%(slave_value)s"') %
|
||||
{'key': key, 'master_value': a[key],
|
||||
'slave_value': b[key]})
|
||||
'slave_value': b[key]})
|
||||
return True
|
||||
|
||||
return False
|
||||
|
@ -44,19 +44,19 @@ paste_deploy_opts = [
|
||||
common_opts = [
|
||||
cfg.BoolOpt('allow_additional_image_properties', default=True,
|
||||
help=_('Whether to allow users to specify image properties '
|
||||
'beyond what the image schema provides')),
|
||||
'beyond what the image schema provides')),
|
||||
cfg.StrOpt('data_api', default='glance.db.sqlalchemy.api',
|
||||
help=_('Python module path of data access API')),
|
||||
cfg.IntOpt('limit_param_default', default=25,
|
||||
help=_('Default value for the number of items returned by a '
|
||||
'request if not specified explicitly in the request')),
|
||||
'request if not specified explicitly in the request')),
|
||||
cfg.IntOpt('api_limit_max', default=1000,
|
||||
help=_('Maximum permissible number of items that could be '
|
||||
'returned by a request')),
|
||||
'returned by a request')),
|
||||
cfg.BoolOpt('show_image_direct_url', default=False,
|
||||
help=_('Whether to include the backend image storage location '
|
||||
'in image properties. Revealing storage location can be a '
|
||||
'security risk, so use this setting with caution!')),
|
||||
'in image properties. Revealing storage location can be'
|
||||
'a security risk, so use this setting with caution!')),
|
||||
cfg.BoolOpt('show_multiple_locations', default=False,
|
||||
help=_('Whether to include the backend image locations '
|
||||
'in image properties. Revealing storage location can '
|
||||
|
@ -43,10 +43,10 @@ rabbit_opts = [
|
||||
help=_('The virtual host used in the rabbitmq connection.')),
|
||||
cfg.StrOpt('rabbit_notification_exchange', default='glance',
|
||||
help=_('Exchange name to use for connection when using rabbit'
|
||||
' strategy.')),
|
||||
' strategy.')),
|
||||
cfg.StrOpt('rabbit_notification_topic', default='notifications',
|
||||
help=_('Topic to use for connection when using rabbit '
|
||||
'strategy.')),
|
||||
'strategy.')),
|
||||
cfg.IntOpt('rabbit_max_retries', default=0,
|
||||
help=_('The maximum number of times to attempt to connect to '
|
||||
'the AMQP server.')),
|
||||
|
@ -474,27 +474,27 @@ class TestSSL(functional.FunctionalTest):
|
||||
"status": "CURRENT",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v2/" % self.api_port}]}, {
|
||||
"id": "v2.1",
|
||||
"status": "SUPPORTED",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v2/" % self.api_port}]}, {
|
||||
"id": "v2.0",
|
||||
"status": "SUPPORTED",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v2/" % self.api_port}]}, {
|
||||
"id": "v1.1",
|
||||
"status": "CURRENT",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v1/" % self.api_port}]}, {
|
||||
"id": "v1.0",
|
||||
"status": "SUPPORTED",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v1/" % self.api_port}]}]}
|
||||
"href": "https://127.0.0.1:%d/v2/" % self.api_port}]},
|
||||
{"id": "v2.1",
|
||||
"status": "SUPPORTED",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v2/" % self.api_port}]},
|
||||
{"id": "v2.0",
|
||||
"status": "SUPPORTED",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v2/" % self.api_port}]},
|
||||
{"id": "v1.1",
|
||||
"status": "CURRENT",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v1/" % self.api_port}]},
|
||||
{"id": "v1.0",
|
||||
"status": "SUPPORTED",
|
||||
"links": [{
|
||||
"rel": "self",
|
||||
"href": "https://127.0.0.1:%d/v1/" % self.api_port}]}]}
|
||||
versions_json = json.dumps(versions)
|
||||
images = {'images': []}
|
||||
images_json = json.dumps(images)
|
||||
|
@ -99,13 +99,13 @@ class TestImageRepo(test_utils.BaseTestCase):
|
||||
name='1', size=256,
|
||||
is_public=True, status='active',
|
||||
locations=[{'url': UUID1_LOCATION,
|
||||
'metadata': UUID1_LOCATION_METADATA}]),
|
||||
'metadata': UUID1_LOCATION_METADATA}]),
|
||||
_db_fixture(UUID2, owner=TENANT1, checksum=CHCKSUM1,
|
||||
name='2', size=512, is_public=False),
|
||||
_db_fixture(UUID3, owner=TENANT3, checksum=CHCKSUM1,
|
||||
name='3', size=1024, is_public=True,
|
||||
locations=[{'url': UUID3_LOCATION,
|
||||
'metadata': {}}]),
|
||||
'metadata': {}}]),
|
||||
_db_fixture(UUID4, owner=TENANT4, name='4', size=2048),
|
||||
]
|
||||
[self.db.image_create(None, image) for image in self.images]
|
||||
|
@ -940,9 +940,9 @@ class TestRegistryV1ClientRequests(base.IsolatedUnitTest):
|
||||
identity_headers=identity_headers)
|
||||
|
||||
self.mox.StubOutWithMock(test_client.BaseClient, 'do_request')
|
||||
test_client.BaseClient.do_request("GET", "/images",
|
||||
headers=identity_headers).AndReturn(
|
||||
FakeResponse())
|
||||
test_client.BaseClient.do_request(
|
||||
"GET", "/images",
|
||||
headers=identity_headers).AndReturn(FakeResponse())
|
||||
self.mox.ReplayAll()
|
||||
|
||||
self.client.do_request("GET", "/images")
|
||||
|
@ -114,11 +114,9 @@ class TestUploadUtils(base.StoreClearingUnitTest):
|
||||
self.mox.StubOutWithMock(registry, "update_image_metadata")
|
||||
update_data = {'checksum': checksum,
|
||||
'size': size}
|
||||
registry.update_image_metadata(req.context,
|
||||
image_meta['id'],
|
||||
update_data
|
||||
).AndReturn(
|
||||
image_meta.update(update_data))
|
||||
registry.update_image_metadata(
|
||||
req.context, image_meta['id'],
|
||||
update_data).AndReturn(image_meta.update(update_data))
|
||||
self.mox.ReplayAll()
|
||||
|
||||
actual_meta, actual_loc, loc_meta = upload_utils.upload_data_to_store(
|
||||
@ -150,11 +148,9 @@ class TestUploadUtils(base.StoreClearingUnitTest):
|
||||
|
||||
self.mox.StubOutWithMock(registry, "update_image_metadata")
|
||||
update_data = {'checksum': checksum}
|
||||
registry.update_image_metadata(req.context,
|
||||
image_meta['id'],
|
||||
update_data
|
||||
).AndReturn(
|
||||
image_meta.update(update_data))
|
||||
registry.update_image_metadata(
|
||||
req.context, image_meta['id'],
|
||||
update_data).AndReturn(image_meta.update(update_data))
|
||||
notifier.error('image.upload', mox.IgnoreArg())
|
||||
self.mox.ReplayAll()
|
||||
|
||||
@ -187,10 +183,9 @@ class TestUploadUtils(base.StoreClearingUnitTest):
|
||||
|
||||
self.mox.StubOutWithMock(registry, "update_image_metadata")
|
||||
update_data = {'checksum': checksum}
|
||||
registry.update_image_metadata(req.context,
|
||||
image_meta['id'],
|
||||
update_data).AndReturn(
|
||||
image_meta.update(update_data))
|
||||
registry.update_image_metadata(
|
||||
req.context, image_meta['id'],
|
||||
update_data).AndReturn(image_meta.update(update_data))
|
||||
notifier.error('image.upload', mox.IgnoreArg())
|
||||
self.mox.ReplayAll()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user