Enable check for E122
E122 continuation line missing indentation or outdented Change-Id: Ic54714142b3c5aded42d544f296b0ef9a840c282
This commit is contained in:
parent
7fc1588dfd
commit
d05ae5dcc0
|
@ -49,14 +49,15 @@ class Base(base.Fixture):
|
|||
"status": "BUILD",
|
||||
"progress": 60,
|
||||
"addresses": {
|
||||
"public": [{
|
||||
"version": 4,
|
||||
"addr": "1.2.3.4",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.7.8",
|
||||
}],
|
||||
"public": [
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "1.2.3.4",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.7.8",
|
||||
}],
|
||||
"private": [{
|
||||
"version": 4,
|
||||
"addr": "10.11.12.13",
|
||||
|
@ -89,14 +90,15 @@ class Base(base.Fixture):
|
|||
"hostId": "9e107d9d372bb6826bd81d3542a419d6",
|
||||
"status": "ACTIVE",
|
||||
"addresses": {
|
||||
"public": [{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"public": [
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"private": [{
|
||||
"version": 4,
|
||||
"addr": "10.13.12.13",
|
||||
|
@ -106,16 +108,17 @@ class Base(base.Fixture):
|
|||
"Server Label": "DB 1"
|
||||
},
|
||||
"OS-EXT-SRV-ATTR:host": "computenode2",
|
||||
"security_groups": [{
|
||||
'id': 1, 'name': 'securitygroup1',
|
||||
'description': 'FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
},
|
||||
{
|
||||
'id': 2, 'name': 'securitygroup2',
|
||||
'description': 'ANOTHER_FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
}],
|
||||
"security_groups": [
|
||||
{
|
||||
'id': 1, 'name': 'securitygroup1',
|
||||
'description': 'FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
},
|
||||
{
|
||||
'id': 2, 'name': 'securitygroup2',
|
||||
'description': 'ANOTHER_FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
}],
|
||||
}
|
||||
|
||||
self.server_9012 = {
|
||||
|
@ -129,14 +132,15 @@ class Base(base.Fixture):
|
|||
"hostId": "9e107d9d372bb6826bd81d3542a419d6",
|
||||
"status": "ACTIVE",
|
||||
"addresses": {
|
||||
"public": [{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"public": [
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"private": [{
|
||||
"version": 4,
|
||||
"addr": "10.13.12.13",
|
||||
|
|
|
@ -234,8 +234,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||
"maxPersonality": 5,
|
||||
"maxPersonalitySize": 10240
|
||||
},
|
||||
},
|
||||
})
|
||||
}})
|
||||
|
||||
#
|
||||
# Servers
|
||||
|
@ -264,14 +263,15 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||
"status": "BUILD",
|
||||
"progress": 60,
|
||||
"addresses": {
|
||||
"public": [{
|
||||
"version": 4,
|
||||
"addr": "1.2.3.4",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.7.8",
|
||||
}],
|
||||
"public": [
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "1.2.3.4",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.7.8",
|
||||
}],
|
||||
"private": [{
|
||||
"version": 4,
|
||||
"addr": "10.11.12.13",
|
||||
|
@ -303,14 +303,15 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||
"hostId": "9e107d9d372bb6826bd81d3542a419d6",
|
||||
"status": "ACTIVE",
|
||||
"addresses": {
|
||||
"public": [{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"public": [
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"private": [{
|
||||
"version": 4,
|
||||
"addr": "10.13.12.13",
|
||||
|
@ -320,16 +321,17 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||
"Server Label": "DB 1"
|
||||
},
|
||||
"OS-EXT-SRV-ATTR:host": "computenode2",
|
||||
"security_groups": [{
|
||||
'id': 1, 'name': 'securitygroup1',
|
||||
'description': 'FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
},
|
||||
{
|
||||
'id': 2, 'name': 'securitygroup2',
|
||||
'description': 'ANOTHER_FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
}],
|
||||
"security_groups": [
|
||||
{
|
||||
'id': 1, 'name': 'securitygroup1',
|
||||
'description': 'FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
},
|
||||
{
|
||||
'id': 2, 'name': 'securitygroup2',
|
||||
'description': 'ANOTHER_FAKE_SECURITY_GROUP',
|
||||
'tenant_id': '4ffc664c198e435e9853f2538fbcd7a7'
|
||||
}],
|
||||
},
|
||||
{
|
||||
"id": 9012,
|
||||
|
@ -342,14 +344,15 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||
"hostId": "9e107d9d372bb6826bd81d3542a419d6",
|
||||
"status": "ACTIVE",
|
||||
"addresses": {
|
||||
"public": [{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"public": [
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "4.5.6.7",
|
||||
},
|
||||
{
|
||||
"version": 4,
|
||||
"addr": "5.6.9.8",
|
||||
}],
|
||||
"private": [{
|
||||
"version": 4,
|
||||
"addr": "10.13.12.13",
|
||||
|
@ -1827,39 +1830,35 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||
"hosts": None}]})
|
||||
|
||||
def get_os_availability_zone_detail(self, **kw):
|
||||
return (200, {}, {"availabilityZoneInfo": [
|
||||
{"zoneName": "zone-1",
|
||||
"zoneState": {"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-compute": {"active": True,
|
||||
"available": True,
|
||||
"updated_at":
|
||||
datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0
|
||||
)}}}},
|
||||
{"zoneName": "internal",
|
||||
"zoneState": {"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-sched": {
|
||||
"active": True,
|
||||
"available": True,
|
||||
"updated_at":
|
||||
datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0
|
||||
)}},
|
||||
"fake_host-2": {
|
||||
"nova-network": {
|
||||
"active": True,
|
||||
"available": False,
|
||||
"updated_at":
|
||||
datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 24, 0
|
||||
)}}}},
|
||||
{"zoneName": "zone-2",
|
||||
"zoneState": {"available": False},
|
||||
"hosts": None}]})
|
||||
return (200, {}, {
|
||||
"availabilityZoneInfo": [
|
||||
{"zoneName": "zone-1",
|
||||
"zoneState": {"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-compute": {
|
||||
"active": True,
|
||||
"available": True,
|
||||
"updated_at": datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0)}}}},
|
||||
{"zoneName": "internal",
|
||||
"zoneState": {"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-sched": {
|
||||
"active": True,
|
||||
"available": True,
|
||||
"updated_at": datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0)}},
|
||||
"fake_host-2": {
|
||||
"nova-network": {
|
||||
"active": True,
|
||||
"available": False,
|
||||
"updated_at": datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 24, 0)}}}},
|
||||
{"zoneName": "zone-2",
|
||||
"zoneState": {"available": False},
|
||||
"hosts": None}]})
|
||||
|
||||
def get_servers_1234_os_interface(self, **kw):
|
||||
return (200, {}, {"interfaceAttachments": [
|
||||
|
|
|
@ -272,39 +272,36 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
|
|||
"hosts": None}]})
|
||||
|
||||
def get_os_availability_zone_detail(self, **kw):
|
||||
return (200, {}, {"availability_zone_info": [
|
||||
{"zone_name": "zone-1",
|
||||
"zone_state": {"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-compute": {"active": True,
|
||||
"available": True,
|
||||
"updated_at":
|
||||
datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0
|
||||
)}}}},
|
||||
{"zone_name": "internal",
|
||||
"zone_state": {"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-sched": {
|
||||
"active": True,
|
||||
"available": True,
|
||||
"updated_at":
|
||||
datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0
|
||||
)}},
|
||||
"fake_host-2": {
|
||||
"nova-network": {
|
||||
"active": True,
|
||||
"available": False,
|
||||
"updated_at":
|
||||
datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 24, 0
|
||||
)}}}},
|
||||
{"zone_name": "zone-2",
|
||||
"zone_state": {"available": False},
|
||||
"hosts": None}]})
|
||||
return (200, {}, {
|
||||
"availability_zone_info": [
|
||||
{"zone_name": "zone-1",
|
||||
"zone_state": {"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-compute": {
|
||||
"active": True,
|
||||
"available": True,
|
||||
"updated_at": datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0)}}}},
|
||||
{"zone_name": "internal",
|
||||
"zone_state": {
|
||||
"available": True},
|
||||
"hosts": {
|
||||
"fake_host-1": {
|
||||
"nova-sched": {
|
||||
"active": True,
|
||||
"available": True,
|
||||
"updated_at": datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 25, 0)}},
|
||||
"fake_host-2": {
|
||||
"nova-network": {
|
||||
"active": True,
|
||||
"available": False,
|
||||
"updated_at": datetime.datetime(
|
||||
2012, 12, 26, 14, 45, 24, 0)}}}},
|
||||
{"zone_name": "zone-2",
|
||||
"zone_state": {"available": False},
|
||||
"hosts": None}]})
|
||||
|
||||
#
|
||||
# Quotas
|
||||
|
|
|
@ -84,8 +84,7 @@ class Flavor(base.Resource):
|
|||
"""
|
||||
for k in keys:
|
||||
self.manager._delete(
|
||||
"/flavors/%s/os-extra_specs/%s" % (
|
||||
base.getid(self), k))
|
||||
"/flavors/%s/os-extra_specs/%s" % (base.getid(self), k))
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
|
|
|
@ -73,8 +73,7 @@ class Flavor(base.Resource):
|
|||
"""
|
||||
for k in keys:
|
||||
self.manager._delete(
|
||||
"/flavors/%s/flavor-extra-specs/%s" % (
|
||||
base.getid(self), k))
|
||||
"/flavors/%s/flavor-extra-specs/%s" % (base.getid(self), k))
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -41,9 +41,9 @@ downloadcache = ~/cache/pip
|
|||
# H904 wrap long lines in parentheses instead of a backslash
|
||||
# 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
|
||||
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
|
||||
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/source/conf.py
|
||||
|
||||
|
|
Loading…
Reference in New Issue