Enable check for E122

E122 continuation line missing indentation or outdented

Change-Id: Ic54714142b3c5aded42d544f296b0ef9a840c282
This commit is contained in:
Andrey Kurilin 2014-09-24 22:19:17 +03:00
parent 7fc1588dfd
commit d05ae5dcc0
6 changed files with 140 additions and 142 deletions

View File

@ -49,14 +49,15 @@ class Base(base.Fixture):
"status": "BUILD", "status": "BUILD",
"progress": 60, "progress": 60,
"addresses": { "addresses": {
"public": [{ "public": [
"version": 4, {
"addr": "1.2.3.4", "version": 4,
}, "addr": "1.2.3.4",
{ },
"version": 4, {
"addr": "5.6.7.8", "version": 4,
}], "addr": "5.6.7.8",
}],
"private": [{ "private": [{
"version": 4, "version": 4,
"addr": "10.11.12.13", "addr": "10.11.12.13",
@ -89,14 +90,15 @@ class Base(base.Fixture):
"hostId": "9e107d9d372bb6826bd81d3542a419d6", "hostId": "9e107d9d372bb6826bd81d3542a419d6",
"status": "ACTIVE", "status": "ACTIVE",
"addresses": { "addresses": {
"public": [{ "public": [
"version": 4, {
"addr": "4.5.6.7", "version": 4,
}, "addr": "4.5.6.7",
{ },
"version": 4, {
"addr": "5.6.9.8", "version": 4,
}], "addr": "5.6.9.8",
}],
"private": [{ "private": [{
"version": 4, "version": 4,
"addr": "10.13.12.13", "addr": "10.13.12.13",
@ -106,16 +108,17 @@ class Base(base.Fixture):
"Server Label": "DB 1" "Server Label": "DB 1"
}, },
"OS-EXT-SRV-ATTR:host": "computenode2", "OS-EXT-SRV-ATTR:host": "computenode2",
"security_groups": [{ "security_groups": [
'id': 1, 'name': 'securitygroup1', {
'description': 'FAKE_SECURITY_GROUP', 'id': 1, 'name': 'securitygroup1',
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7' 'description': 'FAKE_SECURITY_GROUP',
}, 'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
{ },
'id': 2, 'name': 'securitygroup2', {
'description': 'ANOTHER_FAKE_SECURITY_GROUP', 'id': 2, 'name': 'securitygroup2',
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7' 'description': 'ANOTHER_FAKE_SECURITY_GROUP',
}], 'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
}],
} }
self.server_9012 = { self.server_9012 = {
@ -129,14 +132,15 @@ class Base(base.Fixture):
"hostId": "9e107d9d372bb6826bd81d3542a419d6", "hostId": "9e107d9d372bb6826bd81d3542a419d6",
"status": "ACTIVE", "status": "ACTIVE",
"addresses": { "addresses": {
"public": [{ "public": [
"version": 4, {
"addr": "4.5.6.7", "version": 4,
}, "addr": "4.5.6.7",
{ },
"version": 4, {
"addr": "5.6.9.8", "version": 4,
}], "addr": "5.6.9.8",
}],
"private": [{ "private": [{
"version": 4, "version": 4,
"addr": "10.13.12.13", "addr": "10.13.12.13",

View File

@ -234,8 +234,7 @@ class FakeHTTPClient(base_client.HTTPClient):
"maxPersonality": 5, "maxPersonality": 5,
"maxPersonalitySize": 10240 "maxPersonalitySize": 10240
}, },
}, }})
})
# #
# Servers # Servers
@ -264,14 +263,15 @@ class FakeHTTPClient(base_client.HTTPClient):
"status": "BUILD", "status": "BUILD",
"progress": 60, "progress": 60,
"addresses": { "addresses": {
"public": [{ "public": [
"version": 4, {
"addr": "1.2.3.4", "version": 4,
}, "addr": "1.2.3.4",
{ },
"version": 4, {
"addr": "5.6.7.8", "version": 4,
}], "addr": "5.6.7.8",
}],
"private": [{ "private": [{
"version": 4, "version": 4,
"addr": "10.11.12.13", "addr": "10.11.12.13",
@ -303,14 +303,15 @@ class FakeHTTPClient(base_client.HTTPClient):
"hostId": "9e107d9d372bb6826bd81d3542a419d6", "hostId": "9e107d9d372bb6826bd81d3542a419d6",
"status": "ACTIVE", "status": "ACTIVE",
"addresses": { "addresses": {
"public": [{ "public": [
"version": 4, {
"addr": "4.5.6.7", "version": 4,
}, "addr": "4.5.6.7",
{ },
"version": 4, {
"addr": "5.6.9.8", "version": 4,
}], "addr": "5.6.9.8",
}],
"private": [{ "private": [{
"version": 4, "version": 4,
"addr": "10.13.12.13", "addr": "10.13.12.13",
@ -320,16 +321,17 @@ class FakeHTTPClient(base_client.HTTPClient):
"Server Label": "DB 1" "Server Label": "DB 1"
}, },
"OS-EXT-SRV-ATTR:host": "computenode2", "OS-EXT-SRV-ATTR:host": "computenode2",
"security_groups": [{ "security_groups": [
'id': 1, 'name': 'securitygroup1', {
'description': 'FAKE_SECURITY_GROUP', 'id': 1, 'name': 'securitygroup1',
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7' 'description': 'FAKE_SECURITY_GROUP',
}, 'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
{ },
'id': 2, 'name': 'securitygroup2', {
'description': 'ANOTHER_FAKE_SECURITY_GROUP', 'id': 2, 'name': 'securitygroup2',
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7' 'description': 'ANOTHER_FAKE_SECURITY_GROUP',
}], 'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
}],
}, },
{ {
"id": 9012, "id": 9012,
@ -342,14 +344,15 @@ class FakeHTTPClient(base_client.HTTPClient):
"hostId": "9e107d9d372bb6826bd81d3542a419d6", "hostId": "9e107d9d372bb6826bd81d3542a419d6",
"status": "ACTIVE", "status": "ACTIVE",
"addresses": { "addresses": {
"public": [{ "public": [
"version": 4, {
"addr": "4.5.6.7", "version": 4,
}, "addr": "4.5.6.7",
{ },
"version": 4, {
"addr": "5.6.9.8", "version": 4,
}], "addr": "5.6.9.8",
}],
"private": [{ "private": [{
"version": 4, "version": 4,
"addr": "10.13.12.13", "addr": "10.13.12.13",
@ -1827,39 +1830,35 @@ class FakeHTTPClient(base_client.HTTPClient):
"hosts": None}]}) "hosts": None}]})
def get_os_availability_zone_detail(self, **kw): def get_os_availability_zone_detail(self, **kw):
return (200, {}, {"availabilityZoneInfo": [ return (200, {}, {
{"zoneName": "zone-1", "availabilityZoneInfo": [
"zoneState": {"available": True}, {"zoneName": "zone-1",
"hosts": { "zoneState": {"available": True},
"fake_host-1": { "hosts": {
"nova-compute": {"active": True, "fake_host-1": {
"available": True, "nova-compute": {
"updated_at": "active": True,
datetime.datetime( "available": True,
2012, 12, 26, 14, 45, 25, 0 "updated_at": datetime.datetime(
)}}}}, 2012, 12, 26, 14, 45, 25, 0)}}}},
{"zoneName": "internal", {"zoneName": "internal",
"zoneState": {"available": True}, "zoneState": {"available": True},
"hosts": { "hosts": {
"fake_host-1": { "fake_host-1": {
"nova-sched": { "nova-sched": {
"active": True, "active": True,
"available": True, "available": True,
"updated_at": "updated_at": datetime.datetime(
datetime.datetime( 2012, 12, 26, 14, 45, 25, 0)}},
2012, 12, 26, 14, 45, 25, 0 "fake_host-2": {
)}}, "nova-network": {
"fake_host-2": { "active": True,
"nova-network": { "available": False,
"active": True, "updated_at": datetime.datetime(
"available": False, 2012, 12, 26, 14, 45, 24, 0)}}}},
"updated_at": {"zoneName": "zone-2",
datetime.datetime( "zoneState": {"available": False},
2012, 12, 26, 14, 45, 24, 0 "hosts": None}]})
)}}}},
{"zoneName": "zone-2",
"zoneState": {"available": False},
"hosts": None}]})
def get_servers_1234_os_interface(self, **kw): def get_servers_1234_os_interface(self, **kw):
return (200, {}, {"interfaceAttachments": [ return (200, {}, {"interfaceAttachments": [

View File

@ -272,39 +272,36 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
"hosts": None}]}) "hosts": None}]})
def get_os_availability_zone_detail(self, **kw): def get_os_availability_zone_detail(self, **kw):
return (200, {}, {"availability_zone_info": [ return (200, {}, {
{"zone_name": "zone-1", "availability_zone_info": [
"zone_state": {"available": True}, {"zone_name": "zone-1",
"hosts": { "zone_state": {"available": True},
"fake_host-1": { "hosts": {
"nova-compute": {"active": True, "fake_host-1": {
"available": True, "nova-compute": {
"updated_at": "active": True,
datetime.datetime( "available": True,
2012, 12, 26, 14, 45, 25, 0 "updated_at": datetime.datetime(
)}}}}, 2012, 12, 26, 14, 45, 25, 0)}}}},
{"zone_name": "internal", {"zone_name": "internal",
"zone_state": {"available": True}, "zone_state": {
"hosts": { "available": True},
"fake_host-1": { "hosts": {
"nova-sched": { "fake_host-1": {
"active": True, "nova-sched": {
"available": True, "active": True,
"updated_at": "available": True,
datetime.datetime( "updated_at": datetime.datetime(
2012, 12, 26, 14, 45, 25, 0 2012, 12, 26, 14, 45, 25, 0)}},
)}}, "fake_host-2": {
"fake_host-2": { "nova-network": {
"nova-network": { "active": True,
"active": True, "available": False,
"available": False, "updated_at": datetime.datetime(
"updated_at": 2012, 12, 26, 14, 45, 24, 0)}}}},
datetime.datetime( {"zone_name": "zone-2",
2012, 12, 26, 14, 45, 24, 0 "zone_state": {"available": False},
)}}}}, "hosts": None}]})
{"zone_name": "zone-2",
"zone_state": {"available": False},
"hosts": None}]})
# #
# Quotas # Quotas

View File

@ -84,8 +84,7 @@ class Flavor(base.Resource):
""" """
for k in keys: for k in keys:
self.manager._delete( self.manager._delete(
"/flavors/%s/os-extra_specs/%s" % ( "/flavors/%s/os-extra_specs/%s" % (base.getid(self), k))
base.getid(self), k))
def delete(self): def delete(self):
""" """

View File

@ -73,8 +73,7 @@ class Flavor(base.Resource):
""" """
for k in keys: for k in keys:
self.manager._delete( self.manager._delete(
"/flavors/%s/flavor-extra-specs/%s" % ( "/flavors/%s/flavor-extra-specs/%s" % (base.getid(self), k))
base.getid(self), k))
def delete(self): def delete(self):
""" """

View File

@ -41,9 +41,9 @@ downloadcache = ~/cache/pip
# H904 wrap long lines in parentheses instead of a backslash # H904 wrap long lines in parentheses instead of a backslash
# reason: removed in hacking (https://review.openstack.org/#/c/101701/) # reason: removed in hacking (https://review.openstack.org/#/c/101701/)
# #
# Additional checks are also ignored on purpose: E122, E123, E124, E126, # Additional checks are also ignored on purpose: E123, E124, E126,
# E127, E128, E129, F811, F821 # E127, E128, E129, F811, F821
ignore = E122,E123,E124,E126,E127,E128,E129,F811,F821,H402,H404,H405,H904 ignore = E123,E124,E126,E127,E128,E129,F811,F821,H402,H404,H405,H904
show-source = True show-source = True
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/source/conf.py exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/source/conf.py