Enable E128 ignore E129
After bumping the hacking version to the 0.9.x series ignores were added for several rules. This commit fixes the violations for a subset of these rules and re-enables the checks. Change-Id: Iaff25fc9e2ecfad0c0574b39ddce0c5188d6c31f
This commit is contained in:
parent
96e9e88dc0
commit
1d14c54fd8
|
@ -145,7 +145,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
||||||
self.assertEqual(200, resp.status)
|
self.assertEqual(200, resp.status)
|
||||||
self.assertIn((aggregate_id, new_aggregate_name, new_az_name),
|
self.assertIn((aggregate_id, new_aggregate_name, new_az_name),
|
||||||
map(lambda x:
|
map(lambda x:
|
||||||
(x['id'], x['name'], x['availability_zone']),
|
(x['id'], x['name'], x['availability_zone']),
|
||||||
aggregates))
|
aggregates))
|
||||||
|
|
||||||
@test.attr(type='gate')
|
@test.attr(type='gate')
|
||||||
|
|
|
@ -62,9 +62,9 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
||||||
|
|
||||||
name = data_utils.rand_name('image')
|
name = data_utils.rand_name('image')
|
||||||
resp, body = cls.glance_client.create_image(name=name,
|
resp, body = cls.glance_client.create_image(name=name,
|
||||||
container_format='bare',
|
container_format='bare',
|
||||||
disk_format='raw',
|
disk_format='raw',
|
||||||
is_public=False)
|
is_public=False)
|
||||||
image_id = body['id']
|
image_id = body['id']
|
||||||
image_file = StringIO.StringIO(('*' * 1024))
|
image_file = StringIO.StringIO(('*' * 1024))
|
||||||
resp, body = cls.glance_client.update_image(image_id, data=image_file)
|
resp, body = cls.glance_client.update_image(image_id, data=image_file)
|
||||||
|
|
|
@ -135,7 +135,7 @@ class AggregatesAdminV3Test(base.BaseV3ComputeAdminTest):
|
||||||
self.assertEqual(200, resp.status)
|
self.assertEqual(200, resp.status)
|
||||||
self.assertIn((aggregate_id, new_aggregate_name, new_az_name),
|
self.assertIn((aggregate_id, new_aggregate_name, new_az_name),
|
||||||
map(lambda x:
|
map(lambda x:
|
||||||
(x['id'], x['name'], x['availability_zone']),
|
(x['id'], x['name'], x['availability_zone']),
|
||||||
aggregates))
|
aggregates))
|
||||||
|
|
||||||
@test.attr(type='gate')
|
@test.attr(type='gate')
|
||||||
|
|
|
@ -85,8 +85,8 @@ class AllowedAddressPairTestJSON(base.BaseNetworkTest):
|
||||||
# Update allowed address pair attribute of port
|
# Update allowed address pair attribute of port
|
||||||
allowed_address_pairs = [{'ip_address': self.ip_address,
|
allowed_address_pairs = [{'ip_address': self.ip_address,
|
||||||
'mac_address': self.mac_address}]
|
'mac_address': self.mac_address}]
|
||||||
resp, body = self.client.update_port(port_id,
|
resp, body = self.client.update_port(
|
||||||
allowed_address_pairs=allowed_address_pairs)
|
port_id, allowed_address_pairs=allowed_address_pairs)
|
||||||
self.assertEqual('200', resp['status'])
|
self.assertEqual('200', resp['status'])
|
||||||
newport = body['port']
|
newport = body['port']
|
||||||
self._confirm_allowed_address_pair(newport, self.ip_address)
|
self._confirm_allowed_address_pair(newport, self.ip_address)
|
||||||
|
|
|
@ -290,8 +290,8 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
|
||||||
health_monitor = body['health_monitor']
|
health_monitor = body['health_monitor']
|
||||||
# Verification of health_monitor update
|
# Verification of health_monitor update
|
||||||
resp, body = (self.client.update_health_monitor
|
resp, body = (self.client.update_health_monitor
|
||||||
(health_monitor['id'],
|
(health_monitor['id'],
|
||||||
admin_state_up=False))
|
admin_state_up=False))
|
||||||
self.assertEqual('200', resp['status'])
|
self.assertEqual('200', resp['status'])
|
||||||
updated_health_monitor = body['health_monitor']
|
updated_health_monitor = body['health_monitor']
|
||||||
self.assertFalse(updated_health_monitor['admin_state_up'])
|
self.assertFalse(updated_health_monitor['admin_state_up'])
|
||||||
|
@ -323,10 +323,10 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
|
||||||
self.addCleanup(self.client.delete_health_monitor,
|
self.addCleanup(self.client.delete_health_monitor,
|
||||||
health_monitor['id'])
|
health_monitor['id'])
|
||||||
resp, body = (self.client.update_health_monitor
|
resp, body = (self.client.update_health_monitor
|
||||||
(health_monitor['id'],
|
(health_monitor['id'],
|
||||||
http_method="POST",
|
http_method="POST",
|
||||||
url_path="/home/user",
|
url_path="/home/user",
|
||||||
expected_codes="290"))
|
expected_codes="290"))
|
||||||
self.assertEqual('200', resp['status'])
|
self.assertEqual('200', resp['status'])
|
||||||
updated_health_monitor = body['health_monitor']
|
updated_health_monitor = body['health_monitor']
|
||||||
self.assertEqual("POST", updated_health_monitor['http_method'])
|
self.assertEqual("POST", updated_health_monitor['http_method'])
|
||||||
|
@ -348,7 +348,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
|
||||||
def test_associate_disassociate_health_monitor_with_pool(self):
|
def test_associate_disassociate_health_monitor_with_pool(self):
|
||||||
# Verify that a health monitor can be associated with a pool
|
# Verify that a health monitor can be associated with a pool
|
||||||
resp, body = (self.client.associate_health_monitor_with_pool
|
resp, body = (self.client.associate_health_monitor_with_pool
|
||||||
(self.health_monitor['id'], self.pool['id']))
|
(self.health_monitor['id'], self.pool['id']))
|
||||||
self.assertEqual('201', resp['status'])
|
self.assertEqual('201', resp['status'])
|
||||||
resp, body = self.client.show_health_monitor(
|
resp, body = self.client.show_health_monitor(
|
||||||
self.health_monitor['id'])
|
self.health_monitor['id'])
|
||||||
|
@ -360,7 +360,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
|
||||||
self.assertIn(health_monitor['id'], pool['health_monitors'])
|
self.assertIn(health_monitor['id'], pool['health_monitors'])
|
||||||
# Verify that a health monitor can be disassociated from a pool
|
# Verify that a health monitor can be disassociated from a pool
|
||||||
resp, body = (self.client.disassociate_health_monitor_with_pool
|
resp, body = (self.client.disassociate_health_monitor_with_pool
|
||||||
(self.health_monitor['id'], self.pool['id']))
|
(self.health_monitor['id'], self.pool['id']))
|
||||||
self.assertEqual('204', resp['status'])
|
self.assertEqual('204', resp['status'])
|
||||||
resp, body = self.client.show_pool(self.pool['id'])
|
resp, body = self.client.show_pool(self.pool['id'])
|
||||||
pool = body['pool']
|
pool = body['pool']
|
||||||
|
|
|
@ -115,11 +115,11 @@ class RoutersTest(base.BaseRouterTest):
|
||||||
def test_create_router_with_default_snat_value(self):
|
def test_create_router_with_default_snat_value(self):
|
||||||
# Create a router with default snat rule
|
# Create a router with default snat rule
|
||||||
name = data_utils.rand_name('router')
|
name = data_utils.rand_name('router')
|
||||||
router = self._create_router(name,
|
router = self._create_router(
|
||||||
external_network_id=CONF.network.public_network_id)
|
name, external_network_id=CONF.network.public_network_id)
|
||||||
self._verify_router_gateway(router['id'],
|
self._verify_router_gateway(
|
||||||
{'network_id': CONF.network.public_network_id,
|
router['id'], {'network_id': CONF.network.public_network_id,
|
||||||
'enable_snat': True})
|
'enable_snat': True})
|
||||||
|
|
||||||
@test.requires_ext(extension='ext-gw-mode', service='network')
|
@test.requires_ext(extension='ext-gw-mode', service='network')
|
||||||
@test.attr(type='smoke')
|
@test.attr(type='smoke')
|
||||||
|
@ -135,10 +135,10 @@ class RoutersTest(base.BaseRouterTest):
|
||||||
name, external_gateway_info=external_gateway_info)
|
name, external_gateway_info=external_gateway_info)
|
||||||
self.assertEqual('201', resp['status'])
|
self.assertEqual('201', resp['status'])
|
||||||
self.addCleanup(self.admin_client.delete_router,
|
self.addCleanup(self.admin_client.delete_router,
|
||||||
create_body['router']['id'])
|
create_body['router']['id'])
|
||||||
# Verify snat attributes after router creation
|
# Verify snat attributes after router creation
|
||||||
self._verify_router_gateway(create_body['router']['id'],
|
self._verify_router_gateway(create_body['router']['id'],
|
||||||
exp_ext_gw_info=external_gateway_info)
|
exp_ext_gw_info=external_gateway_info)
|
||||||
|
|
||||||
@test.attr(type='smoke')
|
@test.attr(type='smoke')
|
||||||
def test_add_remove_router_interface_with_subnet_id(self):
|
def test_add_remove_router_interface_with_subnet_id(self):
|
||||||
|
|
|
@ -249,8 +249,8 @@ class JavelinCheck(unittest.TestCase):
|
||||||
if return_code is 0:
|
if return_code is 0:
|
||||||
break
|
break
|
||||||
self.assertNotEqual(count, 59,
|
self.assertNotEqual(count, 59,
|
||||||
"Server %s is not pingable at %s" % (
|
"Server %s is not pingable at %s" % (
|
||||||
server['name'], addr))
|
server['name'], addr))
|
||||||
|
|
||||||
def check_volumes(self):
|
def check_volumes(self):
|
||||||
"""Check that the volumes are still there and attached."""
|
"""Check that the volumes are still there and attached."""
|
||||||
|
@ -401,7 +401,7 @@ def create_servers(servers):
|
||||||
image_id = _get_image_by_name(client, server['image'])['id']
|
image_id = _get_image_by_name(client, server['image'])['id']
|
||||||
flavor_id = _get_flavor_by_name(client, server['flavor'])['id']
|
flavor_id = _get_flavor_by_name(client, server['flavor'])['id']
|
||||||
resp, body = client.servers.create_server(server['name'], image_id,
|
resp, body = client.servers.create_server(server['name'], image_id,
|
||||||
flavor_id)
|
flavor_id)
|
||||||
server_id = body['id']
|
server_id = body['id']
|
||||||
client.servers.wait_for_server_status(server_id, 'ACTIVE')
|
client.servers.wait_for_server_status(server_id, 'ACTIVE')
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ def destroy_servers(servers):
|
||||||
|
|
||||||
client.servers.delete_server(response['id'])
|
client.servers.delete_server(response['id'])
|
||||||
client.servers.wait_for_server_termination(response['id'],
|
client.servers.wait_for_server_termination(response['id'],
|
||||||
ignore_error=True)
|
ignore_error=True)
|
||||||
|
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
|
|
|
@ -209,8 +209,9 @@ class RestClient(object):
|
||||||
pattern = """Unexpected http success status code {0},
|
pattern = """Unexpected http success status code {0},
|
||||||
The expected status code is {1}"""
|
The expected status code is {1}"""
|
||||||
if ((not isinstance(expected_code, list) and
|
if ((not isinstance(expected_code, list) and
|
||||||
(read_code != expected_code)) or (isinstance(expected_code,
|
(read_code != expected_code)) or
|
||||||
list) and (read_code not in expected_code))):
|
(isinstance(expected_code, list) and
|
||||||
|
(read_code not in expected_code))):
|
||||||
details = pattern.format(read_code, expected_code)
|
details = pattern.format(read_code, expected_code)
|
||||||
raise exceptions.InvalidHttpSuccessCode(details)
|
raise exceptions.InvalidHttpSuccessCode(details)
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ def wait_for_server_status(client, server_id, status, ready_wait=True,
|
||||||
if (server_status == 'ERROR') and raise_on_error:
|
if (server_status == 'ERROR') and raise_on_error:
|
||||||
if 'fault' in body:
|
if 'fault' in body:
|
||||||
raise exceptions.BuildErrorException(body['fault'],
|
raise exceptions.BuildErrorException(body['fault'],
|
||||||
server_id=server_id)
|
server_id=server_id)
|
||||||
else:
|
else:
|
||||||
raise exceptions.BuildErrorException(server_id=server_id)
|
raise exceptions.BuildErrorException(server_id=server_id)
|
||||||
|
|
||||||
|
|
|
@ -223,5 +223,8 @@ class CommandFailed(Exception):
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return ("Command '%s' returned non-zero exit status %d.\n"
|
return ("Command '%s' returned non-zero exit status %d.\n"
|
||||||
"stdout:\n%s\n"
|
"stdout:\n%s\n"
|
||||||
"stderr:\n%s" % (self.cmd, self.returncode, self.stdout, self.stderr))
|
"stderr:\n%s" % (self.cmd,
|
||||||
|
self.returncode,
|
||||||
|
self.stdout,
|
||||||
|
self.stderr))
|
||||||
|
|
|
@ -110,7 +110,7 @@ class NetworkClientJSON(network_client_base.NetworkClientBase):
|
||||||
|
|
||||||
def add_router_interface_with_subnet_id(self, router_id, subnet_id):
|
def add_router_interface_with_subnet_id(self, router_id, subnet_id):
|
||||||
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
update_body = {"subnet_id": subnet_id}
|
update_body = {"subnet_id": subnet_id}
|
||||||
update_body = json.dumps(update_body)
|
update_body = json.dumps(update_body)
|
||||||
resp, body = self.put(uri, update_body)
|
resp, body = self.put(uri, update_body)
|
||||||
|
@ -119,7 +119,7 @@ class NetworkClientJSON(network_client_base.NetworkClientBase):
|
||||||
|
|
||||||
def add_router_interface_with_port_id(self, router_id, port_id):
|
def add_router_interface_with_port_id(self, router_id, port_id):
|
||||||
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
update_body = {"port_id": port_id}
|
update_body = {"port_id": port_id}
|
||||||
update_body = json.dumps(update_body)
|
update_body = json.dumps(update_body)
|
||||||
resp, body = self.put(uri, update_body)
|
resp, body = self.put(uri, update_body)
|
||||||
|
@ -128,7 +128,7 @@ class NetworkClientJSON(network_client_base.NetworkClientBase):
|
||||||
|
|
||||||
def remove_router_interface_with_subnet_id(self, router_id, subnet_id):
|
def remove_router_interface_with_subnet_id(self, router_id, subnet_id):
|
||||||
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
update_body = {"subnet_id": subnet_id}
|
update_body = {"subnet_id": subnet_id}
|
||||||
update_body = json.dumps(update_body)
|
update_body = json.dumps(update_body)
|
||||||
resp, body = self.put(uri, update_body)
|
resp, body = self.put(uri, update_body)
|
||||||
|
@ -137,7 +137,7 @@ class NetworkClientJSON(network_client_base.NetworkClientBase):
|
||||||
|
|
||||||
def remove_router_interface_with_port_id(self, router_id, port_id):
|
def remove_router_interface_with_port_id(self, router_id, port_id):
|
||||||
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
update_body = {"port_id": port_id}
|
update_body = {"port_id": port_id}
|
||||||
update_body = json.dumps(update_body)
|
update_body = json.dumps(update_body)
|
||||||
resp, body = self.put(uri, update_body)
|
resp, body = self.put(uri, update_body)
|
||||||
|
|
|
@ -137,7 +137,7 @@ class NetworkClientXML(client_base.NetworkClientBase):
|
||||||
|
|
||||||
def add_router_interface_with_subnet_id(self, router_id, subnet_id):
|
def add_router_interface_with_subnet_id(self, router_id, subnet_id):
|
||||||
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
subnet = common.Element("subnet_id", subnet_id)
|
subnet = common.Element("subnet_id", subnet_id)
|
||||||
resp, body = self.put(uri, str(common.Document(subnet)))
|
resp, body = self.put(uri, str(common.Document(subnet)))
|
||||||
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
||||||
|
@ -145,7 +145,7 @@ class NetworkClientXML(client_base.NetworkClientBase):
|
||||||
|
|
||||||
def add_router_interface_with_port_id(self, router_id, port_id):
|
def add_router_interface_with_port_id(self, router_id, port_id):
|
||||||
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
port = common.Element("port_id", port_id)
|
port = common.Element("port_id", port_id)
|
||||||
resp, body = self.put(uri, str(common.Document(port)))
|
resp, body = self.put(uri, str(common.Document(port)))
|
||||||
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
||||||
|
@ -153,7 +153,7 @@ class NetworkClientXML(client_base.NetworkClientBase):
|
||||||
|
|
||||||
def remove_router_interface_with_subnet_id(self, router_id, subnet_id):
|
def remove_router_interface_with_subnet_id(self, router_id, subnet_id):
|
||||||
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
subnet = common.Element("subnet_id", subnet_id)
|
subnet = common.Element("subnet_id", subnet_id)
|
||||||
resp, body = self.put(uri, str(common.Document(subnet)))
|
resp, body = self.put(uri, str(common.Document(subnet)))
|
||||||
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
||||||
|
@ -161,7 +161,7 @@ class NetworkClientXML(client_base.NetworkClientBase):
|
||||||
|
|
||||||
def remove_router_interface_with_port_id(self, router_id, port_id):
|
def remove_router_interface_with_port_id(self, router_id, port_id):
|
||||||
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
|
||||||
router_id)
|
router_id)
|
||||||
port = common.Element("port_id", port_id)
|
port = common.Element("port_id", port_id)
|
||||||
resp, body = self.put(uri, str(common.Document(port)))
|
resp, body = self.put(uri, str(common.Document(port)))
|
||||||
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
body = _root_tag_fetcher_and_xml_to_json_parse(body)
|
||||||
|
|
|
@ -48,7 +48,7 @@ class VolumeAttachDeleteTest(stressaction.StressAction):
|
||||||
|
|
||||||
# Step 3: attach volume to vm
|
# Step 3: attach volume to vm
|
||||||
self.logger.info("attach volume (%s) to vm %s" %
|
self.logger.info("attach volume (%s) to vm %s" %
|
||||||
(volume['id'], server_id))
|
(volume['id'], server_id))
|
||||||
resp, body = self.manager.servers_client.attach_volume(server_id,
|
resp, body = self.manager.servers_client.attach_volume(server_id,
|
||||||
volume['id'],
|
volume['id'],
|
||||||
'/dev/vdc')
|
'/dev/vdc')
|
||||||
|
|
|
@ -192,7 +192,7 @@ class VolumeVerifyStress(stressaction.StressAction):
|
||||||
self._create_volume()
|
self._create_volume()
|
||||||
servers_client = self.manager.servers_client
|
servers_client = self.manager.servers_client
|
||||||
self.logger.info("attach volume (%s) to vm %s" %
|
self.logger.info("attach volume (%s) to vm %s" %
|
||||||
(self.volume['id'], self.server_id))
|
(self.volume['id'], self.server_id))
|
||||||
resp, body = servers_client.attach_volume(self.server_id,
|
resp, body = servers_client.attach_volume(self.server_id,
|
||||||
self.volume['id'],
|
self.volume['id'],
|
||||||
self.part_name)
|
self.part_name)
|
||||||
|
|
|
@ -30,9 +30,9 @@ class TestNegativeAutoTest(base.TestCase):
|
||||||
"http-method": "GET",
|
"http-method": "GET",
|
||||||
"url": "flavors/detail",
|
"url": "flavors/detail",
|
||||||
"json-schema": {"type": "object",
|
"json-schema": {"type": "object",
|
||||||
"properties":
|
"properties":
|
||||||
{"minRam": {"type": "integer"},
|
{"minRam": {"type": "integer"},
|
||||||
"minDisk": {"type": "integer"}}
|
"minDisk": {"type": "integer"}}
|
||||||
},
|
},
|
||||||
"resources": ["flavor", "volume", "image"]
|
"resources": ["flavor", "volume", "image"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,17 +42,17 @@ class TestGlanceHTTPClient(base.TestCase):
|
||||||
|
|
||||||
self.fake_auth.base_url = mock.MagicMock(return_value=self.endpoint)
|
self.fake_auth.base_url = mock.MagicMock(return_value=self.endpoint)
|
||||||
|
|
||||||
self.useFixture(mockpatch.PatchObject(httplib.HTTPConnection,
|
self.useFixture(mockpatch.PatchObject(
|
||||||
'request',
|
httplib.HTTPConnection,
|
||||||
side_effect=self.fake_http.request(self.endpoint)[1]))
|
'request',
|
||||||
|
side_effect=self.fake_http.request(self.endpoint)[1]))
|
||||||
self.client = glance_http.HTTPClient(self.fake_auth, {})
|
self.client = glance_http.HTTPClient(self.fake_auth, {})
|
||||||
|
|
||||||
def _set_response_fixture(self, header, status, resp_body):
|
def _set_response_fixture(self, header, status, resp_body):
|
||||||
resp = fake_http.fake_httplib(header, status=status,
|
resp = fake_http.fake_httplib(header, status=status,
|
||||||
body=six.StringIO(resp_body))
|
body=six.StringIO(resp_body))
|
||||||
self.useFixture(mockpatch.PatchObject(httplib.HTTPConnection,
|
self.useFixture(mockpatch.PatchObject(httplib.HTTPConnection,
|
||||||
'getresponse',
|
'getresponse', return_value=resp))
|
||||||
return_value=resp))
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
def test_json_request_without_content_type_header_in_response(self):
|
def test_json_request_without_content_type_header_in_response(self):
|
||||||
|
|
|
@ -187,7 +187,7 @@ def friendly_function_call_str(call_able, *args, **kwargs):
|
||||||
if len(args):
|
if len(args):
|
||||||
string += ", "
|
string += ", "
|
||||||
string += ", ".join("=".join(map(str, (key, value)))
|
string += ", ".join("=".join(map(str, (key, value)))
|
||||||
for (key, value) in kwargs.items())
|
for (key, value) in kwargs.items())
|
||||||
return string + ")"
|
return string + ")"
|
||||||
|
|
||||||
|
|
||||||
|
@ -592,83 +592,83 @@ for code in ('InsufficientAddressCapacity', 'InsufficientInstanceCapacity',
|
||||||
|
|
||||||
|
|
||||||
for code in (('AccessDenied', 403),
|
for code in (('AccessDenied', 403),
|
||||||
('AccountProblem', 403),
|
('AccountProblem', 403),
|
||||||
('AmbiguousGrantByEmailAddress', 400),
|
('AmbiguousGrantByEmailAddress', 400),
|
||||||
('BadDigest', 400),
|
('BadDigest', 400),
|
||||||
('BucketAlreadyExists', 409),
|
('BucketAlreadyExists', 409),
|
||||||
('BucketAlreadyOwnedByYou', 409),
|
('BucketAlreadyOwnedByYou', 409),
|
||||||
('BucketNotEmpty', 409),
|
('BucketNotEmpty', 409),
|
||||||
('CredentialsNotSupported', 400),
|
('CredentialsNotSupported', 400),
|
||||||
('CrossLocationLoggingProhibited', 403),
|
('CrossLocationLoggingProhibited', 403),
|
||||||
('EntityTooSmall', 400),
|
('EntityTooSmall', 400),
|
||||||
('EntityTooLarge', 400),
|
('EntityTooLarge', 400),
|
||||||
('ExpiredToken', 400),
|
('ExpiredToken', 400),
|
||||||
('IllegalVersioningConfigurationException', 400),
|
('IllegalVersioningConfigurationException', 400),
|
||||||
('IncompleteBody', 400),
|
('IncompleteBody', 400),
|
||||||
('IncorrectNumberOfFilesInPostRequest', 400),
|
('IncorrectNumberOfFilesInPostRequest', 400),
|
||||||
('InlineDataTooLarge', 400),
|
('InlineDataTooLarge', 400),
|
||||||
('InvalidAccessKeyId', 403),
|
('InvalidAccessKeyId', 403),
|
||||||
'InvalidAddressingHeader',
|
'InvalidAddressingHeader',
|
||||||
('InvalidArgument', 400),
|
('InvalidArgument', 400),
|
||||||
('InvalidBucketName', 400),
|
('InvalidBucketName', 400),
|
||||||
('InvalidBucketState', 409),
|
('InvalidBucketState', 409),
|
||||||
('InvalidDigest', 400),
|
('InvalidDigest', 400),
|
||||||
('InvalidLocationConstraint', 400),
|
('InvalidLocationConstraint', 400),
|
||||||
('InvalidPart', 400),
|
('InvalidPart', 400),
|
||||||
('InvalidPartOrder', 400),
|
('InvalidPartOrder', 400),
|
||||||
('InvalidPayer', 403),
|
('InvalidPayer', 403),
|
||||||
('InvalidPolicyDocument', 400),
|
('InvalidPolicyDocument', 400),
|
||||||
('InvalidRange', 416),
|
('InvalidRange', 416),
|
||||||
('InvalidRequest', 400),
|
('InvalidRequest', 400),
|
||||||
('InvalidSecurity', 403),
|
('InvalidSecurity', 403),
|
||||||
('InvalidSOAPRequest', 400),
|
('InvalidSOAPRequest', 400),
|
||||||
('InvalidStorageClass', 400),
|
('InvalidStorageClass', 400),
|
||||||
('InvalidTargetBucketForLogging', 400),
|
('InvalidTargetBucketForLogging', 400),
|
||||||
('InvalidToken', 400),
|
('InvalidToken', 400),
|
||||||
('InvalidURI', 400),
|
('InvalidURI', 400),
|
||||||
('KeyTooLong', 400),
|
('KeyTooLong', 400),
|
||||||
('MalformedACLError', 400),
|
('MalformedACLError', 400),
|
||||||
('MalformedPOSTRequest', 400),
|
('MalformedPOSTRequest', 400),
|
||||||
('MalformedXML', 400),
|
('MalformedXML', 400),
|
||||||
('MaxMessageLengthExceeded', 400),
|
('MaxMessageLengthExceeded', 400),
|
||||||
('MaxPostPreDataLengthExceededError', 400),
|
('MaxPostPreDataLengthExceededError', 400),
|
||||||
('MetadataTooLarge', 400),
|
('MetadataTooLarge', 400),
|
||||||
('MethodNotAllowed', 405),
|
('MethodNotAllowed', 405),
|
||||||
('MissingAttachment'),
|
('MissingAttachment'),
|
||||||
('MissingContentLength', 411),
|
('MissingContentLength', 411),
|
||||||
('MissingRequestBodyError', 400),
|
('MissingRequestBodyError', 400),
|
||||||
('MissingSecurityElement', 400),
|
('MissingSecurityElement', 400),
|
||||||
('MissingSecurityHeader', 400),
|
('MissingSecurityHeader', 400),
|
||||||
('NoLoggingStatusForKey', 400),
|
('NoLoggingStatusForKey', 400),
|
||||||
('NoSuchBucket', 404),
|
('NoSuchBucket', 404),
|
||||||
('NoSuchKey', 404),
|
('NoSuchKey', 404),
|
||||||
('NoSuchLifecycleConfiguration', 404),
|
('NoSuchLifecycleConfiguration', 404),
|
||||||
('NoSuchUpload', 404),
|
('NoSuchUpload', 404),
|
||||||
('NoSuchVersion', 404),
|
('NoSuchVersion', 404),
|
||||||
('NotSignedUp', 403),
|
('NotSignedUp', 403),
|
||||||
('NotSuchBucketPolicy', 404),
|
('NotSuchBucketPolicy', 404),
|
||||||
('OperationAborted', 409),
|
('OperationAborted', 409),
|
||||||
('PermanentRedirect', 301),
|
('PermanentRedirect', 301),
|
||||||
('PreconditionFailed', 412),
|
('PreconditionFailed', 412),
|
||||||
('Redirect', 307),
|
('Redirect', 307),
|
||||||
('RequestIsNotMultiPartContent', 400),
|
('RequestIsNotMultiPartContent', 400),
|
||||||
('RequestTimeout', 400),
|
('RequestTimeout', 400),
|
||||||
('RequestTimeTooSkewed', 403),
|
('RequestTimeTooSkewed', 403),
|
||||||
('RequestTorrentOfBucketError', 400),
|
('RequestTorrentOfBucketError', 400),
|
||||||
('SignatureDoesNotMatch', 403),
|
('SignatureDoesNotMatch', 403),
|
||||||
('TemporaryRedirect', 307),
|
('TemporaryRedirect', 307),
|
||||||
('TokenRefreshRequired', 400),
|
('TokenRefreshRequired', 400),
|
||||||
('TooManyBuckets', 400),
|
('TooManyBuckets', 400),
|
||||||
('UnexpectedContent', 400),
|
('UnexpectedContent', 400),
|
||||||
('UnresolvableGrantByEmailAddress', 400),
|
('UnresolvableGrantByEmailAddress', 400),
|
||||||
('UserKeyMustBeSpecified', 400)):
|
('UserKeyMustBeSpecified', 400)):
|
||||||
_add_matcher_class(BotoTestCase.s3_error_code.client,
|
_add_matcher_class(BotoTestCase.s3_error_code.client,
|
||||||
code, base=ClientError)
|
code, base=ClientError)
|
||||||
|
|
||||||
|
|
||||||
for code in (('InternalError', 500),
|
for code in (('InternalError', 500),
|
||||||
('NotImplemented', 501),
|
('NotImplemented', 501),
|
||||||
('ServiceUnavailable', 503),
|
('ServiceUnavailable', 503),
|
||||||
('SlowDown', 503)):
|
('SlowDown', 503)):
|
||||||
_add_matcher_class(BotoTestCase.s3_error_code.server,
|
_add_matcher_class(BotoTestCase.s3_error_code.server,
|
||||||
code, base=ServerError)
|
code, base=ServerError)
|
||||||
|
|
5
tox.ini
5
tox.ini
|
@ -110,7 +110,8 @@ import_exceptions = tempest.services
|
||||||
# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/
|
# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/
|
||||||
# H402 skipped because some docstrings aren't sentences
|
# H402 skipped because some docstrings aren't sentences
|
||||||
# E123 skipped because it is ignored by default in the default pep8
|
# E123 skipped because it is ignored by default in the default pep8
|
||||||
# Skipped because of new hacking 0.9: H405,H904,E129,E128
|
# E129 skipped because it is too limiting when combined with other rules
|
||||||
ignore = E125,H402,E123,H404,H405,H904,E129,E128
|
# Skipped because of new hacking 0.9: H405,H904
|
||||||
|
ignore = E125,H402,E123,E129,H404,H405,H904
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude = .git,.venv,.tox,dist,doc,openstack,*egg
|
exclude = .git,.venv,.tox,dist,doc,openstack,*egg
|
||||||
|
|
Loading…
Reference in New Issue