Enable check for E131
* E131 continuation line unaligned for hanging indent Change-Id: I719d5bcd1b51896c947e637f6dfce2e1f1a6bd2b
This commit is contained in:
@@ -38,7 +38,10 @@ class V1(base.Fixture):
|
|||||||
'hypervisors': [
|
'hypervisors': [
|
||||||
{
|
{
|
||||||
'id': 1234,
|
'id': 1234,
|
||||||
'service': {'id': 1, 'host': 'compute1'},
|
'service': {
|
||||||
|
'id': 1,
|
||||||
|
'host': 'compute1',
|
||||||
|
},
|
||||||
'vcpus': 4,
|
'vcpus': 4,
|
||||||
'memory_mb': 10 * 1024,
|
'memory_mb': 10 * 1024,
|
||||||
'local_gb': 250,
|
'local_gb': 250,
|
||||||
@@ -57,22 +60,25 @@ class V1(base.Fixture):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
'id': 2,
|
'id': 2,
|
||||||
'service': {'id': 2, 'host': 'compute2'},
|
'service': {
|
||||||
'vcpus': 4,
|
'id': 2,
|
||||||
'memory_mb': 10 * 1024,
|
'host': 'compute2',
|
||||||
'local_gb': 250,
|
},
|
||||||
'vcpus_used': 2,
|
'vcpus': 4,
|
||||||
'memory_mb_used': 5 * 1024,
|
'memory_mb': 10 * 1024,
|
||||||
'local_gb_used': 125,
|
'local_gb': 250,
|
||||||
'hypervisor_type': 'xen',
|
'vcpus_used': 2,
|
||||||
'hypervisor_version': 3,
|
'memory_mb_used': 5 * 1024,
|
||||||
'hypervisor_hostname': 'hyper2',
|
'local_gb_used': 125,
|
||||||
'free_ram_mb': 5 * 1024,
|
'hypervisor_type': 'xen',
|
||||||
'free_disk_gb': 125,
|
'hypervisor_version': 3,
|
||||||
'current_workload': 2,
|
'hypervisor_hostname': 'hyper2',
|
||||||
'running_vms': 2,
|
'free_ram_mb': 5 * 1024,
|
||||||
'cpu_info': 'cpu_info',
|
'free_disk_gb': 125,
|
||||||
'disk_available_least': 100
|
'current_workload': 2,
|
||||||
|
'running_vms': 2,
|
||||||
|
'cpu_info': 'cpu_info',
|
||||||
|
'disk_available_least': 100
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -710,14 +710,14 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||||||
if filter_is_public is not None:
|
if filter_is_public is not None:
|
||||||
if filter_is_public:
|
if filter_is_public:
|
||||||
flavors['flavors'] = [
|
flavors['flavors'] = [
|
||||||
v for v in flavors['flavors']
|
v for v in flavors['flavors']
|
||||||
if v['os-flavor-access:is_public']
|
if v['os-flavor-access:is_public']
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
flavors['flavors'] = [
|
flavors['flavors'] = [
|
||||||
v for v in flavors['flavors']
|
v for v in flavors['flavors']
|
||||||
if not v['os-flavor-access:is_public']
|
if not v['os-flavor-access:is_public']
|
||||||
]
|
]
|
||||||
|
|
||||||
return (200, {}, flavors)
|
return (200, {}, flavors)
|
||||||
|
|
||||||
@@ -1344,7 +1344,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||||||
six.u('total_vcpus_usage'): 49.71047423333333,
|
six.u('total_vcpus_usage'): 49.71047423333333,
|
||||||
six.u('total_hours'): 49.71047423333333,
|
six.u('total_hours'): 49.71047423333333,
|
||||||
six.u('tenant_id'):
|
six.u('tenant_id'):
|
||||||
six.u('7b0a1d73f8fb41718f3343c207597869'),
|
six.u('7b0a1d73f8fb41718f3343c207597869'),
|
||||||
six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
|
six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
|
||||||
six.u('server_usages'): [{
|
six.u('server_usages'): [{
|
||||||
six.u('hours'): 49.71047423333333,
|
six.u('hours'): 49.71047423333333,
|
||||||
@@ -1353,7 +1353,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||||||
six.u('ended_at'): None,
|
six.u('ended_at'): None,
|
||||||
six.u('name'): six.u('f15image1'),
|
six.u('name'): six.u('f15image1'),
|
||||||
six.u('tenant_id'):
|
six.u('tenant_id'):
|
||||||
six.u('7b0a1d73f8fb41718f3343c207597869'),
|
six.u('7b0a1d73f8fb41718f3343c207597869'),
|
||||||
six.u('vcpus'): 1,
|
six.u('vcpus'): 1,
|
||||||
six.u('memory_mb'): 512,
|
six.u('memory_mb'): 512,
|
||||||
six.u('state'): six.u('active'),
|
six.u('state'): six.u('active'),
|
||||||
@@ -1370,7 +1370,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||||||
six.u('total_vcpus_usage'): 49.71047423333333,
|
six.u('total_vcpus_usage'): 49.71047423333333,
|
||||||
six.u('total_hours'): 49.71047423333333,
|
six.u('total_hours'): 49.71047423333333,
|
||||||
six.u('tenant_id'):
|
six.u('tenant_id'):
|
||||||
six.u('7b0a1d73f8fb41718f3343c207597869'),
|
six.u('7b0a1d73f8fb41718f3343c207597869'),
|
||||||
six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
|
six.u('stop'): six.u('2012-01-22 19:48:41.750722'),
|
||||||
six.u('server_usages'): [{
|
six.u('server_usages'): [{
|
||||||
six.u('hours'): 49.71047423333333,
|
six.u('hours'): 49.71047423333333,
|
||||||
|
@@ -173,9 +173,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
|||||||
'passwordCredentials': {
|
'passwordCredentials': {
|
||||||
'username': cs.client.user,
|
'username': cs.client.user,
|
||||||
'password': cs.client.password,
|
'password': cs.client.password,
|
||||||
},
|
},
|
||||||
'tenantName': cs.client.projectid,
|
'tenantName': cs.client.projectid,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
token_url = cs.client.auth_url + "/tokens"
|
token_url = cs.client.auth_url + "/tokens"
|
||||||
@@ -261,9 +261,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
|||||||
'passwordCredentials': {
|
'passwordCredentials': {
|
||||||
'username': cs.client.user,
|
'username': cs.client.user,
|
||||||
'password': cs.client.password,
|
'password': cs.client.password,
|
||||||
},
|
},
|
||||||
'tenantName': cs.client.projectid,
|
'tenantName': cs.client.projectid,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
token_url = cs.client.auth_url + "/tokens"
|
token_url = cs.client.auth_url + "/tokens"
|
||||||
|
@@ -104,14 +104,14 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
|
|||||||
if filter_is_public is not None:
|
if filter_is_public is not None:
|
||||||
if filter_is_public:
|
if filter_is_public:
|
||||||
flavors['flavors'] = [
|
flavors['flavors'] = [
|
||||||
v for v in flavors['flavors']
|
v for v in flavors['flavors']
|
||||||
if v['flavor-access:is_public']
|
if v['flavor-access:is_public']
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
flavors['flavors'] = [
|
flavors['flavors'] = [
|
||||||
v for v in flavors['flavors']
|
v for v in flavors['flavors']
|
||||||
if not v['flavor-access:is_public']
|
if not v['flavor-access:is_public']
|
||||||
]
|
]
|
||||||
|
|
||||||
return (200, {}, flavors)
|
return (200, {}, flavors)
|
||||||
|
|
||||||
|
4
tox.ini
4
tox.ini
@@ -27,7 +27,7 @@ downloadcache = ~/cache/pip
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# TODO fix following rules from hacking 0.9
|
# TODO fix following rules from hacking 0.9
|
||||||
# E131,E265,H402,H405,H904
|
# E265,H402,H405,H904
|
||||||
ignore = E12,E131,E265,F811,F821,H302,H402,H404,H405,H904
|
ignore = E12,E265,F811,F821,H302,H402,H404,H405,H904
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build
|
||||||
|
Reference in New Issue
Block a user