Add UUIDs to all tempest tests and gate check
Adds uuid4 as a decorator of the form: @test.idempotent_id('12345678-1234-1234-1234-123456789abc') to every test in the Tempest tree. Includes a gate check to ensure the existence and uniqueness of the ids. Modify check tool to ignore Tempest unit tests. Change-Id: I19e3c7dd555a3ea09d585fb9091c357a300e6559 Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com> Implements: bp test-uuid
This commit is contained in:
parent
296558cf41
commit
7579c1a40e
|
@ -18,6 +18,7 @@ class TestApiDiscovery(base.BaseBaremetalTest):
|
|||
"""Tests for API discovery features."""
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('a3c27e94-f56c-42c4-8600-d6790650b9c5')
|
||||
def test_api_versions(self):
|
||||
_, descr = self.client.get_api_description()
|
||||
expected_versions = ('v1',)
|
||||
|
@ -27,12 +28,14 @@ class TestApiDiscovery(base.BaseBaremetalTest):
|
|||
self.assertIn(v, versions)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('896283a6-488e-4f31-af78-6614286cbe0d')
|
||||
def test_default_version(self):
|
||||
_, descr = self.client.get_api_description()
|
||||
default_version = descr['default_version']
|
||||
self.assertEqual(default_version['id'], 'v1')
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('abc0b34d-e684-4546-9728-ab7a9ad9f174')
|
||||
def test_version_1_resources(self):
|
||||
_, descr = self.client.get_version_description(version='v1')
|
||||
expected_resources = ('nodes', 'chassis',
|
||||
|
|
|
@ -34,12 +34,14 @@ class TestChassis(base.BaseBaremetalTest):
|
|||
self.assertEqual(value, actual[key])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('7c5a2e09-699c-44be-89ed-2bc189992d42')
|
||||
def test_create_chassis(self):
|
||||
descr = data_utils.rand_name('test-chassis-')
|
||||
_, chassis = self.create_chassis(description=descr)
|
||||
self.assertEqual(chassis['description'], descr)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('cabe9c6f-dc16-41a7-b6b9-0a90c212edd5')
|
||||
def test_create_chassis_unicode_description(self):
|
||||
# Use a unicode string for testing:
|
||||
# 'We ♡ OpenStack in Ukraine'
|
||||
|
@ -48,17 +50,20 @@ class TestChassis(base.BaseBaremetalTest):
|
|||
self.assertEqual(chassis['description'], descr)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('c84644df-31c4-49db-a307-8942881f41c0')
|
||||
def test_show_chassis(self):
|
||||
_, chassis = self.client.show_chassis(self.chassis['uuid'])
|
||||
self._assertExpected(self.chassis, chassis)
|
||||
|
||||
@test.attr(type="smoke")
|
||||
@test.idempotent_id('29c9cd3f-19b5-417b-9864-99512c3b33b3')
|
||||
def test_list_chassis(self):
|
||||
_, body = self.client.list_chassis()
|
||||
self.assertIn(self.chassis['uuid'],
|
||||
[i['uuid'] for i in body['chassis']])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('5ae649ad-22d1-4fe1-bbc6-97227d199fb3')
|
||||
def test_delete_chassis(self):
|
||||
_, body = self.create_chassis()
|
||||
uuid = body['uuid']
|
||||
|
@ -67,6 +72,7 @@ class TestChassis(base.BaseBaremetalTest):
|
|||
self.assertRaises(lib_exc.NotFound, self.client.show_chassis, uuid)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('cda8a41f-6be2-4cbf-840c-994b00a89b44')
|
||||
def test_update_chassis(self):
|
||||
_, body = self.create_chassis()
|
||||
uuid = body['uuid']
|
||||
|
@ -78,6 +84,7 @@ class TestChassis(base.BaseBaremetalTest):
|
|||
self.assertEqual(chassis['description'], new_description)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('76305e22-a4e2-4ab3-855c-f4e2368b9335')
|
||||
def test_chassis_node_list(self):
|
||||
_, node = self.create_node(self.chassis['uuid'])
|
||||
_, body = self.client.list_chassis_nodes(self.chassis['uuid'])
|
||||
|
|
|
@ -27,12 +27,14 @@ class TestDrivers(base.BaseBaremetalTest):
|
|||
cls.driver_name = CONF.baremetal.driver
|
||||
|
||||
@test.attr(type="smoke")
|
||||
@test.idempotent_id('5aed2790-7592-4655-9b16-99abcc2e6ec5')
|
||||
def test_list_drivers(self):
|
||||
_, drivers = self.client.list_drivers()
|
||||
self.assertIn(self.driver_name,
|
||||
[d['name'] for d in drivers['drivers']])
|
||||
|
||||
@test.attr(type="smoke")
|
||||
@test.idempotent_id('fb3287a3-c4d7-44bf-ae9d-1eef906d78ce')
|
||||
def test_show_driver(self):
|
||||
_, driver = self.client.show_driver(self.driver_name)
|
||||
self.assertEqual(self.driver_name, driver['name'])
|
||||
|
|
|
@ -47,6 +47,7 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
return instance_uuid
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('4e939eb2-8a69-4e84-8652-6fffcbc9db8f')
|
||||
def test_create_node(self):
|
||||
params = {'cpu_arch': 'x86_64',
|
||||
'cpus': '12',
|
||||
|
@ -57,6 +58,7 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
self._assertExpected(params, body['properties'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('9ade60a4-505e-4259-9ec4-71352cbbaf47')
|
||||
def test_delete_node(self):
|
||||
_, node = self.create_node(self.chassis['uuid'])
|
||||
|
||||
|
@ -66,17 +68,20 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
node['uuid'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('55451300-057c-4ecf-8255-ba42a83d3a03')
|
||||
def test_show_node(self):
|
||||
_, loaded_node = self.client.show_node(self.node['uuid'])
|
||||
self._assertExpected(self.node, loaded_node)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('4ca123c4-160d-4d8d-a3f7-15feda812263')
|
||||
def test_list_nodes(self):
|
||||
_, body = self.client.list_nodes()
|
||||
self.assertIn(self.node['uuid'],
|
||||
[i['uuid'] for i in body['nodes']])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('85b1f6e0-57fd-424c-aeff-c3422920556f')
|
||||
def test_list_nodes_association(self):
|
||||
_, body = self.client.list_nodes(associated=True)
|
||||
self.assertNotIn(self.node['uuid'],
|
||||
|
@ -91,6 +96,7 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
self.assertNotIn(self.node['uuid'], [n['uuid'] for n in body['nodes']])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('18c4ebd8-f83a-4df7-9653-9fb33a329730')
|
||||
def test_node_port_list(self):
|
||||
_, port = self.create_port(self.node['uuid'],
|
||||
data_utils.rand_mac_address())
|
||||
|
@ -99,12 +105,14 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
[p['uuid'] for p in body['ports']])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('72591acb-f215-49db-8395-710d14eb86ab')
|
||||
def test_node_port_list_no_ports(self):
|
||||
_, node = self.create_node(self.chassis['uuid'])
|
||||
_, body = self.client.list_node_ports(node['uuid'])
|
||||
self.assertEmpty(body['ports'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('4fed270a-677a-4d19-be87-fd38ae490320')
|
||||
def test_update_node(self):
|
||||
props = {'cpu_arch': 'x86_64',
|
||||
'cpus': '12',
|
||||
|
@ -123,6 +131,7 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
self._assertExpected(new_p, node['properties'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('cbf1f515-5f4b-4e49-945c-86bcaccfeb1d')
|
||||
def test_validate_driver_interface(self):
|
||||
_, body = self.client.validate_driver_interface(self.node['uuid'])
|
||||
core_interfaces = ['power', 'deploy']
|
||||
|
@ -130,10 +139,12 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
self.assertIn(interface, body)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('5519371c-26a2-46e9-aa1a-f74226e9d71f')
|
||||
def test_set_node_boot_device(self):
|
||||
self.client.set_node_boot_device(self.node['uuid'], 'pxe')
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('9ea73775-f578-40b9-bc34-efc639c4f21f')
|
||||
def test_get_node_boot_device(self):
|
||||
body = self.client.get_node_boot_device(self.node['uuid'])
|
||||
self.assertIn('boot_device', body)
|
||||
|
@ -142,12 +153,14 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
self.assertTrue(isinstance(body['persistent'], bool))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('3622bc6f-3589-4bc2-89f3-50419c66b133')
|
||||
def test_get_node_supported_boot_devices(self):
|
||||
body = self.client.get_node_supported_boot_devices(self.node['uuid'])
|
||||
self.assertIn('supported_boot_devices', body)
|
||||
self.assertTrue(isinstance(body['supported_boot_devices'], list))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('f63b6288-1137-4426-8cfe-0d5b7eb87c06')
|
||||
def test_get_console(self):
|
||||
_, body = self.client.get_console(self.node['uuid'])
|
||||
con_info = ['console_enabled', 'console_info']
|
||||
|
@ -155,6 +168,7 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
self.assertIn(key, body)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('80504575-9b21-4670-92d1-143b948f9437')
|
||||
def test_set_console_mode(self):
|
||||
self.client.set_console_mode(self.node['uuid'], True)
|
||||
|
||||
|
@ -162,6 +176,7 @@ class TestNodes(base.BaseBaremetalTest):
|
|||
self.assertEqual(True, body['console_enabled'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('b02a4f38-5e8b-44b2-aed2-a69a36ecfd69')
|
||||
def test_get_node_by_instance_uuid(self):
|
||||
instance_uuid = self._associate_node_with_instance()
|
||||
_, body = self.client.show_node_by_instance_uuid(instance_uuid)
|
||||
|
|
|
@ -42,12 +42,14 @@ class TestNodeStates(base.BaseBaremetalTest):
|
|||
raise exceptions.TimeoutException(message)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('cd8afa5e-3f57-4e43-8185-beb83d3c9015')
|
||||
def test_list_nodestates(self):
|
||||
_, nodestates = self.client.list_nodestates(self.node['uuid'])
|
||||
for key in nodestates:
|
||||
self.assertEqual(nodestates[key], self.node[key])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('fc5b9320-0c98-4e5a-8848-877fe5a0322c')
|
||||
def test_set_node_power_state(self):
|
||||
_, node = self.create_node(self.chassis['uuid'])
|
||||
states = ["power on", "rebooting", "power off"]
|
||||
|
|
|
@ -37,6 +37,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self.assertEqual(value, actual[key])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('83975898-2e50-42ed-b5f0-e510e36a0b56')
|
||||
def test_create_port(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -48,6 +49,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self._assertExpected(port, body)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('d1f6b249-4cf6-4fe6-9ed6-a6e84b1bf67b')
|
||||
def test_create_port_specifying_uuid(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -61,6 +63,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
|
||||
@decorators.skip_because(bug='1398350')
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('4a02c4b0-6573-42a4-a513-2e36ad485b62')
|
||||
def test_create_port_with_extra(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -74,6 +77,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self._assertExpected(port, body)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('1bf257a9-aea3-494e-89c0-63f657ab4fdd')
|
||||
def test_delete_port(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -85,16 +89,19 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
port['uuid'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('9fa77ab5-ce59-4f05-baac-148904ba1597')
|
||||
def test_show_port(self):
|
||||
_, port = self.client.show_port(self.port['uuid'])
|
||||
self._assertExpected(self.port, port)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('7c1114ff-fc3f-47bb-bc2f-68f61620ba8b')
|
||||
def test_show_port_by_address(self):
|
||||
_, port = self.client.show_port_by_address(self.port['address'])
|
||||
self._assertExpected(self.port, port['ports'][0])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('bd773405-aea5-465d-b576-0ab1780069e5')
|
||||
def test_show_port_with_links(self):
|
||||
_, port = self.client.show_port(self.port['uuid'])
|
||||
self.assertIn('links', port.keys())
|
||||
|
@ -102,6 +109,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self.assertIn(port['uuid'], port['links'][0]['href'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('b5e91854-5cd7-4a8e-bb35-3e0a1314606d')
|
||||
def test_list_ports(self):
|
||||
_, body = self.client.list_ports()
|
||||
self.assertIn(self.port['uuid'],
|
||||
|
@ -112,12 +120,14 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
port['links'][0]['href'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('324a910e-2f80-4258-9087-062b5ae06240')
|
||||
def test_list_with_limit(self):
|
||||
_, body = self.client.list_ports(limit=3)
|
||||
|
||||
next_marker = body['ports'][-1]['uuid']
|
||||
self.assertIn(next_marker, body['next'])
|
||||
|
||||
@test.idempotent_id('8a94b50f-9895-4a63-a574-7ecff86e5875')
|
||||
def test_list_ports_details(self):
|
||||
node_id = self.node['uuid']
|
||||
|
||||
|
@ -142,6 +152,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self.validate_self_link('ports', port['uuid'],
|
||||
port['links'][0]['href'])
|
||||
|
||||
@test.idempotent_id('8a03f688-7d75-4ecd-8cbc-e06b8f346738')
|
||||
def test_list_ports_details_with_address(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -155,6 +166,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self.assertEqual(address, body['ports'][0]['address'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('9c26298b-1bcb-47b7-9b9e-8bdd6e3c4aba')
|
||||
def test_update_port_replace(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -187,6 +199,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self.assertEqual(new_extra, body['extra'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('d7e7fece-6ed9-460a-9ebe-9267217e8580')
|
||||
def test_update_port_remove(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -214,6 +227,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
self.assertEqual(address, body['address'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('241288b3-e98a-400f-a4d7-d1f716146361')
|
||||
def test_update_port_add(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -236,6 +250,7 @@ class TestPorts(base.BaseBaremetalTest):
|
|||
|
||||
@decorators.skip_because(bug='1398350')
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('5309e897-0799-4649-a982-0179b04c3876')
|
||||
def test_update_port_mixed_ops(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
|
|
@ -27,6 +27,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
_, self.node = self.create_node(self.chassis['uuid'])
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('0a6ee1f7-d0d9-4069-8778-37f3aa07303a')
|
||||
def test_create_port_malformed_mac(self):
|
||||
node_id = self.node['uuid']
|
||||
address = 'malformed:mac'
|
||||
|
@ -35,6 +36,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.create_port, node_id=node_id, address=address)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('30277ee8-0c60-4f1d-b125-0e51c2f43369')
|
||||
def test_create_port_nonexsistent_node_id(self):
|
||||
node_id = str(data_utils.rand_uuid())
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -42,21 +44,25 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
node_id=node_id, address=address)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('029190f6-43e1-40a3-b64a-65173ba653a3')
|
||||
def test_show_port_malformed_uuid(self):
|
||||
self.assertRaises(lib_exc.BadRequest, self.client.show_port,
|
||||
'malformed:uuid')
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('0d00e13d-e2e0-45b1-bcbc-55a6d90ca793')
|
||||
def test_show_port_nonexistent_uuid(self):
|
||||
self.assertRaises(lib_exc.NotFound, self.client.show_port,
|
||||
data_utils.rand_uuid())
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('4ad85266-31e9-4942-99ac-751897dc9e23')
|
||||
def test_show_port_by_mac_not_allowed(self):
|
||||
self.assertRaises(lib_exc.BadRequest, self.client.show_port,
|
||||
data_utils.rand_mac_address())
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('89a34380-3c61-4c32-955c-2cd9ce94da21')
|
||||
def test_create_port_duplicated_port_uuid(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -67,6 +73,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
address=address, uuid=uuid)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('65e84917-733c-40ae-ae4b-96a4adff931c')
|
||||
def test_create_port_no_mandatory_field_node_id(self):
|
||||
address = data_utils.rand_mac_address()
|
||||
|
||||
|
@ -74,6 +81,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
address=address)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('bcea3476-7033-4183-acfe-e56a30809b46')
|
||||
def test_create_port_no_mandatory_field_mac(self):
|
||||
node_id = self.node['uuid']
|
||||
|
||||
|
@ -81,6 +89,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
node_id=node_id, address=None)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('2b51cd18-fb95-458b-9780-e6257787b649')
|
||||
def test_create_port_malformed_port_uuid(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -90,12 +99,14 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
node_id=node_id, address=address, uuid=uuid)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('583a6856-6a30-4ac4-889f-14e2adff8105')
|
||||
def test_create_port_malformed_node_id(self):
|
||||
address = data_utils.rand_mac_address()
|
||||
self.assertRaises(lib_exc.BadRequest, self.create_port,
|
||||
node_id='malformed:nodeid', address=address)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('e27f8b2e-42c6-4a43-a3cd-accff716bc5c')
|
||||
def test_create_port_duplicated_mac(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -105,6 +116,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
address=address)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('8907082d-ac5e-4be3-b05f-d072ede82020')
|
||||
def test_update_port_by_mac_not_allowed(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -121,6 +133,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
patch)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('df1ac70c-db9f-41d9-90f1-78cd6b905718')
|
||||
def test_update_port_nonexistent(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -139,6 +152,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.client.update_port, port_id, patch)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('c701e315-aa52-41ea-817c-65c5ca8ca2a8')
|
||||
def test_update_port_malformed_port_uuid(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -152,6 +166,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
'value': new_address}])
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('f8f15803-34d6-45dc-b06f-e5e04bf1b38b')
|
||||
def test_update_port_add_nonexistent_property(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -164,6 +179,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
'value': 'value'}])
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('898ec904-38b1-4fcb-9584-1187d4263a2a')
|
||||
def test_update_port_replace_node_id_with_malformed(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -178,6 +194,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.client.update_port, port_id, patch)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('2949f30f-5f59-43fa-a6d9-4eac578afab4')
|
||||
def test_update_port_replace_mac_with_duplicated(self):
|
||||
node_id = self.node['uuid']
|
||||
address1 = data_utils.rand_mac_address()
|
||||
|
@ -195,6 +212,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.client.update_port, port_id, patch)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('97f6e048-6e4f-4eba-a09d-fbbc78b77a77')
|
||||
def test_update_port_replace_node_id_with_nonexistent(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -209,6 +227,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.client.update_port, port_id, patch)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('375022c5-9e9e-4b11-9ca4-656729c0c9b2')
|
||||
def test_update_port_replace_mac_with_malformed(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -224,6 +243,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.client.update_port, port_id, patch)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('5722b853-03fc-4854-8308-2036a1b67d85')
|
||||
def test_update_port_replace_nonexistent_property(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -237,6 +257,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.client.update_port, port_id, patch)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('ae2696ca-930a-4a7f-918f-30ae97c60f56')
|
||||
def test_update_port_remove_mandatory_field_mac(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -248,6 +269,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
[{'path': '/address', 'op': 'remove'}])
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('5392c1f0-2071-4697-9064-ec2d63019018')
|
||||
def test_update_port_remove_mandatory_field_port_uuid(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -259,6 +281,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
[{'path': '/uuid', 'op': 'remove'}])
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('06b50d82-802a-47ef-b079-0a3311cf85a2')
|
||||
def test_update_port_remove_nonexistent_property(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -270,6 +293,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
[{'path': '/nonexistent', 'op': 'remove'}])
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('03d42391-2145-4a6c-95bf-63fe55eb64fd')
|
||||
def test_delete_port_by_mac_not_allowed(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
@ -278,6 +302,7 @@ class TestPortsNegative(base.BaseBaremetalTest):
|
|||
self.assertRaises(lib_exc.BadRequest, self.client.delete_port, address)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('0629e002-818e-4763-b25b-ae5e07b1cb23')
|
||||
def test_update_port_mixed_ops_integrity(self):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
|
|
@ -61,6 +61,7 @@ class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
return kwargs
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('1fc6bdc8-0b6d-4cc7-9f30-9b04fabe5b90')
|
||||
def test_create_agent(self):
|
||||
# Create an agent.
|
||||
params = self._param_helper(
|
||||
|
@ -73,6 +74,7 @@ class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(value, body[expected_item])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('dc9ffd51-1c50-4f0e-a820-ae6d2a568a9e')
|
||||
def test_update_agent(self):
|
||||
# Update an agent.
|
||||
params = self._param_helper(
|
||||
|
@ -83,6 +85,7 @@ class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(value, body[expected_item])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('470e0b89-386f-407b-91fd-819737d0b335')
|
||||
def test_delete_agent(self):
|
||||
# Delete an agent.
|
||||
self.client.delete_agent(self.agent_id)
|
||||
|
@ -92,6 +95,7 @@ class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertNotIn(self.agent_id, map(lambda x: x['agent_id'], agents))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6a326c69-654b-438a-80a3-34bcc454e138')
|
||||
def test_list_agents(self):
|
||||
# List all agents.
|
||||
agents = self.client.list_agents()
|
||||
|
@ -99,6 +103,7 @@ class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(self.agent_id, map(lambda x: x['agent_id'], agents))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('eabadde4-3cd7-4ec4-a4b5-5a936d2d4408')
|
||||
def test_list_agents_with_filter(self):
|
||||
# List the agent builds by the filter.
|
||||
params = self._param_helper(
|
||||
|
|
|
@ -50,6 +50,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
pass
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('0d148aa3-d54c-4317-aa8d-42040a475e20')
|
||||
def test_aggregate_create_delete(self):
|
||||
# Create and delete an aggregate.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -62,6 +63,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.client.wait_for_resource_deletion(aggregate['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('5873a6f8-671a-43ff-8838-7ce430bb6d0b')
|
||||
def test_aggregate_create_delete_with_az(self):
|
||||
# Create and delete an aggregate.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -76,6 +78,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.client.wait_for_resource_deletion(aggregate['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('68089c38-04b1-4758-bdf0-cf0daec4defd')
|
||||
def test_aggregate_create_verify_entry_in_list(self):
|
||||
# Create an aggregate and ensure it is listed.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -88,6 +91,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregates))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('36ec92ca-7a73-43bc-b920-7531809e8540')
|
||||
def test_aggregate_create_update_metadata_get_details(self):
|
||||
# Create an aggregate and ensure its details are returned.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -110,6 +114,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(meta, body["metadata"])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('4d2b2004-40fa-40a1-aab2-66f4dab81beb')
|
||||
def test_aggregate_create_update_with_az(self):
|
||||
# Update an aggregate and ensure properties are updated correctly
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -139,6 +144,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregates))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('c8e85064-e79b-4906-9931-c11c24294d02')
|
||||
def test_aggregate_add_remove_host(self):
|
||||
# Add an host to the given aggregate and remove.
|
||||
self.useFixture(fixtures.LockFixture('availability_zone'))
|
||||
|
@ -159,6 +165,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertNotIn(self.host, body['hosts'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7f6a1cc5-2446-4cdb-9baa-b6ae0a919b72')
|
||||
def test_aggregate_add_host_list(self):
|
||||
# Add an host to the given aggregate and list.
|
||||
self.useFixture(fixtures.LockFixture('availability_zone'))
|
||||
|
@ -177,6 +184,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(self.host, agg['hosts'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('eeef473c-7c52-494d-9f09-2ed7fc8fc036')
|
||||
def test_aggregate_add_host_get_details(self):
|
||||
# Add an host to the given aggregate and get details.
|
||||
self.useFixture(fixtures.LockFixture('availability_zone'))
|
||||
|
@ -192,6 +200,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(self.host, body['hosts'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('96be03c7-570d-409c-90f8-e4db3c646996')
|
||||
def test_aggregate_add_host_create_server_with_az(self):
|
||||
# Add an host to the given aggregate and create a server.
|
||||
self.useFixture(fixtures.LockFixture('availability_zone'))
|
||||
|
|
|
@ -41,6 +41,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.host = hosts[0]
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('86a1cb14-da37-4a70-b056-903fd56dfe29')
|
||||
def test_aggregate_create_as_user(self):
|
||||
# Regular user is not allowed to create an aggregate.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -49,6 +50,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
name=aggregate_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('3b8a1929-3793-4e92-bcb4-dfa572ee6c1d')
|
||||
def test_aggregate_create_aggregate_name_length_less_than_1(self):
|
||||
# the length of aggregate name should >= 1 and <=255
|
||||
self.assertRaises(lib_exc.BadRequest,
|
||||
|
@ -56,6 +58,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
name='')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('4c194563-543b-4e70-a719-557bbe947fac')
|
||||
def test_aggregate_create_aggregate_name_length_exceeds_255(self):
|
||||
# the length of aggregate name should >= 1 and <=255
|
||||
aggregate_name = 'a' * 256
|
||||
|
@ -64,6 +67,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
name=aggregate_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('9c23a291-b0b1-487b-b464-132e061151b3')
|
||||
def test_aggregate_create_with_existent_aggregate_name(self):
|
||||
# creating an aggregate with existent aggregate name is forbidden
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -75,6 +79,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
name=aggregate_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('cd6de795-c15d-45f1-8d9e-813c6bb72a3d')
|
||||
def test_aggregate_delete_as_user(self):
|
||||
# Regular user is not allowed to delete an aggregate.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -86,12 +91,14 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregate['id'])
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('b7d475a6-5dcd-4ff4-b70a-cd9de66a6672')
|
||||
def test_aggregate_list_as_user(self):
|
||||
# Regular user is not allowed to list aggregates.
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
self.user_client.list_aggregates)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('557cad12-34c9-4ff4-95f0-22f0dfbaf7dc')
|
||||
def test_aggregate_get_details_as_user(self):
|
||||
# Regular user is not allowed to get aggregate details.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -103,18 +110,21 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregate['id'])
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('c74f4bf1-4708-4ff2-95a0-f49eaca951bd')
|
||||
def test_aggregate_delete_with_invalid_id(self):
|
||||
# Delete an aggregate with invalid id should raise exceptions.
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.client.delete_aggregate, -1)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('3c916244-2c46-49a4-9b55-b20bb0ae512c')
|
||||
def test_aggregate_get_details_with_invalid_id(self):
|
||||
# Get aggregate details with invalid id should raise exceptions.
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.client.get_aggregate, -1)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0ef07828-12b4-45ba-87cc-41425faf5711')
|
||||
def test_aggregate_add_non_exist_host(self):
|
||||
# Adding a non-exist host to an aggregate should raise exceptions.
|
||||
hosts_all = self.os_adm.hosts_client.list_hosts()
|
||||
|
@ -132,6 +142,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregate['id'], non_exist_host)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7324c334-bd13-4c93-8521-5877322c3d51')
|
||||
def test_aggregate_add_host_as_user(self):
|
||||
# Regular user is not allowed to add a host to an aggregate.
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -143,6 +154,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregate['id'], self.host)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('19dd44e1-c435-4ee1-a402-88c4f90b5950')
|
||||
def test_aggregate_add_existent_host(self):
|
||||
self.useFixture(fixtures.LockFixture('availability_zone'))
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
@ -156,6 +168,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregate['id'], self.host)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7a53af20-137a-4e44-a4ae-e19260e626d9')
|
||||
def test_aggregate_remove_host_as_user(self):
|
||||
# Regular user is not allowed to remove a host from an aggregate.
|
||||
self.useFixture(fixtures.LockFixture('availability_zone'))
|
||||
|
@ -170,6 +183,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
aggregate['id'], self.host)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('95d6a6fa-8da9-4426-84d0-eec0329f2e4d')
|
||||
def test_aggregate_remove_nonexistent_host(self):
|
||||
non_exist_host = data_utils.rand_name('nonexist_host_')
|
||||
aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
|
||||
|
|
|
@ -29,12 +29,14 @@ class AZAdminV2TestJSON(base.BaseComputeAdminTest):
|
|||
cls.client = cls.availability_zone_admin_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('d3431479-8a09-4f76-aa2d-26dc580cb27c')
|
||||
def test_get_availability_zone_list(self):
|
||||
# List of availability zone
|
||||
availability_zone = self.client.get_availability_zone_list()
|
||||
self.assertTrue(len(availability_zone) > 0)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ef726c58-530f-44c2-968c-c7bed22d5b8c')
|
||||
def test_get_availability_zone_list_detail(self):
|
||||
# List of availability zones and available services
|
||||
availability_zone = self.client.get_availability_zone_list_detail()
|
||||
|
|
|
@ -30,6 +30,7 @@ class AZAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.non_adm_client = cls.availability_zone_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('bf34dca2-fdc3-4073-9c02-7648d9eae0d7')
|
||||
def test_get_availability_zone_list_detail_with_non_admin_user(self):
|
||||
# List of availability zones and available services with
|
||||
# non-administrator user
|
||||
|
|
|
@ -33,6 +33,7 @@ class BaremetalNodesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.client = cls.os_adm.baremetal_nodes_client
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('e475aa6e-416d-4fa4-b3af-28d5e84250fb')
|
||||
def test_list_baremetal_nodes(self):
|
||||
# List all baremetal nodes.
|
||||
baremetal_nodes = self.client.list_baremetal_nodes()
|
||||
|
|
|
@ -40,18 +40,21 @@ class FixedIPsTestJson(base.BaseV2ComputeAdminTest):
|
|||
break
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('16b7d848-2f7c-4709-85a3-2dfb4576cc52')
|
||||
@test.services('network')
|
||||
def test_list_fixed_ip_details(self):
|
||||
fixed_ip = self.client.get_fixed_ip_details(self.ip)
|
||||
self.assertEqual(fixed_ip['address'], self.ip)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('5485077b-7e46-4cec-b402-91dc3173433b')
|
||||
@test.services('network')
|
||||
def test_set_reserve(self):
|
||||
body = {"reserve": "None"}
|
||||
self.client.reserve_fixed_ip(self.ip, body)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7476e322-b9ff-4710-bf82-49d51bac6e2e')
|
||||
@test.services('network')
|
||||
def test_set_unreserve(self):
|
||||
body = {"unreserve": "None"}
|
||||
|
|
|
@ -42,12 +42,14 @@ class FixedIPsNegativeTestJson(base.BaseV2ComputeAdminTest):
|
|||
break
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('9f17f47d-daad-4adc-986e-12370c93e407')
|
||||
@test.services('network')
|
||||
def test_list_fixed_ip_details_with_non_admin_user(self):
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
self.non_admin_client.get_fixed_ip_details, self.ip)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('ce60042c-fa60-4836-8d43-1c8e3359dc47')
|
||||
@test.services('network')
|
||||
def test_set_reserve_with_non_admin_user(self):
|
||||
body = {"reserve": "None"}
|
||||
|
@ -56,6 +58,7 @@ class FixedIPsNegativeTestJson(base.BaseV2ComputeAdminTest):
|
|||
self.ip, body)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f1f7a35b-0390-48c5-9803-5f27461439db')
|
||||
@test.services('network')
|
||||
def test_set_unreserve_with_non_admin_user(self):
|
||||
body = {"unreserve": "None"}
|
||||
|
@ -64,6 +67,7 @@ class FixedIPsNegativeTestJson(base.BaseV2ComputeAdminTest):
|
|||
self.ip, body)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f51cf464-7fc5-4352-bc3e-e75cfa2cb717')
|
||||
@test.services('network')
|
||||
def test_set_reserve_with_invalid_ip(self):
|
||||
# NOTE(maurosr): since this exercises the same code snippet, we do it
|
||||
|
@ -77,6 +81,7 @@ class FixedIPsNegativeTestJson(base.BaseV2ComputeAdminTest):
|
|||
"my.invalid.ip", body)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('fd26ef50-f135-4232-9d32-281aab3f9176')
|
||||
@test.services('network')
|
||||
def test_fixed_ip_with_invalid_action(self):
|
||||
body = {"invalid_action": "None"}
|
||||
|
|
|
@ -79,18 +79,21 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
return flavor['id']
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('8b4330e1-12c4-4554-9390-e6639971f086')
|
||||
def test_create_flavor_with_int_id(self):
|
||||
flavor_id = data_utils.rand_int_id(start=1000)
|
||||
new_flavor_id = self._create_flavor(flavor_id)
|
||||
self.assertEqual(new_flavor_id, str(flavor_id))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('94c9bb4e-2c2a-4f3c-bb1f-5f0daf918e6d')
|
||||
def test_create_flavor_with_uuid_id(self):
|
||||
flavor_id = str(uuid.uuid4())
|
||||
new_flavor_id = self._create_flavor(flavor_id)
|
||||
self.assertEqual(new_flavor_id, flavor_id)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f83fe669-6758-448a-a85e-32d351f36fe0')
|
||||
def test_create_flavor_with_none_id(self):
|
||||
# If nova receives a request with None as flavor_id,
|
||||
# nova generates flavor_id of uuid.
|
||||
|
@ -99,6 +102,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(new_flavor_id, str(uuid.UUID(new_flavor_id)))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('8261d7b0-be58-43ec-a2e5-300573c3f6c5')
|
||||
def test_create_flavor_verify_entry_in_list_details(self):
|
||||
# Create a flavor and ensure it's details are listed
|
||||
# This operation requires the user to have 'admin' role
|
||||
|
@ -123,6 +127,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertTrue(flag)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('63dc64e6-2e79-4fdf-868f-85500d308d66')
|
||||
def test_create_list_flavor_without_extra_data(self):
|
||||
# Create a flavor and ensure it is listed
|
||||
# This operation requires the user to have 'admin' role
|
||||
|
@ -164,6 +169,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertTrue(flag)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('be6cc18c-7c5d-48c0-ac16-17eaf03c54eb')
|
||||
def test_list_non_public_flavor(self):
|
||||
# Create a flavor with os-flavor-access:is_public false.
|
||||
# The flavor should not be present in list_details as the
|
||||
|
@ -196,6 +202,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertFalse(flag)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('bcc418ef-799b-47cc-baa1-ce01368b8987')
|
||||
def test_create_server_with_non_public_flavor(self):
|
||||
# Create a flavor with os-flavor-access:is_public false
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
@ -215,6 +222,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
'test', self.image_ref, flavor['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b345b196-bfbd-4231-8ac1-6d7fe15ff3a3')
|
||||
def test_list_public_flavor_with_other_user(self):
|
||||
# Create a Flavor with public access.
|
||||
# Try to List/Get flavor with another user
|
||||
|
@ -238,6 +246,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertTrue(flag)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('fb9cbde6-3a0e-41f2-a983-bdb0a823c44e')
|
||||
def test_is_public_string_variations(self):
|
||||
flavor_id_not_public = data_utils.rand_int_id(start=1000)
|
||||
flavor_name_not_public = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
@ -280,6 +289,7 @@ class FlavorsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
flavor_name_public)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3b541a2e-2ac2-4b42-8b8d-ba6e22fcd4da')
|
||||
def test_create_flavor_using_string_ram(self):
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
new_flavor_id = data_utils.rand_int_id(start=1000)
|
||||
|
|
|
@ -44,6 +44,7 @@ class FlavorsAccessTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.disk = 10
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ea2c2211-29fa-4db9-97c3-906d36fad3e0')
|
||||
def test_flavor_access_list_with_private_flavor(self):
|
||||
# Test to make sure that list flavor access on a newly created
|
||||
# private flavor will return an empty access list
|
||||
|
@ -59,6 +60,7 @@ class FlavorsAccessTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(len(flavor_access), 0, str(flavor_access))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('59e622f6-bdf6-45e3-8ba8-fedad905a6b4')
|
||||
def test_flavor_access_add_remove(self):
|
||||
# Test to add and remove flavor access to a given tenant.
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
|
|
@ -43,6 +43,7 @@ class FlavorsAccessNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.disk = 10
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0621c53e-d45d-40e7-951d-43e5e257b272')
|
||||
def test_flavor_access_list_with_public_flavor(self):
|
||||
# Test to list flavor access with exceptions by querying public flavor
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
@ -58,6 +59,7 @@ class FlavorsAccessNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
new_flavor_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('41eaaade-6d37-4f28-9c74-f21b46ca67bd')
|
||||
def test_flavor_non_admin_add(self):
|
||||
# Test to add flavor access as a user without admin privileges.
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
@ -74,6 +76,7 @@ class FlavorsAccessNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.tenant_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('073e79a6-c311-4525-82dc-6083d919cb3a')
|
||||
def test_flavor_non_admin_remove(self):
|
||||
# Test to remove flavor access as a user without admin privileges.
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
@ -94,6 +97,7 @@ class FlavorsAccessNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.tenant_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f3592cc0-0306-483c-b210-9a7b5346eddc')
|
||||
def test_add_flavor_access_duplicate(self):
|
||||
# Create a new flavor.
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
@ -118,6 +122,7 @@ class FlavorsAccessNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.tenant_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('1f710927-3bc7-4381-9f82-0ca6e42644b7')
|
||||
def test_remove_flavor_access_not_found(self):
|
||||
# Create a new flavor.
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
|
|
@ -57,6 +57,7 @@ class FlavorsExtraSpecsTestJSON(base.BaseV2ComputeAdminTest):
|
|||
super(FlavorsExtraSpecsTestJSON, cls).resource_cleanup()
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('0b2f9d4b-1ca2-4b99-bb40-165d4bb94208')
|
||||
def test_flavor_set_get_update_show_unset_keys(self):
|
||||
# Test to SET, GET, UPDATE, SHOW, UNSET flavor extra
|
||||
# spec as a user with admin privileges.
|
||||
|
@ -87,6 +88,7 @@ class FlavorsExtraSpecsTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.client.unset_flavor_extra_spec(self.flavor['id'], "key2")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a99dad88-ae1c-4fba-aeb4-32f898218bd0')
|
||||
def test_flavor_non_admin_get_all_keys(self):
|
||||
specs = {"key1": "value1", "key2": "value2"}
|
||||
self.client.set_flavor_extra_spec(self.flavor['id'], specs)
|
||||
|
@ -96,6 +98,7 @@ class FlavorsExtraSpecsTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(body[key], specs[key])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('12805a7f-39a3-4042-b989-701d5cad9c90')
|
||||
def test_flavor_non_admin_get_specific_key(self):
|
||||
specs = {"key1": "value1", "key2": "value2"}
|
||||
body = self.client.set_flavor_extra_spec(self.flavor['id'], specs)
|
||||
|
|
|
@ -59,6 +59,7 @@ class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
super(FlavorsExtraSpecsNegativeTestJSON, cls).resource_cleanup()
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a00a3b81-5641-45a8-ab2b-4a8ec41e1d7d')
|
||||
def test_flavor_non_admin_set_keys(self):
|
||||
# Test to SET flavor extra spec as a user without admin privileges.
|
||||
specs = {"key1": "value1", "key2": "value2"}
|
||||
|
@ -68,6 +69,7 @@ class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
specs)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('1ebf4ef8-759e-48fe-a801-d451d80476fb')
|
||||
def test_flavor_non_admin_update_specific_key(self):
|
||||
# non admin user is not allowed to update flavor extra spec
|
||||
specs = {"key1": "value1", "key2": "value2"}
|
||||
|
@ -82,6 +84,7 @@ class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
key1='value1_new')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('28f12249-27c7-44c1-8810-1f382f316b11')
|
||||
def test_flavor_non_admin_unset_keys(self):
|
||||
specs = {"key1": "value1", "key2": "value2"}
|
||||
self.client.set_flavor_extra_spec(self.flavor['id'], specs)
|
||||
|
@ -92,6 +95,7 @@ class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
'key1')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('440b9f3f-3c7f-4293-a106-0ceda350f8de')
|
||||
def test_flavor_unset_nonexistent_key(self):
|
||||
nonexistent_key = data_utils.rand_name('flavor_key')
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -100,6 +104,7 @@ class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexistent_key)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('329a7be3-54b2-48be-8052-bf2ce4afd898')
|
||||
def test_flavor_get_nonexistent_key(self):
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.flavors_client.get_flavor_extra_spec_with_key,
|
||||
|
@ -107,6 +112,7 @@ class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
"nonexistent_key")
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('25b822b8-9f49-44f6-80de-d99f0482e5cb')
|
||||
def test_flavor_update_mismatch_key(self):
|
||||
# the key will be updated should be match the key in the body
|
||||
self.assertRaises(lib_exc.BadRequest,
|
||||
|
@ -116,6 +122,7 @@ class FlavorsExtraSpecsNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
key1="value")
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f5889590-bf66-41cc-b4b1-6e6370cfd93f')
|
||||
def test_flavor_update_more_key(self):
|
||||
# there should be just one item in the request body
|
||||
self.assertRaises(lib_exc.BadRequest,
|
||||
|
|
|
@ -53,6 +53,7 @@ class FlavorsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.rxtx = 2
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('404451c0-c1ae-4448-8d50-d74f26f93ec8')
|
||||
def test_get_flavor_details_for_deleted_flavor(self):
|
||||
# Delete a flavor and ensure it is not listed
|
||||
# Create a test flavor
|
||||
|
@ -84,6 +85,7 @@ class FlavorsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertTrue(flag)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6f56e7b7-7500-4d0c-9913-880ca1efed87')
|
||||
def test_create_flavor_as_user(self):
|
||||
# only admin user can create a flavor
|
||||
flavor_name = data_utils.rand_name(self.flavor_name_prefix)
|
||||
|
@ -96,6 +98,7 @@ class FlavorsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
swap=self.swap, rxtx=self.rxtx)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a9a6dc02-8c14-4e05-a1ca-3468d4214882')
|
||||
def test_delete_flavor_as_user(self):
|
||||
# only admin user can delete a flavor
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
|
|
|
@ -57,6 +57,7 @@ class FloatingIPsBulkAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
pass
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('2c8f145f-8012-4cb8-ac7e-95a587f0e4ab')
|
||||
@test.services('network')
|
||||
def test_create_list_delete_floating_ips_bulk(self):
|
||||
# Create, List and delete the Floating IPs Bulk
|
||||
|
|
|
@ -29,11 +29,13 @@ class HostsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.client = cls.os_adm.hosts_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9bfaf98d-e2cb-44b0-a07e-2558b2821e4f')
|
||||
def test_list_hosts(self):
|
||||
hosts = self.client.list_hosts()
|
||||
self.assertTrue(len(hosts) >= 2, str(hosts))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('5dc06f5b-d887-47a2-bb2a-67762ef3c6de')
|
||||
def test_list_hosts_with_zone(self):
|
||||
self.useFixture(fixtures.LockFixture('availability_zone'))
|
||||
hosts = self.client.list_hosts()
|
||||
|
@ -45,6 +47,7 @@ class HostsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(host, hosts)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9af3c171-fbf4-4150-a624-22109733c2a6')
|
||||
def test_list_hosts_with_a_blank_zone(self):
|
||||
# If send the request with a blank zone, the request will be successful
|
||||
# and it will return all the hosts list
|
||||
|
@ -53,6 +56,7 @@ class HostsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertNotEqual(0, len(hosts))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('c6ddbadb-c94e-4500-b12f-8ffc43843ff8')
|
||||
def test_list_hosts_with_nonexistent_zone(self):
|
||||
# If send the request with a nonexistent zone, the request will be
|
||||
# successful and no hosts will be retured
|
||||
|
@ -61,6 +65,7 @@ class HostsAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(0, len(hosts))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('38adbb12-aee2-4498-8aec-329c72423aa4')
|
||||
def test_show_host_detail(self):
|
||||
hosts = self.client.list_hosts()
|
||||
|
||||
|
|
|
@ -38,17 +38,20 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
return hostname
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('dd032027-0210-4d9c-860e-69b1b8deed5f')
|
||||
def test_list_hosts_with_non_admin_user(self):
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
self.non_admin_client.list_hosts)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('e75b0a1a-041f-47a1-8b4a-b72a6ff36d3f')
|
||||
def test_show_host_detail_with_nonexistent_hostname(self):
|
||||
nonexitent_hostname = data_utils.rand_name('rand_hostname')
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.client.show_host_detail, nonexitent_hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('19ebe09c-bfd4-4b7c-81a2-e2e0710f59cc')
|
||||
def test_show_host_detail_with_non_admin_user(self):
|
||||
hostname = self._get_host_name()
|
||||
|
||||
|
@ -57,6 +60,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('e40c72b1-0239-4ed6-ba21-81a184df1f7c')
|
||||
def test_update_host_with_non_admin_user(self):
|
||||
hostname = self._get_host_name()
|
||||
|
||||
|
@ -67,6 +71,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
maintenance_mode='enable')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('76e396fe-5418-4dd3-a186-5b301edc0721')
|
||||
def test_update_host_with_extra_param(self):
|
||||
# only 'status' and 'maintenance_mode' are the valid params.
|
||||
hostname = self._get_host_name()
|
||||
|
@ -79,6 +84,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
param='XXX')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('fbe2bf3e-3246-4a95-a59f-94e4e298ec77')
|
||||
def test_update_host_with_invalid_status(self):
|
||||
# 'status' can only be 'enable' or 'disable'
|
||||
hostname = self._get_host_name()
|
||||
|
@ -90,6 +96,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
maintenance_mode='enable')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('ab1e230e-5e22-41a9-8699-82b9947915d4')
|
||||
def test_update_host_with_invalid_maintenance_mode(self):
|
||||
# 'maintenance_mode' can only be 'enable' or 'disable'
|
||||
hostname = self._get_host_name()
|
||||
|
@ -101,6 +108,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
maintenance_mode='invalid')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0cd85f75-6992-4a4a-b1bd-d11e37fd0eee')
|
||||
def test_update_host_without_param(self):
|
||||
# 'status' or 'maintenance_mode' needed for host update
|
||||
hostname = self._get_host_name()
|
||||
|
@ -110,6 +118,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('23c92146-2100-4d68-b2d6-c7ade970c9c1')
|
||||
def test_update_nonexistent_host(self):
|
||||
nonexitent_hostname = data_utils.rand_name('rand_hostname')
|
||||
|
||||
|
@ -120,6 +129,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
maintenance_mode='enable')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0d981ac3-4320-4898-b674-82b61fbb60e4')
|
||||
def test_startup_nonexistent_host(self):
|
||||
nonexitent_hostname = data_utils.rand_name('rand_hostname')
|
||||
|
||||
|
@ -128,6 +138,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexitent_hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('9f4ebb7e-b2ae-4e5b-a38f-0fd1bb0ddfca')
|
||||
def test_startup_host_with_non_admin_user(self):
|
||||
hostname = self._get_host_name()
|
||||
|
||||
|
@ -136,6 +147,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('9e637444-29cf-4244-88c8-831ae82c31b6')
|
||||
def test_shutdown_nonexistent_host(self):
|
||||
nonexitent_hostname = data_utils.rand_name('rand_hostname')
|
||||
|
||||
|
@ -144,6 +156,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexitent_hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a803529c-7e3f-4d3c-a7d6-8e1c203d27f6')
|
||||
def test_shutdown_host_with_non_admin_user(self):
|
||||
hostname = self._get_host_name()
|
||||
|
||||
|
@ -152,6 +165,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f86bfd7b-0b13-4849-ae29-0322e83ee58b')
|
||||
def test_reboot_nonexistent_host(self):
|
||||
nonexitent_hostname = data_utils.rand_name('rand_hostname')
|
||||
|
||||
|
@ -160,6 +174,7 @@ class HostsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexitent_hostname)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('02d79bb9-eb57-4612-abf6-2cb38897d2f8')
|
||||
def test_reboot_host_with_non_admin_user(self):
|
||||
hostname = self._get_host_name()
|
||||
|
||||
|
|
|
@ -37,18 +37,21 @@ class HypervisorAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertTrue(len(hypers) > 0, "No hypervisors found: %s" % hypers)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7f0ceacd-c64d-4e96-b8ee-d02943142cc5')
|
||||
def test_get_hypervisor_list(self):
|
||||
# List of hypervisor and available hypervisors hostname
|
||||
hypers = self._list_hypervisors()
|
||||
self.assertHypervisors(hypers)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('1e7fdac2-b672-4ad1-97a4-bad0e3030118')
|
||||
def test_get_hypervisor_list_details(self):
|
||||
# Display the details of the all hypervisor
|
||||
hypers = self.client.get_hypervisor_list_details()
|
||||
self.assertHypervisors(hypers)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('94ff9eae-a183-428e-9cdb-79fde71211cc')
|
||||
def test_get_hypervisor_show_details(self):
|
||||
# Display the details of the specified hypervisor
|
||||
hypers = self._list_hypervisors()
|
||||
|
@ -60,6 +63,7 @@ class HypervisorAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hypers[0]['hypervisor_hostname'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('e81bba3f-6215-4e39-a286-d52d2f906862')
|
||||
def test_get_hypervisor_show_servers(self):
|
||||
# Show instances about the specific hypervisors
|
||||
hypers = self._list_hypervisors()
|
||||
|
@ -70,12 +74,14 @@ class HypervisorAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertTrue(len(hypervisors) > 0)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('797e4f28-b6e0-454d-a548-80cc77c00816')
|
||||
def test_get_hypervisor_stats(self):
|
||||
# Verify the stats of the all hypervisor
|
||||
stats = self.client.get_hypervisor_stats()
|
||||
self.assertTrue(len(stats) > 0)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('91a50d7d-1c2b-4f24-b55a-a1fe20efca70')
|
||||
def test_get_hypervisor_uptime(self):
|
||||
# Verify that GET shows the specified hypervisor uptime
|
||||
hypers = self._list_hypervisors()
|
||||
|
@ -113,6 +119,7 @@ class HypervisorAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
"None of the hypervisors had a valid uptime: %s" % hypers)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('d7e1805b-3b14-4a3b-b6fd-50ec6d9f361f')
|
||||
def test_search_hypervisor(self):
|
||||
hypers = self._list_hypervisors()
|
||||
self.assertHypervisors(hypers)
|
||||
|
|
|
@ -39,6 +39,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
return hypers
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('c136086a-0f67-4b2b-bc61-8482bd68989f')
|
||||
def test_show_nonexistent_hypervisor(self):
|
||||
nonexistent_hypervisor_id = str(uuid.uuid4())
|
||||
|
||||
|
@ -48,6 +49,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexistent_hypervisor_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('51e663d0-6b89-4817-a465-20aca0667d03')
|
||||
def test_show_hypervisor_with_non_admin_user(self):
|
||||
hypers = self._list_hypervisors()
|
||||
self.assertTrue(len(hypers) > 0)
|
||||
|
@ -58,6 +60,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hypers[0]['id'])
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('2a0a3938-832e-4859-95bf-1c57c236b924')
|
||||
def test_show_servers_with_non_admin_user(self):
|
||||
hypers = self._list_hypervisors()
|
||||
self.assertTrue(len(hypers) > 0)
|
||||
|
@ -68,6 +71,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hypers[0]['id'])
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('02463d69-0ace-4d33-a4a8-93d7883a2bba')
|
||||
def test_show_servers_with_nonexistent_hypervisor(self):
|
||||
nonexistent_hypervisor_id = str(uuid.uuid4())
|
||||
|
||||
|
@ -77,12 +81,14 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexistent_hypervisor_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('e2b061bb-13f9-40d8-9d6e-d5bf17595849')
|
||||
def test_get_hypervisor_stats_with_non_admin_user(self):
|
||||
self.assertRaises(
|
||||
lib_exc.Unauthorized,
|
||||
self.non_adm_client.get_hypervisor_stats)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f60aa680-9a3a-4c7d-90e1-fae3a4891303')
|
||||
def test_get_nonexistent_hypervisor_uptime(self):
|
||||
nonexistent_hypervisor_id = str(uuid.uuid4())
|
||||
|
||||
|
@ -92,6 +98,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexistent_hypervisor_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6c3461f9-c04c-4e2a-bebb-71dc9cb47df2')
|
||||
def test_get_hypervisor_uptime_with_non_admin_user(self):
|
||||
hypers = self._list_hypervisors()
|
||||
self.assertTrue(len(hypers) > 0)
|
||||
|
@ -102,6 +109,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
hypers[0]['id'])
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('51b3d536-9b14-409c-9bce-c6f7c794994e')
|
||||
def test_get_hypervisor_list_with_non_admin_user(self):
|
||||
# List of hypervisor and available services with non admin user
|
||||
self.assertRaises(
|
||||
|
@ -109,6 +117,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.non_adm_client.get_hypervisor_list)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('dc02db05-e801-4c5f-bc8e-d915290ab345')
|
||||
def test_get_hypervisor_list_details_with_non_admin_user(self):
|
||||
# List of hypervisor details and available services with non admin user
|
||||
self.assertRaises(
|
||||
|
@ -116,6 +125,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.non_adm_client.get_hypervisor_list_details)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('19a45cc1-1000-4055-b6d2-28e8b2ec4faa')
|
||||
def test_search_nonexistent_hypervisor(self):
|
||||
nonexistent_hypervisor_name = data_utils.rand_name('test_hypervisor')
|
||||
|
||||
|
@ -125,6 +135,7 @@ class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
nonexistent_hypervisor_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('5b6a6c79-5dc1-4fa5-9c58-9c8085948e74')
|
||||
def test_search_hypervisor_with_non_admin_user(self):
|
||||
hypers = self._list_hypervisors()
|
||||
self.assertTrue(len(hypers) > 0)
|
||||
|
|
|
@ -28,6 +28,7 @@ class InstanceUsageAuditLogTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.adm_client = cls.os_adm.instance_usages_audit_log_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('25319919-33d9-424f-9f99-2c203ee48b9d')
|
||||
def test_list_instance_usage_audit_logs(self):
|
||||
# list instance usage audit logs
|
||||
body = self.adm_client.list_instance_usage_audit_logs()
|
||||
|
@ -40,6 +41,7 @@ class InstanceUsageAuditLogTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(item, body)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6e40459d-7c5f-400b-9e83-449fbc8e7feb')
|
||||
def test_get_instance_usage_audit_log(self):
|
||||
# Get instance usage audit log before specified time
|
||||
now = datetime.datetime.now()
|
||||
|
|
|
@ -30,6 +30,7 @@ class InstanceUsageAuditLogNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.adm_client = cls.os_adm.instance_usages_audit_log_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a9d33178-d2c9-4131-ad3b-f4ca8d0308a2')
|
||||
def test_instance_usage_audit_logs_with_nonadmin_user(self):
|
||||
# the instance_usage_audit_logs API just can be accessed by admin user
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
|
@ -42,6 +43,7 @@ class InstanceUsageAuditLogNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
urllib.quote(now.strftime("%Y-%m-%d %H:%M:%S")))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('9b952047-3641-41c7-ba91-a809fc5974c8')
|
||||
def test_get_instance_usage_audit_logs_with_invalid_time(self):
|
||||
self.assertRaises(lib_exc.BadRequest,
|
||||
self.adm_client.get_instance_usage_audit_log,
|
||||
|
|
|
@ -29,10 +29,12 @@ class MigrationsAdminTest(base.BaseV2ComputeAdminTest):
|
|||
cls.client = cls.os_adm.migrations_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('75c0b83d-72a0-4cf8-a153-631e83e7d53f')
|
||||
def test_list_migrations(self):
|
||||
# Admin can get the migrations list
|
||||
self.client.list_migrations()
|
||||
|
||||
@test.idempotent_id('1b512062-8093-438e-b47a-37d2f597cd64')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type='gate')
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
from tempest.api.compute import base
|
||||
from tempest import config
|
||||
from tempest import test
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
@ -33,6 +34,7 @@ class NetworksTest(base.BaseComputeAdminTest):
|
|||
super(NetworksTest, cls).resource_setup()
|
||||
cls.client = cls.os_adm.networks_client
|
||||
|
||||
@test.idempotent_id('d206d211-8912-486f-86e2-a9d090d1f416')
|
||||
def test_get_network(self):
|
||||
networks = self.client.list_networks()
|
||||
configured_network = [x for x in networks if x['label'] ==
|
||||
|
@ -45,6 +47,7 @@ class NetworksTest(base.BaseComputeAdminTest):
|
|||
network = self.client.get_network(configured_network['id'])
|
||||
self.assertEqual(configured_network['label'], network['label'])
|
||||
|
||||
@test.idempotent_id('df3d1046-6fa5-4b2c-ad0c-cfa46a351cb9')
|
||||
def test_list_all_networks(self):
|
||||
networks = self.client.list_networks()
|
||||
# Check the configured network is in the list
|
||||
|
|
|
@ -51,6 +51,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
'cores', 'security_groups'))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('3b0a7c8f-cf58-46b8-a60c-715a32a8ba7d')
|
||||
def test_get_default_quotas(self):
|
||||
# Admin can get the default resource quota set for a tenant
|
||||
expected_quota_set = self.default_quota_set | set(['id'])
|
||||
|
@ -61,6 +62,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(quota, quota_set.keys())
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('55fbe2bf-21a9-435b-bbd2-4162b0ed799a')
|
||||
def test_update_all_quota_resources_for_tenant(self):
|
||||
# Admin can update all the resource quota limits for a tenant
|
||||
default_quota_set = self.adm_client.get_default_quota_set(
|
||||
|
@ -92,6 +94,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
|
||||
# TODO(afazekas): merge these test cases
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ce9e0815-8091-4abd-8345-7fe5b85faa1d')
|
||||
def test_get_updated_quotas(self):
|
||||
# Verify that GET shows the updated quota set of tenant
|
||||
tenant_name = data_utils.rand_name('cpu_quota_tenant_')
|
||||
|
@ -125,6 +128,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(2048, quota_set['ram'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('389d04f0-3a41-405f-9317-e5f86e3c44f0')
|
||||
def test_delete_quota(self):
|
||||
# Admin can delete the resource quota set for a tenant
|
||||
tenant_name = data_utils.rand_name('ram_quota_tenant_')
|
||||
|
@ -169,6 +173,7 @@ class QuotaClassesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
# global state, and possibly needs to be part of a set of
|
||||
# tests that get run all by themselves at the end under a
|
||||
# 'danger' flag.
|
||||
@test.idempotent_id('7932ab0f-5136-4075-b201-c0e2338df51a')
|
||||
def test_update_default_quotas(self):
|
||||
LOG.debug("get the current 'default' quota class values")
|
||||
body = self.adm_client.get_quota_class_set('default')
|
||||
|
|
|
@ -38,6 +38,7 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.demo_tenant_id = cls.client.tenant_id
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('733abfe8-166e-47bb-8363-23dbd7ff3476')
|
||||
def test_update_quota_normal_user(self):
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
self.client.update_quota_set,
|
||||
|
@ -47,6 +48,7 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
# TODO(afazekas): Add dedicated tenant to the skiped quota tests
|
||||
# it can be moved into the setUpClass as well
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('91058876-9947-4807-9f22-f6eb17140d9b')
|
||||
def test_create_server_when_cpu_quota_is_full(self):
|
||||
# Disallow server creation when tenant's vcpu quota is full
|
||||
quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
|
||||
|
@ -63,6 +65,7 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.create_test_server)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6fdd7012-584d-4327-a61c-49122e0d5864')
|
||||
def test_create_server_when_memory_quota_is_full(self):
|
||||
# Disallow server creation when tenant's memory quota is full
|
||||
quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
|
||||
|
@ -79,6 +82,7 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.create_test_server)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7c6be468-0274-449a-81c3-ac1c32ee0161')
|
||||
def test_create_server_when_instances_quota_is_full(self):
|
||||
# Once instances quota limit is reached, disallow server creation
|
||||
quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
|
||||
|
@ -96,6 +100,7 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
@decorators.skip_because(bug="1186354",
|
||||
condition=CONF.service_available.neutron)
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7c6c8f3b-2bf6-4918-b240-57b136a66aa0')
|
||||
@test.services('network')
|
||||
def test_security_groups_exceed_limit(self):
|
||||
# Negative test: Creation Security Groups over limit should FAIL
|
||||
|
@ -123,6 +128,7 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
@decorators.skip_because(bug="1186354",
|
||||
condition=CONF.service_available.neutron)
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6e9f436d-f1ed-4f8e-a493-7275dfaa4b4d')
|
||||
@test.services('network')
|
||||
def test_security_groups_rules_exceed_limit(self):
|
||||
# Negative test: Creation of Security Group Rules should FAIL
|
||||
|
|
|
@ -56,6 +56,7 @@ class SecurityGroupDefaultRulesTest(base.BaseV2ComputeAdminTest):
|
|||
return rule
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('6d880615-eec3-4d29-97c5-7a074dde239d')
|
||||
def test_create_delete_security_group_default_rules(self):
|
||||
# Create and delete Security Group default rule
|
||||
ip_protocols = ['tcp', 'udp', 'icmp']
|
||||
|
@ -68,6 +69,7 @@ class SecurityGroupDefaultRulesTest(base.BaseV2ComputeAdminTest):
|
|||
rule['id'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('4d752e0a-33a1-4c3a-b498-ff8667ca22e5')
|
||||
def test_create_security_group_default_rule_without_cidr(self):
|
||||
ip_protocol = 'udp'
|
||||
from_port = 80
|
||||
|
@ -82,6 +84,7 @@ class SecurityGroupDefaultRulesTest(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual('0.0.0.0/0', rule['ip_range']['cidr'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('29f2d218-69b0-4a95-8f3d-6bd0ef732b3a')
|
||||
def test_create_security_group_default_rule_with_blank_cidr(self):
|
||||
ip_protocol = 'icmp'
|
||||
from_port = 10
|
||||
|
@ -98,6 +101,7 @@ class SecurityGroupDefaultRulesTest(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual('0.0.0.0/0', rule['ip_range']['cidr'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('6e6de55e-9146-4ae0-89f2-3569586e0b9b')
|
||||
def test_security_group_default_rules_list(self):
|
||||
ip_protocol = 'tcp'
|
||||
from_port = 22
|
||||
|
@ -114,6 +118,7 @@ class SecurityGroupDefaultRulesTest(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(rule, rules)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('15cbb349-86b4-4f71-a048-04b7ef3f150b')
|
||||
def test_default_security_group_default_rule_show(self):
|
||||
ip_protocol = 'tcp'
|
||||
from_port = 22
|
||||
|
|
|
@ -37,6 +37,7 @@ class SecurityGroupsTestAdminJSON(base.BaseV2ComputeAdminTest):
|
|||
else:
|
||||
self.client.delete_security_group(securitygroup_id)
|
||||
|
||||
@test.idempotent_id('49667619-5af9-4c63-ab5d-2cfdd1c8f7f1')
|
||||
@testtools.skipIf(CONF.service_available.neutron,
|
||||
"Skipped because neutron do not support all_tenants"
|
||||
"search filter.")
|
||||
|
|
|
@ -45,6 +45,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.s2_id = server['id']
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('51717b38-bdc1-458b-b636-1cf82d99f62f')
|
||||
def test_list_servers_by_admin(self):
|
||||
# Listing servers by admin user returns empty list by default
|
||||
body = self.client.list_servers_with_detail()
|
||||
|
@ -52,6 +53,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual([], servers)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('06f960bb-15bb-48dc-873d-f96e89be7870')
|
||||
def test_list_servers_filter_by_error_status(self):
|
||||
# Filter the list of servers by server error status
|
||||
params = {'status': 'error'}
|
||||
|
@ -68,6 +70,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertNotIn(self.s2_id, map(lambda x: x['id'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9f5579ae-19b4-4985-a091-2a5d56106580')
|
||||
def test_list_servers_by_admin_with_all_tenants(self):
|
||||
# Listing servers by admin user with all tenants parameter
|
||||
# Here should be listed all servers
|
||||
|
@ -80,6 +83,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(self.s2_name, servers_name)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7e5d6b8f-454a-4ba1-8ae2-da857af8338b')
|
||||
def test_list_servers_by_admin_with_specified_tenant(self):
|
||||
# In nova v2, tenant_id is ignored unless all_tenants is specified
|
||||
|
||||
|
@ -98,6 +102,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual([], servers)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('86c7a8f7-50cf-43a9-9bac-5b985317134f')
|
||||
def test_list_servers_filter_by_exist_host(self):
|
||||
# Filter the list of servers by existent host
|
||||
name = data_utils.rand_name('server')
|
||||
|
@ -120,6 +125,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
map(lambda x: x['id'], nonexistent_servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ee8ae470-db70-474d-b752-690b7892cab1')
|
||||
def test_reset_state_server(self):
|
||||
# Reset server's state to 'error'
|
||||
self.client.reset_state(self.s1_id)
|
||||
|
@ -137,6 +143,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
|
||||
@test.attr(type='gate')
|
||||
@decorators.skip_because(bug="1240043")
|
||||
@test.idempotent_id('31ff3486-b8a0-4f56-a6c0-aab460531db3')
|
||||
def test_get_server_diagnostics_by_admin(self):
|
||||
# Retrieve server diagnostics by admin user
|
||||
diagnostic = self.client.get_server_diagnostics(self.s1_id)
|
||||
|
@ -147,6 +154,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertIn(key, str(diagnostic.keys()))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('682cb127-e5bb-4f53-87ce-cb9003604442')
|
||||
def test_rebuild_server_in_error_state(self):
|
||||
# The server in error state should be rebuilt using the provided
|
||||
# image and changed to ACTIVE state
|
||||
|
@ -174,6 +182,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(self.image_ref_alt, rebuilt_image_id)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7a1323b4-a6a2-497a-96cb-76c07b945c71')
|
||||
def test_reset_network_inject_network_info(self):
|
||||
# Reset Network of a Server
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -182,6 +191,7 @@ class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.client.inject_network_info(server['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('fdcd9b33-0903-4e00-a1f7-b5f6543068d6')
|
||||
def test_create_server_with_scheduling_hint(self):
|
||||
# Create a server with scheduler hints.
|
||||
hints = {
|
||||
|
|
|
@ -55,6 +55,7 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
flavor_id = data_utils.rand_int_id(start=1000)
|
||||
return flavor_id
|
||||
|
||||
@test.idempotent_id('28dcec23-f807-49da-822c-56a92ea3c687')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -76,6 +77,7 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.servers[0]['id'],
|
||||
flavor_ref['id'])
|
||||
|
||||
@test.idempotent_id('7368a427-2f26-4ad9-9ba9-911a0ec2b0db')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -98,23 +100,27 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
flavor_ref['id'])
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('b0b4d8af-1256-41ef-9ee7-25f1c19dde80')
|
||||
def test_reset_state_server_invalid_state(self):
|
||||
self.assertRaises(lib_exc.BadRequest,
|
||||
self.client.reset_state, self.s1_id,
|
||||
state='invalid')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('4cdcc984-fab0-4577-9a9d-6d558527ee9d')
|
||||
def test_reset_state_server_invalid_type(self):
|
||||
self.assertRaises(lib_exc.BadRequest,
|
||||
self.client.reset_state, self.s1_id,
|
||||
state=1)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('e741298b-8df2-46f0-81cb-8f814ff2504c')
|
||||
def test_reset_state_server_nonexistent_server(self):
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.client.reset_state, '999')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('e84e2234-60d2-42fa-8b30-e2d3049724ac')
|
||||
def test_get_server_diagnostics_by_non_admin(self):
|
||||
# Non-admin user can not view server diagnostics according to policy
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
|
@ -122,12 +128,14 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.s1_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('46a4e1ca-87ae-4d28-987a-1b6b136a0221')
|
||||
def test_migrate_non_existent_server(self):
|
||||
# migrate a non existent server
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.client.migrate_server,
|
||||
str(uuid.uuid4()))
|
||||
|
||||
@test.idempotent_id('b0b17f83-d14e-4fc4-8f31-bcc9f3cfa629')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
|
||||
|
|
|
@ -30,11 +30,13 @@ class ServicesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.client = cls.os_adm.services_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('5be41ef4-53d1-41cc-8839-5c2a48a1b283')
|
||||
def test_list_services(self):
|
||||
services = self.client.list_services()
|
||||
self.assertNotEqual(0, len(services))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f345b1ec-bc6e-4c38-a527-3ca2bc00bef5')
|
||||
def test_get_service_by_service_binary_name(self):
|
||||
binary_name = 'nova-compute'
|
||||
params = {'binary': binary_name}
|
||||
|
@ -44,6 +46,7 @@ class ServicesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(binary_name, service['binary'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('affb42d5-5b4b-43c8-8b0b-6dca054abcca')
|
||||
def test_get_service_by_host_name(self):
|
||||
services = self.client.list_services()
|
||||
host_name = services[0]['host']
|
||||
|
@ -63,6 +66,7 @@ class ServicesAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(sorted(s1), sorted(s2))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('39397f6f-37b8-4234-8671-281e44c74025')
|
||||
def test_get_service_by_service_and_host_name(self):
|
||||
services = self.client.list_services()
|
||||
host_name = services[0]['host']
|
||||
|
|
|
@ -31,11 +31,13 @@ class ServicesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.non_admin_client = cls.services_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('1126d1f8-266e-485f-a687-adc547492646')
|
||||
def test_list_services_with_non_admin_user(self):
|
||||
self.assertRaises(lib_exc.Unauthorized,
|
||||
self.non_admin_client.list_services)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('d0884a69-f693-4e79-a9af-232d15643bf7')
|
||||
def test_get_service_by_invalid_params(self):
|
||||
# return all services if send the request with invalid parameter
|
||||
services = self.client.list_services()
|
||||
|
@ -44,6 +46,7 @@ class ServicesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(len(services), len(services_xxx))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('1e966d4a-226e-47c7-b601-0b18a27add54')
|
||||
def test_get_service_by_invalid_service_and_valid_host(self):
|
||||
services = self.client.list_services()
|
||||
host_name = services[0]['host']
|
||||
|
@ -52,6 +55,7 @@ class ServicesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(0, len(services))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('64e7e7fb-69e8-4cb6-a71d-8d5eb0c98655')
|
||||
def test_get_service_with_valid_service_and_invalid_host(self):
|
||||
services = self.client.list_services()
|
||||
binary_name = services[0]['binary']
|
||||
|
|
|
@ -43,6 +43,7 @@ class TenantUsagesTestJSON(base.BaseV2ComputeAdminTest):
|
|||
return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('062c8ae9-9912-4249-8b51-e38d664e926e')
|
||||
def test_list_usage_all_tenants(self):
|
||||
# Get usage for all tenants
|
||||
params = {'start': self.start,
|
||||
|
@ -52,6 +53,7 @@ class TenantUsagesTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(len(tenant_usage), 8)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('94135049-a4c5-4934-ad39-08fa7da4f22e')
|
||||
def test_get_usage_tenant(self):
|
||||
# Get usage for a specific tenant
|
||||
params = {'start': self.start,
|
||||
|
@ -62,6 +64,7 @@ class TenantUsagesTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.assertEqual(len(tenant_usage), 8)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9d00a412-b40e-4fd9-8eba-97b496316116')
|
||||
def test_get_usage_tenant_with_non_admin_user(self):
|
||||
# Get usage for a specific tenant with non admin user
|
||||
params = {'start': self.start,
|
||||
|
|
|
@ -38,6 +38,7 @@ class TenantUsagesNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('8b21e135-d94b-4991-b6e9-87059609c8ed')
|
||||
def test_get_usage_tenant_with_empty_tenant_id(self):
|
||||
# Get usage for a specific tenant empty
|
||||
params = {'start': self.start,
|
||||
|
@ -47,6 +48,7 @@ class TenantUsagesNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
'', params)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('4079dd2a-9e8d-479f-869d-6fa985ce45b6')
|
||||
def test_get_usage_tenant_with_invalid_date(self):
|
||||
# Get usage for tenant with invalid date
|
||||
params = {'start': self.end,
|
||||
|
@ -56,6 +58,7 @@ class TenantUsagesNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.client.tenant_id, params)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('bbe6fe2c-15d8-404c-a0a2-44fad0ad5cc7')
|
||||
def test_list_usage_all_tenants_with_non_admin_user(self):
|
||||
# Get usage for all tenants with non admin user
|
||||
params = {'start': self.start,
|
||||
|
|
|
@ -22,6 +22,7 @@ class CertificatesV2TestJSON(base.BaseComputeTest):
|
|||
_api_version = 2
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('c070a441-b08e-447e-a733-905909535b1b')
|
||||
def test_create_root_certificate(self):
|
||||
# create certificates
|
||||
body = self.certificates_client.create_certificate()
|
||||
|
@ -29,6 +30,7 @@ class CertificatesV2TestJSON(base.BaseComputeTest):
|
|||
self.assertIn('private_key', body)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3ac273d0-92d2-4632-bdfc-afbc21d4606c')
|
||||
def test_get_root_certificate(self):
|
||||
# get the root certificate
|
||||
body = self.certificates_client.get_certificate('root')
|
||||
|
|
|
@ -29,6 +29,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
cls.client = cls.flavors_client
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('e36c0eaa-dff5-4082-ad1f-3f9a80aa3f59')
|
||||
def test_list_flavors(self):
|
||||
# List of all flavors should contain the expected flavor
|
||||
flavors = self.client.list_flavors()
|
||||
|
@ -38,6 +39,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
self.assertIn(flavor_min_detail, flavors)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('6e85fde4-b3cd-4137-ab72-ed5f418e8c24')
|
||||
def test_list_flavors_with_detail(self):
|
||||
# Detailed list of all flavors should contain the expected flavor
|
||||
flavors = self.client.list_flavors_with_detail()
|
||||
|
@ -45,12 +47,14 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
self.assertIn(flavor, flavors)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('1f12046b-753d-40d2-abb6-d8eb8b30cb2f')
|
||||
def test_get_flavor(self):
|
||||
# The expected flavor details should be returned
|
||||
flavor = self.client.get_flavor_details(self.flavor_ref)
|
||||
self.assertEqual(self.flavor_ref, flavor['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('8d7691b3-6ed4-411a-abc9-2839a765adab')
|
||||
def test_list_flavors_limit_results(self):
|
||||
# Only the expected number of flavors should be returned
|
||||
params = {'limit': 1}
|
||||
|
@ -58,6 +62,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
self.assertEqual(1, len(flavors))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b26f6327-2886-467a-82be-cef7a27709cb')
|
||||
def test_list_flavors_detailed_limit_results(self):
|
||||
# Only the expected number of flavors (detailed) should be returned
|
||||
params = {'limit': 1}
|
||||
|
@ -65,6 +70,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
self.assertEqual(1, len(flavors))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('e800f879-9828-4bd0-8eae-4f17189951fb')
|
||||
def test_list_flavors_using_marker(self):
|
||||
# The list of flavors should start from the provided marker
|
||||
flavor = self.client.get_flavor_details(self.flavor_ref)
|
||||
|
@ -76,6 +82,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
'The list of flavors did not start after the marker.')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6db2f0c0-ddee-4162-9c84-0703d3dd1107')
|
||||
def test_list_flavors_detailed_using_marker(self):
|
||||
# The list of flavors should start from the provided marker
|
||||
flavor = self.client.get_flavor_details(self.flavor_ref)
|
||||
|
@ -87,6 +94,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
'The list of flavors did not start after the marker.')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3df2743e-3034-4e57-a4cb-b6527f6eac79')
|
||||
def test_list_flavors_detailed_filter_by_min_disk(self):
|
||||
# The detailed list of flavors should be filtered by disk space
|
||||
flavor = self.client.get_flavor_details(self.flavor_ref)
|
||||
|
@ -97,6 +105,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('09fe7509-b4ee-4b34-bf8b-39532dc47292')
|
||||
def test_list_flavors_detailed_filter_by_min_ram(self):
|
||||
# The detailed list of flavors should be filtered by RAM
|
||||
flavor = self.client.get_flavor_details(self.flavor_ref)
|
||||
|
@ -107,6 +116,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('10645a4d-96f5-443f-831b-730711e11dd4')
|
||||
def test_list_flavors_filter_by_min_disk(self):
|
||||
# The list of flavors should be filtered by disk space
|
||||
flavor = self.client.get_flavor_details(self.flavor_ref)
|
||||
|
@ -117,6 +127,7 @@ class FlavorsV2TestJSON(base.BaseComputeTest):
|
|||
self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('935cf550-e7c8-4da6-8002-00f92d5edfaa')
|
||||
def test_list_flavors_filter_by_min_ram(self):
|
||||
# The list of flavors should be filtered by RAM
|
||||
flavor = self.client.get_flavor_details(self.flavor_ref)
|
||||
|
|
|
@ -58,6 +58,7 @@ class FloatingIPsTestJSON(base.BaseFloatingIPsTest):
|
|||
pass
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f7bfb946-297e-41b8-9e8c-aba8e9bb5194')
|
||||
@test.services('network')
|
||||
def test_allocate_floating_ip(self):
|
||||
# Positive test:Allocation of a new floating IP to a project
|
||||
|
@ -73,6 +74,7 @@ class FloatingIPsTestJSON(base.BaseFloatingIPsTest):
|
|||
self.assertIn(floating_ip_details, body)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('de45e989-b5ca-4a9b-916b-04a52e7bbb8b')
|
||||
@test.services('network')
|
||||
def test_delete_floating_ip(self):
|
||||
# Positive test:Deletion of valid floating IP from project
|
||||
|
@ -86,6 +88,7 @@ class FloatingIPsTestJSON(base.BaseFloatingIPsTest):
|
|||
self.client.wait_for_resource_deletion(floating_ip_body['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('307efa27-dc6f-48a0-8cd2-162ce3ef0b52')
|
||||
@test.services('network')
|
||||
def test_associate_disassociate_floating_ip(self):
|
||||
# Positive test:Associate and disassociate the provided floating IP
|
||||
|
@ -106,6 +109,7 @@ class FloatingIPsTestJSON(base.BaseFloatingIPsTest):
|
|||
self.server_id)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6edef4b2-aaf1-4abc-bbe3-993e2561e0fe')
|
||||
@test.services('network')
|
||||
def test_associate_already_associated_floating_ip(self):
|
||||
# positive test:Association of an already associated floating IP
|
||||
|
|
|
@ -53,6 +53,7 @@ class FloatingIPsNegativeTestJSON(base.BaseFloatingIPsTest):
|
|||
break
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6e0f059b-e4dd-48fb-8207-06e3bba5b074')
|
||||
@test.services('network')
|
||||
def test_allocate_floating_ip_from_nonexistent_pool(self):
|
||||
# Negative test:Allocation of a new floating IP from a nonexistent_pool
|
||||
|
@ -62,6 +63,7 @@ class FloatingIPsNegativeTestJSON(base.BaseFloatingIPsTest):
|
|||
"non_exist_pool")
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('ae1c55a8-552b-44d4-bfb6-2a115a15d0ba')
|
||||
@test.services('network')
|
||||
def test_delete_nonexistent_floating_ip(self):
|
||||
# Negative test:Deletion of a nonexistent floating IP
|
||||
|
@ -72,6 +74,7 @@ class FloatingIPsNegativeTestJSON(base.BaseFloatingIPsTest):
|
|||
self.non_exist_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('595fa616-1a71-4670-9614-46564ac49a4c')
|
||||
@test.services('network')
|
||||
def test_associate_nonexistent_floating_ip(self):
|
||||
# Negative test:Association of a non existent floating IP
|
||||
|
@ -82,6 +85,7 @@ class FloatingIPsNegativeTestJSON(base.BaseFloatingIPsTest):
|
|||
"0.0.0.0", self.server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0a081a66-e568-4e6b-aa62-9587a876dca8')
|
||||
@test.services('network')
|
||||
def test_dissociate_nonexistent_floating_ip(self):
|
||||
# Negative test:Dissociation of a non existent floating IP should fail
|
||||
|
@ -91,6 +95,7 @@ class FloatingIPsNegativeTestJSON(base.BaseFloatingIPsTest):
|
|||
"0.0.0.0", self.server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('804b4fcb-bbf5-412f-925d-896672b61eb3')
|
||||
@test.services('network')
|
||||
def test_associate_ip_to_server_without_passing_floating_ip(self):
|
||||
# Negative test:Association of empty floating IP to specific server
|
||||
|
|
|
@ -41,6 +41,7 @@ class FloatingIPDetailsTestJSON(base.BaseV2ComputeTest):
|
|||
super(FloatingIPDetailsTestJSON, cls).resource_cleanup()
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('16db31c3-fb85-40c9-bbe2-8cf7b67ff99f')
|
||||
@test.services('network')
|
||||
def test_list_floating_ips(self):
|
||||
# Positive test:Should return the list of floating IPs
|
||||
|
@ -52,6 +53,7 @@ class FloatingIPDetailsTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(self.floating_ip[i], floating_ips)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('eef497e0-8ff7-43c8-85ef-558440574f84')
|
||||
@test.services('network')
|
||||
def test_get_floating_ip_details(self):
|
||||
# Positive test:Should be able to GET the details of floatingIP
|
||||
|
@ -73,6 +75,7 @@ class FloatingIPDetailsTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(floating_ip_id, body['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('df389fc8-56f5-43cc-b290-20eda39854d3')
|
||||
@test.services('network')
|
||||
def test_list_floating_ip_pools(self):
|
||||
# Positive test:Should return the list of floating IP Pools
|
||||
|
|
|
@ -33,6 +33,7 @@ class FloatingIPDetailsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.floating_ips_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7ab18834-4a4b-4f28-a2c5-440579866695')
|
||||
@test.services('network')
|
||||
def test_get_nonexistent_floating_ip_details(self):
|
||||
# Negative test:Should not be able to GET the details
|
||||
|
|
|
@ -53,6 +53,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.set_image_metadata(self.image_id, meta)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('37ec6edd-cf30-4c53-bd45-ae74db6b0531')
|
||||
def test_list_image_metadata(self):
|
||||
# All metadata key/value pairs for an image should be returned
|
||||
resp_metadata = self.client.list_image_metadata(self.image_id)
|
||||
|
@ -60,6 +61,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(expected, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ece7befc-d3ce-42a4-b4be-c3067a418c29')
|
||||
def test_set_image_metadata(self):
|
||||
# The metadata for the image should match the new values
|
||||
req_metadata = {'os_version': 'value2', 'architecture': 'value3'}
|
||||
|
@ -70,6 +72,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(req_metadata, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7b491c11-a9d5-40fe-a696-7f7e03d3fea2')
|
||||
def test_update_image_metadata(self):
|
||||
# The metadata for the image should match the updated values
|
||||
req_metadata = {'os_version': 'alt1', 'architecture': 'value3'}
|
||||
|
@ -83,6 +86,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(expected, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('4f5db52f-6685-4c75-b848-f4bb363f9aa6')
|
||||
def test_get_image_metadata_item(self):
|
||||
# The value for a specific metadata key should be returned
|
||||
meta = self.client.get_image_metadata_item(self.image_id,
|
||||
|
@ -90,6 +94,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual('value2', meta['os_distro'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f2de776a-4778-4d90-a5da-aae63aee64ae')
|
||||
def test_set_image_metadata_item(self):
|
||||
# The value provided for the given meta item should be set for
|
||||
# the image
|
||||
|
@ -101,6 +106,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(expected, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a013796c-ba37-4bb5-8602-d944511def14')
|
||||
def test_delete_image_metadata_item(self):
|
||||
# The metadata value/key pair should be deleted from the image
|
||||
self.client.delete_image_metadata_item(self.image_id,
|
||||
|
|
|
@ -28,6 +28,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.images_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('94069db2-792f-4fa8-8bd3-2271a6e0c095')
|
||||
def test_list_nonexistent_image_metadata(self):
|
||||
# Negative test: List on nonexistent image
|
||||
# metadata should not happen
|
||||
|
@ -35,6 +36,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
data_utils.rand_uuid())
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a403ef9e-9f95-427c-b70a-3ce3388796f1')
|
||||
def test_update_nonexistent_image_metadata(self):
|
||||
# Negative test:An update should not happen for a non-existent image
|
||||
meta = {'os_distro': 'alt1', 'os_version': 'alt2'}
|
||||
|
@ -43,6 +45,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
data_utils.rand_uuid(), meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('41ae052c-6ee6-405c-985e-5712393a620d')
|
||||
def test_get_nonexistent_image_metadata_item(self):
|
||||
# Negative test: Get on non-existent image should not happen
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -50,6 +53,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
data_utils.rand_uuid(), 'os_version')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('dc64f2ce-77e8-45b0-88c8-e15041d08eaf')
|
||||
def test_set_nonexistent_image_metadata(self):
|
||||
# Negative test: Metadata should not be set to a non-existent image
|
||||
meta = {'os_distro': 'alt1', 'os_version': 'alt2'}
|
||||
|
@ -57,6 +61,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
data_utils.rand_uuid(), meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('2154fd03-ab54-457c-8874-e6e3eb56e9cf')
|
||||
def test_set_nonexistent_image_metadata_item(self):
|
||||
# Negative test: Metadata item should not be set to a
|
||||
# nonexistent image
|
||||
|
@ -67,6 +72,7 @@ class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('848e157f-6bcf-4b2e-a5dd-5124025a8518')
|
||||
def test_delete_nonexistent_image_metadata_item(self):
|
||||
# Negative test: Shouldn't be able to delete metadata
|
||||
# item from non-existent image
|
||||
|
|
|
@ -38,6 +38,7 @@ class ImagesTestJSON(base.BaseV2ComputeTest):
|
|||
cls.servers_client = cls.servers_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('aa06b52b-2db5-4807-b218-9441f75d74e3')
|
||||
def test_delete_saving_image(self):
|
||||
snapshot_name = data_utils.rand_name('test-snap-')
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
|
|
@ -40,6 +40,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.servers_client = cls.servers_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6cd5a89d-5b47-46a7-93bc-3916f0d84973')
|
||||
def test_create_image_from_deleted_server(self):
|
||||
# An image should not be created if the server instance is removed
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -55,6 +56,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
server['id'], name=name, meta=meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('82c5b0c4-9dbd-463c-872b-20c4755aae7f')
|
||||
def test_create_image_from_invalid_server(self):
|
||||
# An image should not be created with invalid server id
|
||||
# Create a new image with invalid server id
|
||||
|
@ -66,6 +68,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
'!@#$%^&*()', name=name, meta=meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('aaacd1d0-55a2-4ce8-818a-b5439df8adc9')
|
||||
def test_create_image_from_stopped_server(self):
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
self.servers_client.stop(server['id'])
|
||||
|
@ -81,6 +84,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(snapshot_name, image['name'])
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('ec176029-73dc-4037-8d72-2e4ff60cf538')
|
||||
def test_create_image_specify_uuid_35_characters_or_less(self):
|
||||
# Return an error if Image ID passed is 35 characters or less
|
||||
snapshot_name = data_utils.rand_name('test-snap-')
|
||||
|
@ -89,6 +93,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
test_uuid, snapshot_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('36741560-510e-4cc2-8641-55fe4dfb2437')
|
||||
def test_create_image_specify_uuid_37_characters_or_more(self):
|
||||
# Return an error if Image ID passed is 37 characters or more
|
||||
snapshot_name = data_utils.rand_name('test-snap-')
|
||||
|
@ -97,12 +102,14 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
test_uuid, snapshot_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('381acb65-785a-4942-94ce-d8f8c84f1f0f')
|
||||
def test_delete_image_with_invalid_image_id(self):
|
||||
# An image should not be deleted with invalid image id
|
||||
self.assertRaises(lib_exc.NotFound, self.client.delete_image,
|
||||
'!@$%^&*()')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('137aef61-39f7-44a1-8ddf-0adf82511701')
|
||||
def test_delete_non_existent_image(self):
|
||||
# Return an error while trying to delete a non-existent image
|
||||
|
||||
|
@ -111,11 +118,13 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
non_existent_image_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('e6e41425-af5c-4fe6-a4b5-7b7b963ffda5')
|
||||
def test_delete_image_blank_id(self):
|
||||
# Return an error while trying to delete an image with blank Id
|
||||
self.assertRaises(lib_exc.NotFound, self.client.delete_image, '')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('924540c3-f1f1-444c-8f58-718958b6724e')
|
||||
def test_delete_image_non_hex_string_id(self):
|
||||
# Return an error while trying to delete an image with non hex id
|
||||
image_id = '11a22b9-120q-5555-cc11-00ab112223gj'
|
||||
|
@ -123,11 +132,13 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
image_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('68e2c175-bd26-4407-ac0f-4ea9ce2139ea')
|
||||
def test_delete_image_negative_image_id(self):
|
||||
# Return an error while trying to delete an image with negative id
|
||||
self.assertRaises(lib_exc.NotFound, self.client.delete_image, -1)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('b340030d-82cd-4066-a314-c72fb7c59277')
|
||||
def test_delete_image_id_is_over_35_character_limit(self):
|
||||
# Return an error while trying to delete image with id over limit
|
||||
self.assertRaises(lib_exc.NotFound, self.client.delete_image,
|
||||
|
|
|
@ -67,6 +67,7 @@ class ImagesOneServerTestJSON(base.BaseV2ComputeTest):
|
|||
return flavor['disk']
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('3731d080-d4c5-4872-b41a-64d0d0021314')
|
||||
def test_create_delete_image(self):
|
||||
|
||||
# Create a new image
|
||||
|
@ -96,6 +97,7 @@ class ImagesOneServerTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.wait_for_resource_deletion(image_id)
|
||||
|
||||
@test.attr(type=['gate'])
|
||||
@test.idempotent_id('3b7c6fe4-dfe7-477c-9243-b06359db51e6')
|
||||
def test_create_image_specify_multibyte_character_image_name(self):
|
||||
# prefix character is:
|
||||
# http://www.fileformat.info/info/unicode/char/1F4A9/index.htm
|
||||
|
|
|
@ -74,6 +74,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.image_ids = []
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('55d1d38c-dd66-4933-9c8e-7d92aeb60ddc')
|
||||
def test_create_image_specify_invalid_metadata(self):
|
||||
# Return an error when creating image with invalid metadata
|
||||
snapshot_name = data_utils.rand_name('test-snap-')
|
||||
|
@ -82,6 +83,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, snapshot_name, meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('3d24d11f-5366-4536-bd28-cff32b748eca')
|
||||
def test_create_image_specify_metadata_over_limits(self):
|
||||
# Return an error when creating image with meta data over 256 chars
|
||||
snapshot_name = data_utils.rand_name('test-snap-')
|
||||
|
@ -90,6 +92,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, snapshot_name, meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0460efcf-ee88-4f94-acef-1bf658695456')
|
||||
def test_create_second_image_when_first_image_is_being_saved(self):
|
||||
# Disallow creating another image when first image is being saved
|
||||
|
||||
|
@ -107,6 +110,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, alt_snapshot_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('084f0cbc-500a-4963-8a4e-312905862581')
|
||||
def test_create_image_specify_name_over_256_chars(self):
|
||||
# Return an error if snapshot name over 256 characters is passed
|
||||
|
||||
|
@ -115,6 +119,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, snapshot_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0894954d-2db2-4195-a45b-ffec0bc0187e')
|
||||
def test_delete_image_that_is_not_yet_active(self):
|
||||
# Return an error while trying to delete an image what is creating
|
||||
|
||||
|
|
|
@ -93,6 +93,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
cls.snapshot2_id = cls.snapshot2['id']
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a3f5b513-aeb3-42a9-b18e-f091ef73254d')
|
||||
def test_list_images_filter_by_status(self):
|
||||
# The list of images should contain only images with the
|
||||
# provided status
|
||||
|
@ -104,6 +105,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('33163b73-79f5-4d07-a7ea-9213bcc468ff')
|
||||
def test_list_images_filter_by_name(self):
|
||||
# List of all images should contain the expected images filtered
|
||||
# by name
|
||||
|
@ -114,6 +116,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertFalse(any([i for i in images if i['id'] == self.image2_id]))
|
||||
self.assertFalse(any([i for i in images if i['id'] == self.image3_id]))
|
||||
|
||||
@test.idempotent_id('9f238683-c763-45aa-b848-232ec3ce3105')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
|
||||
'Snapshotting is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -131,6 +134,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertFalse(any([i for i in images
|
||||
if i['id'] == self.snapshot3_id]))
|
||||
|
||||
@test.idempotent_id('05a377b8-28cf-4734-a1e6-2ab5c38bf606')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
|
||||
'Snapshotting is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -150,6 +154,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(any([i for i in images
|
||||
if i['id'] == self.snapshot3_id]))
|
||||
|
||||
@test.idempotent_id('e3356918-4d3e-4756-81d5-abc4524ba29f')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
|
||||
'Snapshotting is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -168,6 +173,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
if i['id'] == self.image_ref]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3a484ca9-67ba-451e-b494-7fcf28d32d62')
|
||||
def test_list_images_limit_results(self):
|
||||
# Verify only the expected number of results are returned
|
||||
params = {'limit': '1'}
|
||||
|
@ -175,6 +181,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(1, len([x for x in images if 'id' in x]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('18bac3ae-da27-436c-92a9-b22474d13aab')
|
||||
def test_list_images_filter_by_changes_since(self):
|
||||
# Verify only updated images are returned in the detailed list
|
||||
|
||||
|
@ -186,6 +193,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(found)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9b0ea018-6185-4f71-948a-a123a107988e')
|
||||
def test_list_images_with_detail_filter_by_status(self):
|
||||
# Detailed list of all images should only contain images
|
||||
# with the provided status
|
||||
|
@ -197,6 +205,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('644ea267-9bd9-4f3b-af9f-dffa02396a17')
|
||||
def test_list_images_with_detail_filter_by_name(self):
|
||||
# Detailed list of all images should contain the expected
|
||||
# images filtered by name
|
||||
|
@ -208,6 +217,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertFalse(any([i for i in images if i['id'] == self.image3_id]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ba2fa9a9-b672-47cc-b354-3b4c0600e2cb')
|
||||
def test_list_images_with_detail_limit_results(self):
|
||||
# Verify only the expected number of results (with full details)
|
||||
# are returned
|
||||
|
@ -215,6 +225,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
images = self.client.list_images_with_detail(params)
|
||||
self.assertEqual(1, len(images))
|
||||
|
||||
@test.idempotent_id('8c78f822-203b-4bf6-8bba-56ebd551cf84')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
|
||||
'Snapshotting is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -234,6 +245,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(any([i for i in images
|
||||
if i['id'] == self.snapshot3_id]))
|
||||
|
||||
@test.idempotent_id('888c0cc0-7223-43c5-9db0-b125fd0a393b')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
|
||||
'Snapshotting is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -253,6 +265,7 @@ class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
if i['id'] == self.image_ref]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7d439e18-ac2e-4827-b049-7e18004712c4')
|
||||
def test_list_images_with_detail_filter_by_changes_since(self):
|
||||
# Verify an update image is returned
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ class ListImageFiltersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.images_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('391b0440-432c-4d4b-b5da-c5096aa247eb')
|
||||
def test_get_nonexistent_image(self):
|
||||
# Check raises a NotFound
|
||||
nonexistent_image = data_utils.rand_uuid()
|
||||
|
|
|
@ -31,12 +31,14 @@ class ListImagesTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.images_client
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('490d0898-e12a-463f-aef0-c50156b9f789')
|
||||
def test_get_image(self):
|
||||
# Returns the correct details for a single image
|
||||
image = self.client.get_image(self.image_ref)
|
||||
self.assertEqual(self.image_ref, image['id'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('fd51b7f4-d4a3-4331-9885-866658112a6f')
|
||||
def test_list_images(self):
|
||||
# The list of all images should contain the image
|
||||
images = self.client.list_images()
|
||||
|
@ -44,6 +46,7 @@ class ListImagesTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(found)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('9f94cb6b-7f10-48c5-b911-a0b84d7d4cd6')
|
||||
def test_list_images_with_detail(self):
|
||||
# Detailed list of all images should contain the expected images
|
||||
images = self.client.list_images_with_detail()
|
||||
|
|
|
@ -36,6 +36,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest):
|
|||
return body
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('1d1dbedb-d7a0-432a-9d09-83f543c3c19b')
|
||||
def test_keypairs_create_list_delete(self):
|
||||
# Keypairs created should be available in the response list
|
||||
# Create 3 keypairs
|
||||
|
@ -64,6 +65,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest):
|
|||
% ', '.join(m_key['name'] for m_key in missing_kps))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6c1d3123-4519-4742-9194-622cb1714b7d')
|
||||
def test_keypair_create_delete(self):
|
||||
# Keypair should be created, verified and deleted
|
||||
k_name = data_utils.rand_name('keypair-')
|
||||
|
@ -77,6 +79,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest):
|
|||
"Field private_key is empty or not found.")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a4233d5d-52d8-47cc-9a25-e1864527e3df')
|
||||
def test_get_keypair_detail(self):
|
||||
# Keypair should be created, Got details by name and deleted
|
||||
k_name = data_utils.rand_name('keypair-')
|
||||
|
@ -92,6 +95,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest):
|
|||
"Field public_key is empty or not found.")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('39c90c6a-304a-49dd-95ec-2366129def05')
|
||||
def test_keypair_create_with_pub_key(self):
|
||||
# Keypair should be created with a given public key
|
||||
k_name = data_utils.rand_name('keypair-')
|
||||
|
|
|
@ -33,6 +33,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.addCleanup(self.client.delete_keypair, keypair_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('29cca892-46ae-4d48-bc32-8fe7e731eb81')
|
||||
def test_keypair_create_with_invalid_pub_key(self):
|
||||
# Keypair should not be created with a non RSA public key
|
||||
k_name = data_utils.rand_name('keypair-')
|
||||
|
@ -41,6 +42,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self._create_keypair, k_name, pub_key)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7cc32e47-4c42-489d-9623-c5e2cb5a2fa5')
|
||||
def test_keypair_delete_nonexistent_key(self):
|
||||
# Non-existent key deletion should throw a proper error
|
||||
k_name = data_utils.rand_name("keypair-non-existent-")
|
||||
|
@ -48,6 +50,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
k_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('dade320e-69ca-42a9-ba4a-345300f127e0')
|
||||
def test_create_keypair_with_empty_public_key(self):
|
||||
# Keypair should not be created with an empty public key
|
||||
k_name = data_utils.rand_name("keypair-")
|
||||
|
@ -56,6 +59,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
k_name, pub_key)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('fc100c19-2926-4b9c-8fdc-d0589ee2f9ff')
|
||||
def test_create_keypair_when_public_key_bits_exceeds_maximum(self):
|
||||
# Keypair should not be created when public key bits are too long
|
||||
k_name = data_utils.rand_name("keypair-")
|
||||
|
@ -64,6 +68,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
k_name, pub_key)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0359a7f1-f002-4682-8073-0c91e4011b7c')
|
||||
def test_create_keypair_with_duplicate_name(self):
|
||||
# Keypairs with duplicate names should not be created
|
||||
k_name = data_utils.rand_name('keypair-')
|
||||
|
@ -74,12 +79,14 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.delete_keypair(k_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('1398abe1-4a84-45fb-9294-89f514daff00')
|
||||
def test_create_keypair_with_empty_name_string(self):
|
||||
# Keypairs with name being an empty string should not be created
|
||||
self.assertRaises(lib_exc.BadRequest, self._create_keypair,
|
||||
'')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('3faa916f-779f-4103-aca7-dc3538eee1b7')
|
||||
def test_create_keypair_with_long_keynames(self):
|
||||
# Keypairs with name longer than 255 chars should not be created
|
||||
k_name = 'keypair-'.ljust(260, '0')
|
||||
|
@ -87,6 +94,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
k_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('45fbe5e0-acb5-49aa-837a-ff8d0719db91')
|
||||
def test_create_keypair_invalid_name(self):
|
||||
# Keypairs with name being an invalid name should not be created
|
||||
k_name = 'key_/.\@:'
|
||||
|
|
|
@ -25,6 +25,7 @@ class AbsoluteLimitsTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.limits_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b54c66af-6ab6-4cf0-a9e5-a0cb58d75e0b')
|
||||
def test_absLimits_get(self):
|
||||
# To check if all limits are present in the response
|
||||
absolute_limits = self.client.get_absolute_limits()
|
||||
|
|
|
@ -34,6 +34,7 @@ class AbsoluteLimitsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server_client = cls.servers_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('215cd465-d8ae-49c9-bf33-9c911913a5c8')
|
||||
def test_max_image_meta_exceed_limit(self):
|
||||
# We should not create vm with image meta over maxImageMeta limit
|
||||
# Get max limit value
|
||||
|
|
|
@ -60,6 +60,7 @@ class SecurityGroupRulesTestJSON(base.BaseSecurityGroupsTest):
|
|||
"Miss-matched key is %s" % key)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('850795d7-d4d3-4e55-b527-a774c0123d3a')
|
||||
@test.services('network')
|
||||
def test_security_group_rules_create(self):
|
||||
# Positive test: Creation of Security Group rule
|
||||
|
@ -78,6 +79,7 @@ class SecurityGroupRulesTestJSON(base.BaseSecurityGroupsTest):
|
|||
self._check_expected_response(rule)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('7a01873e-3c38-4f30-80be-31a043cfe2fd')
|
||||
@test.services('network')
|
||||
def test_security_group_rules_create_with_optional_cidr(self):
|
||||
# Positive test: Creation of Security Group rule
|
||||
|
@ -101,6 +103,7 @@ class SecurityGroupRulesTestJSON(base.BaseSecurityGroupsTest):
|
|||
self._check_expected_response(rule)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('7f5d2899-7705-4d4b-8458-4505188ffab6')
|
||||
@test.services('network')
|
||||
def test_security_group_rules_create_with_optional_group_id(self):
|
||||
# Positive test: Creation of Security Group rule
|
||||
|
@ -129,6 +132,7 @@ class SecurityGroupRulesTestJSON(base.BaseSecurityGroupsTest):
|
|||
self._check_expected_response(rule)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('a6154130-5a55-4850-8be4-5e9e796dbf17')
|
||||
@test.services('network')
|
||||
def test_security_group_rules_list(self):
|
||||
# Positive test: Created Security Group rules should be
|
||||
|
@ -164,6 +168,7 @@ class SecurityGroupRulesTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.assertTrue(any([i for i in rules if i['id'] == rule2_id]))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('fc5c5acf-2091-43a6-a6ae-e42760e9ffaf')
|
||||
@test.services('network')
|
||||
def test_security_group_rules_delete_when_peer_group_deleted(self):
|
||||
# Positive test:rule will delete when peer group deleting
|
||||
|
|
|
@ -38,6 +38,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
cls.client = cls.security_groups_client
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('1d507e98-7951-469b-82c3-23f1e6b8c254')
|
||||
@test.services('network')
|
||||
def test_create_security_group_rule_with_non_existent_id(self):
|
||||
# Negative test: Creation of Security Group rule should FAIL
|
||||
|
@ -52,6 +53,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
parent_group_id, ip_protocol, from_port, to_port)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('2244d7e4-adb7-4ecb-9930-2d77e123ce4f')
|
||||
@test.services('network')
|
||||
def test_create_security_group_rule_with_invalid_id(self):
|
||||
# Negative test: Creation of Security Group rule should FAIL
|
||||
|
@ -66,6 +68,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
parent_group_id, ip_protocol, from_port, to_port)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('8bd56d02-3ffa-4d67-9933-b6b9a01d6089')
|
||||
@test.services('network')
|
||||
def test_create_security_group_rule_duplicate(self):
|
||||
# Negative test: Create Security Group rule duplicate should fail
|
||||
|
@ -89,6 +92,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
parent_group_id, ip_protocol, from_port, to_port)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('84c81249-9f6e-439c-9bbf-cbb0d2cddbdf')
|
||||
@test.services('network')
|
||||
def test_create_security_group_rule_with_invalid_ip_protocol(self):
|
||||
# Negative test: Creation of Security Group rule should FAIL
|
||||
|
@ -106,6 +110,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
parent_group_id, ip_protocol, from_port, to_port)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('12bbc875-1045-4f7a-be46-751277baedb9')
|
||||
@test.services('network')
|
||||
def test_create_security_group_rule_with_invalid_from_port(self):
|
||||
# Negative test: Creation of Security Group rule should FAIL
|
||||
|
@ -122,6 +127,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
parent_group_id, ip_protocol, from_port, to_port)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('ff88804d-144f-45d1-bf59-dd155838a43a')
|
||||
@test.services('network')
|
||||
def test_create_security_group_rule_with_invalid_to_port(self):
|
||||
# Negative test: Creation of Security Group rule should FAIL
|
||||
|
@ -138,6 +144,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
parent_group_id, ip_protocol, from_port, to_port)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('00296fa9-0576-496a-ae15-fbab843189e0')
|
||||
@test.services('network')
|
||||
def test_create_security_group_rule_with_invalid_port_range(self):
|
||||
# Negative test: Creation of Security Group rule should FAIL
|
||||
|
@ -154,6 +161,7 @@ class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
secgroup_id, ip_protocol, from_port, to_port)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('56fddcca-dbb8-4494-a0db-96e9f869527c')
|
||||
@test.services('network')
|
||||
def test_delete_security_group_rule_with_non_existent_id(self):
|
||||
# Negative test: Deletion of Security Group rule should be FAIL
|
||||
|
|
|
@ -28,6 +28,7 @@ class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest):
|
|||
cls.client = cls.security_groups_client
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('eb2b087d-633d-4d0d-a7bd-9e6ba35b32de')
|
||||
@test.services('network')
|
||||
def test_security_groups_create_list_delete(self):
|
||||
# Positive test:Should return the list of Security Groups
|
||||
|
@ -60,6 +61,7 @@ class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest):
|
|||
for m_group in deleted_sgs))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('ecc0da4a-2117-48af-91af-993cca39a615')
|
||||
@test.services('network')
|
||||
def test_security_group_create_get_delete(self):
|
||||
# Security Group should be created, fetched and deleted
|
||||
|
@ -82,6 +84,7 @@ class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.client.wait_for_resource_deletion(securitygroup['id'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('fe4abc0d-83f5-4c50-ad11-57a1127297a2')
|
||||
@test.services('network')
|
||||
def test_server_security_groups(self):
|
||||
# Checks that security groups may be added and linked to a server
|
||||
|
@ -125,6 +128,7 @@ class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.client.delete_security_group(sg2['id'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('7d4e1d3c-3209-4d6d-b020-986304ebad1f')
|
||||
@test.services('network')
|
||||
def test_update_security_groups(self):
|
||||
# Update security group name and description
|
||||
|
|
|
@ -52,6 +52,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
return non_exist_id
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('673eaec1-9b3e-48ed-bdf1-2786c1b9661c')
|
||||
@test.services('network')
|
||||
def test_security_group_get_nonexistent_group(self):
|
||||
# Negative test:Should not be able to GET the details
|
||||
|
@ -63,6 +64,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
@decorators.skip_because(bug="1161411",
|
||||
condition=CONF.service_available.neutron)
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('1759c3cb-b0fc-44b7-86ce-c99236be911d')
|
||||
@test.services('network')
|
||||
def test_security_group_create_with_invalid_group_name(self):
|
||||
# Negative test: Security Group should not be created with group name
|
||||
|
@ -84,6 +86,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
@decorators.skip_because(bug="1161411",
|
||||
condition=CONF.service_available.neutron)
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('777b6f14-aca9-4758-9e84-38783cfa58bc')
|
||||
@test.services('network')
|
||||
def test_security_group_create_with_invalid_group_description(self):
|
||||
# Negative test:Security Group should not be created with description
|
||||
|
@ -101,6 +104,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.client.create_security_group, s_name,
|
||||
s_description)
|
||||
|
||||
@test.idempotent_id('9fdb4abc-6b66-4b27-b89c-eb215a956168')
|
||||
@testtools.skipIf(CONF.service_available.neutron,
|
||||
"Neutron allows duplicate names for security groups")
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
|
@ -117,6 +121,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
s_description)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('36a1629f-c6da-4a26-b8b8-55e7e5d5cd58')
|
||||
@test.services('network')
|
||||
def test_delete_the_default_security_group(self):
|
||||
# Negative test:Deletion of the "default" Security Group should Fail
|
||||
|
@ -132,6 +137,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
default_security_group_id)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('6727c00b-214c-4f9e-9a52-017ac3e98411')
|
||||
@test.services('network')
|
||||
def test_delete_nonexistent_security_group(self):
|
||||
# Negative test:Deletion of a non-existent Security Group should fail
|
||||
|
@ -140,6 +146,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.client.delete_security_group, non_exist_id)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('1438f330-8fa4-4aeb-8a94-37c250106d7f')
|
||||
@test.services('network')
|
||||
def test_delete_security_group_without_passing_id(self):
|
||||
# Negative test:Deletion of a Security Group with out passing ID
|
||||
|
@ -147,6 +154,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.assertRaises(lib_exc.NotFound,
|
||||
self.client.delete_security_group, '')
|
||||
|
||||
@test.idempotent_id('00579617-fe04-4e1c-9d08-ca7467d2e34b')
|
||||
@testtools.skipIf(CONF.service_available.neutron,
|
||||
"Neutron not check the security_group_id")
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
|
@ -161,6 +169,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.client.update_security_group, sg_id_invalid,
|
||||
name=s_name, description=s_description)
|
||||
|
||||
@test.idempotent_id('cda8d8b4-59f8-4087-821d-20cf5a03b3b1')
|
||||
@testtools.skipIf(CONF.service_available.neutron,
|
||||
"Neutron not check the security_group_name")
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
|
@ -176,6 +185,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
self.client.update_security_group,
|
||||
securitygroup_id, name=s_new_name)
|
||||
|
||||
@test.idempotent_id('97d12b1c-a610-4194-93f1-ba859e718b45')
|
||||
@testtools.skipIf(CONF.service_available.neutron,
|
||||
"Neutron not check the security_group_description")
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
|
@ -192,6 +202,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
|
|||
securitygroup_id, description=s_new_des)
|
||||
|
||||
@test.attr(type=['negative', 'smoke'])
|
||||
@test.idempotent_id('27edee9c-873d-4da6-a68a-3c256efebe8f')
|
||||
@test.services('network')
|
||||
def test_update_non_existent_security_group(self):
|
||||
# Update a non-existent Security Group should Fail
|
||||
|
|
|
@ -117,6 +117,7 @@ class AttachInterfacesTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(sorted(list1), sorted(list2))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('73fe8f02-590d-4bf1-b184-e9ca81065051')
|
||||
@test.services('network')
|
||||
def test_create_list_show_delete_interfaces(self):
|
||||
server, ifs = self._create_server_get_interfaces()
|
||||
|
@ -139,6 +140,7 @@ class AttachInterfacesTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(len(ifs) - 1, len(_ifs))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('c7e0e60b-ee45-43d0-abeb-8596fd42a2f9')
|
||||
@test.services('network')
|
||||
def test_add_remove_fixed_ip(self):
|
||||
# Add and Remove the fixed IP to server.
|
||||
|
|
|
@ -29,6 +29,7 @@ class AZV2TestJSON(base.BaseComputeTest):
|
|||
cls.client = cls.availability_zone_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a8333aa2-205c-449f-a828-d38c2489bf25')
|
||||
def test_get_availability_zone_list_with_non_admin_user(self):
|
||||
# List of availability zone with non-administrator user
|
||||
availability_zone = self.client.get_availability_zone_list()
|
||||
|
|
|
@ -55,6 +55,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server = cls.client.get_server(cls.server_initial['id'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('5de47127-9977-400a-936f-abcfbec1218f')
|
||||
def test_verify_server_details(self):
|
||||
# Verify the specified server attributes are set correctly
|
||||
self.assertEqual(self.accessIPv4, self.server['accessIPv4'])
|
||||
|
@ -68,6 +69,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(self.meta, self.server['metadata'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('9a438d88-10c6-4bcd-8b5b-5b6e25e1346f')
|
||||
def test_list_servers(self):
|
||||
# The created server should be in the list of all servers
|
||||
body = self.client.list_servers()
|
||||
|
@ -76,6 +78,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(found)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('585e934c-448e-43c4-acbf-d06a9b899997')
|
||||
def test_list_servers_with_detail(self):
|
||||
# The created server should be in the detailed list of all servers
|
||||
body = self.client.list_servers_with_detail()
|
||||
|
@ -83,6 +86,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
found = any([i for i in servers if i['id'] == self.server['id']])
|
||||
self.assertTrue(found)
|
||||
|
||||
@test.idempotent_id('cbc0f52f-05aa-492b-bdc1-84b575ca294b')
|
||||
@testtools.skipUnless(CONF.compute.run_ssh,
|
||||
'Instance validation tests are disabled.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -94,6 +98,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.password)
|
||||
self.assertEqual(flavor['vcpus'], linux_client.get_number_of_vcpus())
|
||||
|
||||
@test.idempotent_id('ac1ad47f-984b-4441-9274-c9079b7a0666')
|
||||
@testtools.skipUnless(CONF.compute.run_ssh,
|
||||
'Instance validation tests are disabled.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -104,6 +109,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(linux_client.hostname_equals_servername(self.name))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ed20d3fb-9d1f-4329-b160-543fbd5d9811')
|
||||
def test_create_server_with_scheduler_hint_group(self):
|
||||
# Create a server with the scheduler hint "group".
|
||||
name = data_utils.rand_name('server_group')
|
||||
|
@ -121,6 +127,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
server_group = self.client.get_server_group(group_id)
|
||||
self.assertIn(server['id'], server_group['members'])
|
||||
|
||||
@test.idempotent_id('0578d144-ed74-43f8-8e57-ab10dbf9b3c2')
|
||||
@testtools.skipUnless(CONF.service_available.neutron,
|
||||
'Neutron service must be available.')
|
||||
def test_verify_multiple_nics_order(self):
|
||||
|
@ -193,6 +200,7 @@ class ServersWithSpecificFlavorTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.flavor_client = cls.os_adm.flavors_client
|
||||
cls.client = cls.servers_client
|
||||
|
||||
@test.idempotent_id('b3c7bcfc-bb5b-4e22-b517-c7f686b802ca')
|
||||
@testtools.skipUnless(CONF.compute.run_ssh,
|
||||
'Instance validation tests are disabled.')
|
||||
@test.attr(type='gate')
|
||||
|
|
|
@ -33,6 +33,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.servers_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9e6e0c87-3352-42f7-9faf-5d6210dbd159')
|
||||
def test_delete_server_while_in_building_state(self):
|
||||
# Delete a server while it's VM state is Building
|
||||
server = self.create_test_server(wait_until='BUILD')
|
||||
|
@ -40,6 +41,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.wait_for_server_termination(server['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('925fdfb4-5b13-47ea-ac8a-c36ae6fddb05')
|
||||
def test_delete_active_server(self):
|
||||
# Delete a server while it's VM state is Active
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -47,6 +49,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.wait_for_server_termination(server['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('546d368c-bb6c-4645-979a-83ed16f3a6be')
|
||||
def test_delete_server_while_in_shutoff_state(self):
|
||||
# Delete a server while it's VM state is Shutoff
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -55,6 +58,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.delete_server(server['id'])
|
||||
self.client.wait_for_server_termination(server['id'])
|
||||
|
||||
@test.idempotent_id('943bd6e8-4d7a-4904-be83-7a6cc2d4213b')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.pause,
|
||||
'Pause is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -66,6 +70,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.delete_server(server['id'])
|
||||
self.client.wait_for_server_termination(server['id'])
|
||||
|
||||
@test.idempotent_id('1f82ebd3-8253-4f4e-b93f-de9b7df56d8b')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
|
||||
'Suspend is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -77,6 +82,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.delete_server(server['id'])
|
||||
self.client.wait_for_server_termination(server['id'])
|
||||
|
||||
@test.idempotent_id('bb0cb402-09dd-4947-b6e5-5e7e1cfa61ad')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
|
||||
'Shelve is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -96,6 +102,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.delete_server(server['id'])
|
||||
self.client.wait_for_server_termination(server['id'])
|
||||
|
||||
@test.idempotent_id('ab0c38b4-cdd8-49d3-9b92-0cb898723c01')
|
||||
@testtools.skipIf(not CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -107,6 +114,7 @@ class DeleteServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.delete_server(server['id'])
|
||||
self.client.wait_for_server_termination(server['id'])
|
||||
|
||||
@test.idempotent_id('d0f3f0d6-d9b6-4a32-8da4-23015dcab23c')
|
||||
@test.services('volume')
|
||||
@test.attr(type='gate')
|
||||
def test_delete_server_while_in_attached_volume(self):
|
||||
|
@ -139,6 +147,7 @@ class DeleteServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
cls.admin_client = cls.os_adm.servers_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('99774678-e072-49d1-9d2a-49a59bc56063')
|
||||
def test_delete_server_while_in_error_state(self):
|
||||
# Delete a server while it's VM state is error
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -151,6 +160,7 @@ class DeleteServersAdminTestJSON(base.BaseV2ComputeAdminTest):
|
|||
ignore_error=True)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('73177903-6737-4f27-a60c-379e8ae8cf48')
|
||||
def test_admin_delete_servers_of_others(self):
|
||||
# Administrator can delete servers of others
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
|
|
@ -44,6 +44,7 @@ class ServerDiskConfigTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(disk_config, server['OS-DCF:diskConfig'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('bef56b09-2e8c-4883-a370-4950812f430e')
|
||||
def test_rebuild_server_with_manual_disk_config(self):
|
||||
# A server should be rebuilt using the manual disk config option
|
||||
self._update_server_with_disk_config(disk_config='AUTO')
|
||||
|
@ -60,6 +61,7 @@ class ServerDiskConfigTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9c9fae77-4feb-402f-8450-bf1c8b609713')
|
||||
def test_rebuild_server_with_auto_disk_config(self):
|
||||
# A server should be rebuilt using the auto disk config option
|
||||
self._update_server_with_disk_config(disk_config='MANUAL')
|
||||
|
@ -83,6 +85,7 @@ class ServerDiskConfigTestJSON(base.BaseV2ComputeTest):
|
|||
else:
|
||||
return self.flavor_ref
|
||||
|
||||
@test.idempotent_id('414e7e93-45b5-44bc-8e03-55159c6bfc97')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -100,6 +103,7 @@ class ServerDiskConfigTestJSON(base.BaseV2ComputeTest):
|
|||
server = self.client.get_server(self.server_id)
|
||||
self.assertEqual('AUTO', server['OS-DCF:diskConfig'])
|
||||
|
||||
@test.idempotent_id('693d16f3-556c-489a-8bac-3d0ca2490bad')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -118,6 +122,7 @@ class ServerDiskConfigTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('5ef18867-358d-4de9-b3c9-94d4ba35742f')
|
||||
def test_update_server_from_auto_to_manual(self):
|
||||
# A server should be updated from auto to manual disk config
|
||||
self._update_server_with_disk_config(disk_config='AUTO')
|
||||
|
|
|
@ -28,6 +28,7 @@ class InstanceActionsTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server_id = server['id']
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('77ca5cc5-9990-45e0-ab98-1de8fead201a')
|
||||
def test_list_instance_actions(self):
|
||||
# List actions of the provided server
|
||||
self.client.reboot(self.server_id, 'HARD')
|
||||
|
@ -39,6 +40,7 @@ class InstanceActionsTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(any([i for i in body if i['action'] == 'reboot']))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('aacc71ca-1d70-4aa5-bbf6-0ff71470e43c')
|
||||
def test_get_instance_action(self):
|
||||
# Get the action details of the provided server
|
||||
body = self.client.get_instance_action(self.server_id,
|
||||
|
|
|
@ -30,6 +30,7 @@ class InstanceActionsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server_id = server['id']
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('67e1fce6-7ec2-45c6-92d4-0a8f1a632910')
|
||||
def test_list_instance_actions_non_existent_server(self):
|
||||
# List actions of the non-existent server id
|
||||
non_existent_server_id = data_utils.rand_uuid()
|
||||
|
@ -38,6 +39,7 @@ class InstanceActionsNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
non_existent_server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0269f40a-6f18-456c-b336-c03623c897f1')
|
||||
def test_get_instance_action_invalid_request(self):
|
||||
# Get the action details of the provided server with invalid request
|
||||
self.assertRaises(lib_exc.NotFound, self.client.get_instance_action,
|
||||
|
|
|
@ -86,6 +86,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
network = cls.isolated_creds.get_primary_network()
|
||||
cls.fixed_network_name = network['name']
|
||||
|
||||
@test.idempotent_id('05e8a8e7-9659-459a-989d-92c2f501f4ba')
|
||||
@utils.skip_unless_attr('multiple_images', 'Only one image found')
|
||||
@test.attr(type='gate')
|
||||
def test_list_servers_filter_by_image(self):
|
||||
|
@ -99,6 +100,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(self.s3['id'], map(lambda x: x['id'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('573637f5-7325-47bb-9144-3476d0416908')
|
||||
def test_list_servers_filter_by_flavor(self):
|
||||
# Filter the list of servers by flavor
|
||||
params = {'flavor': self.flavor_ref_alt}
|
||||
|
@ -110,6 +112,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(self.s3['id'], map(lambda x: x['id'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9b067a7b-7fee-4f6a-b29c-be43fe18fc5a')
|
||||
def test_list_servers_filter_by_server_name(self):
|
||||
# Filter the list of servers by server name
|
||||
params = {'name': self.s1_name}
|
||||
|
@ -121,6 +124,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('ca78e20e-fddb-4ce6-b7f7-bcbf8605e66e')
|
||||
def test_list_servers_filter_by_server_status(self):
|
||||
# Filter the list of servers by server status
|
||||
params = {'status': 'active'}
|
||||
|
@ -132,6 +136,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(self.s3['id'], map(lambda x: x['id'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('451dbbb2-f330-4a9f-b0e1-5f5d2cb0f34c')
|
||||
def test_list_servers_filter_by_shutoff_status(self):
|
||||
# Filter the list of servers by server shutoff status
|
||||
params = {'status': 'shutoff'}
|
||||
|
@ -149,6 +154,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn(self.s3['id'], map(lambda x: x['id'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('614cdfc1-d557-4bac-915b-3e67b48eee76')
|
||||
def test_list_servers_filter_by_limit(self):
|
||||
# Verify only the expected number of servers are returned
|
||||
params = {'limit': 1}
|
||||
|
@ -156,6 +162,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(1, len([x for x in servers['servers'] if 'id' in x]))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b1495414-2d93-414c-8019-849afe8d319e')
|
||||
def test_list_servers_filter_by_zero_limit(self):
|
||||
# Verify only the expected number of servers are returned
|
||||
params = {'limit': 0}
|
||||
|
@ -163,6 +170,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(0, len(servers['servers']))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('37791bbd-90c0-4de0-831e-5f38cba9c6b3')
|
||||
def test_list_servers_filter_by_exceed_limit(self):
|
||||
# Verify only the expected number of servers are returned
|
||||
params = {'limit': 100000}
|
||||
|
@ -171,6 +179,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(len([x for x in all_servers['servers'] if 'id' in x]),
|
||||
len([x for x in servers['servers'] if 'id' in x]))
|
||||
|
||||
@test.idempotent_id('b3304c3b-97df-46d2-8cd3-e2b6659724e7')
|
||||
@utils.skip_unless_attr('multiple_images', 'Only one image found')
|
||||
@test.attr(type='gate')
|
||||
def test_list_servers_detailed_filter_by_image(self):
|
||||
|
@ -184,6 +193,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(self.s3['id'], map(lambda x: x['id'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('80c574cc-0925-44ba-8602-299028357dd9')
|
||||
def test_list_servers_detailed_filter_by_flavor(self):
|
||||
# Filter the detailed list of servers by flavor
|
||||
params = {'flavor': self.flavor_ref_alt}
|
||||
|
@ -195,6 +205,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(self.s3['id'], map(lambda x: x['id'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f9eb2b70-735f-416c-b260-9914ac6181e4')
|
||||
def test_list_servers_detailed_filter_by_server_name(self):
|
||||
# Filter the detailed list of servers by server name
|
||||
params = {'name': self.s1_name}
|
||||
|
@ -206,6 +217,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('de2612ab-b7dd-4044-b0b1-d2539601911f')
|
||||
def test_list_servers_detailed_filter_by_server_status(self):
|
||||
# Filter the detailed list of servers by server status
|
||||
params = {'status': 'active'}
|
||||
|
@ -220,6 +232,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
if x['id'] in test_ids])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('e9f624ee-92af-4562-8bec-437945a18dcb')
|
||||
def test_list_servers_filtered_by_name_wildcard(self):
|
||||
# List all servers that contains '-instance' in name
|
||||
params = {'name': '-instance'}
|
||||
|
@ -242,6 +255,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('24a89b0c-0d55-4a28-847f-45075f19b27b')
|
||||
def test_list_servers_filtered_by_name_regex(self):
|
||||
# list of regex that should match s1, s2 and s3
|
||||
regexes = ['^.*\-instance\-[0-9]+$', '^.*\-instance\-.*$']
|
||||
|
@ -266,6 +280,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('43a1242e-7b31-48d1-88f2-3f72aa9f2077')
|
||||
def test_list_servers_filtered_by_ip(self):
|
||||
# Filter servers by ip
|
||||
# Here should be listed 1 server
|
||||
|
@ -282,6 +297,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
@decorators.skip_because(bug="1182883",
|
||||
condition=CONF.service_available.neutron)
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a905e287-c35e-42f2-b132-d02b09f3654a')
|
||||
def test_list_servers_filtered_by_ip_regex(self):
|
||||
# Filter servers by regex ip
|
||||
# List all servers filtered by part of ip address.
|
||||
|
@ -297,6 +313,7 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(self.s3_name, map(lambda x: x['name'], servers))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('67aec2d0-35fe-4503-9f92-f13272b867ed')
|
||||
def test_list_servers_detailed_limit_results(self):
|
||||
# Verify only the expected number of detailed results are returned
|
||||
params = {'limit': 1}
|
||||
|
|
|
@ -49,6 +49,7 @@ class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.deleted_fixtures.append(srv)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('24a26f1a-1ddc-4eea-b0d7-a90cc874ad8f')
|
||||
def test_list_servers_with_a_deleted_server(self):
|
||||
# Verify deleted servers do not show by default in list servers
|
||||
# List servers and verify server not returned
|
||||
|
@ -60,6 +61,7 @@ class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual([], actual)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('ff01387d-c7ad-47b4-ae9e-64fa214638fe')
|
||||
def test_list_servers_by_non_existing_image(self):
|
||||
# Listing servers for a non existing image returns empty list
|
||||
non_existing_image = '1234abcd-zzz0-aaa9-ppp3-0987654abcde'
|
||||
|
@ -68,6 +70,7 @@ class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual([], servers)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('5913660b-223b-44d4-a651-a0fbfd44ca75')
|
||||
def test_list_servers_by_non_existing_flavor(self):
|
||||
# Listing servers by non existing flavor returns empty list
|
||||
non_existing_flavor = 1234
|
||||
|
@ -76,6 +79,7 @@ class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual([], servers)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('e2c77c4a-000a-4af3-a0bd-629a328bde7c')
|
||||
def test_list_servers_by_non_existing_server_name(self):
|
||||
# Listing servers for a non existent server name returns empty list
|
||||
non_existing_name = 'junk_server_1234'
|
||||
|
@ -84,6 +88,7 @@ class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual([], servers)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('fcdf192d-0f74-4d89-911f-1ec002b822c4')
|
||||
def test_list_servers_status_non_existing(self):
|
||||
# Return an empty list when invalid status is specified
|
||||
non_existing_status = 'BALONEY'
|
||||
|
@ -92,36 +97,42 @@ class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual([], servers)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('12c80a9f-2dec-480e-882b-98ba15757659')
|
||||
def test_list_servers_by_limits(self):
|
||||
# List servers by specifying limits
|
||||
body = self.client.list_servers({'limit': 1})
|
||||
self.assertEqual(1, len([x for x in body['servers'] if 'id' in x]))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('d47c17fb-eebd-4287-8e95-f20a7e627b18')
|
||||
def test_list_servers_by_limits_greater_than_actual_count(self):
|
||||
# List servers by specifying a greater value for limit
|
||||
body = self.client.list_servers({'limit': 100})
|
||||
self.assertEqual(len(self.existing_fixtures), len(body['servers']))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('679bc053-5e70-4514-9800-3dfab1a380a6')
|
||||
def test_list_servers_by_limits_pass_string(self):
|
||||
# Return an error if a string value is passed for limit
|
||||
self.assertRaises(lib_exc.BadRequest, self.client.list_servers,
|
||||
{'limit': 'testing'})
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('62610dd9-4713-4ee0-8beb-fd2c1aa7f950')
|
||||
def test_list_servers_by_limits_pass_negative_value(self):
|
||||
# Return an error if a negative value for limit is passed
|
||||
self.assertRaises(lib_exc.BadRequest, self.client.list_servers,
|
||||
{'limit': -1})
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('87d12517-e20a-4c9c-97b6-dd1628d6d6c9')
|
||||
def test_list_servers_by_changes_since_invalid_date(self):
|
||||
# Return an error when invalid date format is passed
|
||||
self.assertRaises(lib_exc.BadRequest, self.client.list_servers,
|
||||
{'changes-since': '2011/01/01'})
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('74745ad8-b346-45b5-b9b8-509d7447fc1f')
|
||||
def test_list_servers_by_changes_since_future_date(self):
|
||||
# Return an empty list when a date in the future is passed
|
||||
changes_since = {'changes-since': '2051-01-01T12:34:00Z'}
|
||||
|
@ -129,6 +140,7 @@ class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(0, len(body['servers']))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('93055106-2d34-46fe-af68-d9ddbf7ee570')
|
||||
def test_list_servers_detail_server_is_deleted(self):
|
||||
# Server details are not listed for a deleted server
|
||||
deleted_ids = [s['id'] for s in self.deleted_fixtures]
|
||||
|
|
|
@ -35,6 +35,7 @@ class MultipleCreateTestJSON(base.BaseV2ComputeTest):
|
|||
return body
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('61e03386-89c3-449c-9bb1-a06f423fd9d1')
|
||||
def test_multiple_create(self):
|
||||
body = self._create_multiple_servers(wait_until='ACTIVE',
|
||||
min_count=1,
|
||||
|
@ -45,6 +46,7 @@ class MultipleCreateTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn('reservation_id', body)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('864777fb-2f1e-44e3-b5b9-3eb6fa84f2f7')
|
||||
def test_multiple_create_with_reservation_return(self):
|
||||
body = self._create_multiple_servers(wait_until='ACTIVE',
|
||||
min_count=1,
|
||||
|
|
|
@ -37,30 +37,35 @@ class MultipleCreateNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
return body
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('daf29d8d-e928-4a01-9a8c-b129603f3fc0')
|
||||
def test_min_count_less_than_one(self):
|
||||
invalid_min_count = 0
|
||||
self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
|
||||
min_count=invalid_min_count)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('999aa722-d624-4423-b813-0d1ac9884d7a')
|
||||
def test_min_count_non_integer(self):
|
||||
invalid_min_count = 2.5
|
||||
self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
|
||||
min_count=invalid_min_count)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a6f9c2ab-e060-4b82-b23c-4532cb9390ff')
|
||||
def test_max_count_less_than_one(self):
|
||||
invalid_max_count = 0
|
||||
self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
|
||||
max_count=invalid_max_count)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('9c5698d1-d7af-4c80-b971-9d403135eea2')
|
||||
def test_max_count_non_integer(self):
|
||||
invalid_max_count = 2.5
|
||||
self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
|
||||
max_count=invalid_max_count)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('476da616-f1ef-4271-a9b1-b9fc87727cdf')
|
||||
def test_max_count_less_than_min_count(self):
|
||||
min_count = 3
|
||||
max_count = 2
|
||||
|
|
|
@ -59,6 +59,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.servers_client
|
||||
cls.server_id = cls.rebuild_server(None)
|
||||
|
||||
@test.idempotent_id('6158df09-4b82-4ab3-af6d-29cf36af858d')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.change_password,
|
||||
'Change password not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -95,17 +96,20 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
'%s > %s' % (new_boot_time, boot_time))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('2cb1baf6-ac8d-4429-bf0d-ba8a0ba53e32')
|
||||
def test_reboot_server_hard(self):
|
||||
# The server should be power cycled
|
||||
self._test_reboot_server('HARD')
|
||||
|
||||
@decorators.skip_because(bug="1014647")
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('4640e3ef-a5df-482e-95a1-ceeeb0faa84d')
|
||||
def test_reboot_server_soft(self):
|
||||
# The server should be signaled to reboot gracefully
|
||||
self._test_reboot_server('SOFT')
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('aaa6cdf3-55a7-461a-add9-1c8596b9a07c')
|
||||
def test_rebuild_server(self):
|
||||
# The server should be rebuilt using the provided image and data
|
||||
meta = {'rebuild': 'server'}
|
||||
|
@ -143,6 +147,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.rebuild(self.server_id, self.image_ref)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('30449a88-5aff-4f9b-9866-6ee9b17f906d')
|
||||
def test_rebuild_server_in_stop_state(self):
|
||||
# The server in stop state should be rebuilt using the provided
|
||||
# image and remain in SHUTOFF state
|
||||
|
@ -206,18 +211,21 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
# NOTE(mriedem): tearDown requires the server to be started.
|
||||
self.client.start(self.server_id)
|
||||
|
||||
@test.idempotent_id('1499262a-9328-4eda-9068-db1ac57498d2')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type='smoke')
|
||||
def test_resize_server_confirm(self):
|
||||
self._test_resize_server_confirm(stop=False)
|
||||
|
||||
@test.idempotent_id('138b131d-66df-48c9-a171-64f45eb92962')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type='smoke')
|
||||
def test_resize_server_confirm_from_stopped(self):
|
||||
self._test_resize_server_confirm(stop=True)
|
||||
|
||||
@test.idempotent_id('c03aab19-adb1-44f5-917d-c419577e9e68')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -237,6 +245,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
server = self.client.get_server(self.server_id)
|
||||
self.assertEqual(previous_flavor_ref, server['flavor']['id'])
|
||||
|
||||
@test.idempotent_id('b963d4f1-94b3-4c40-9e97-7b583f46e470')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
|
||||
'Snapshotting not available, backup not possible.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -326,6 +335,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
lines = len(output.split('\n'))
|
||||
self.assertEqual(lines, 10)
|
||||
|
||||
@test.idempotent_id('4b8867e6-fffa-4d54-b1d1-6fdda57be2f3')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.console_output,
|
||||
'Console output not supported.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -343,6 +353,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
|
||||
self.wait_for(self._get_output)
|
||||
|
||||
@test.idempotent_id('89104062-69d8-4b19-a71b-f47b7af093d7')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.console_output,
|
||||
'Console output not supported.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -362,6 +373,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
|
||||
self.wait_for(_check_full_length_console_log)
|
||||
|
||||
@test.idempotent_id('5b65d4e7-4ecd-437c-83c0-d6b79d927568')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.console_output,
|
||||
'Console output not supported.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -380,6 +392,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
|
||||
self.wait_for(self._get_output)
|
||||
|
||||
@test.idempotent_id('bd61a9fd-062f-4670-972b-2d6c3e3b9e73')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.pause,
|
||||
'Pause is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -389,6 +402,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.unpause_server(self.server_id)
|
||||
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
|
||||
|
||||
@test.idempotent_id('0d8ee21e-b749-462d-83da-b85b41c86c7f')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
|
||||
'Suspend is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -398,6 +412,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.resume_server(self.server_id)
|
||||
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
|
||||
|
||||
@test.idempotent_id('77eba8e0-036e-4635-944b-f7a8f3b78dc9')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
|
||||
'Shelve is not available.')
|
||||
@test.attr(type='gate')
|
||||
|
@ -428,6 +443,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('af8eafd4-38a7-4a4b-bdbc-75145a580560')
|
||||
def test_stop_start_server(self):
|
||||
self.servers_client.stop(self.server_id)
|
||||
self.servers_client.wait_for_server_status(self.server_id, 'SHUTOFF')
|
||||
|
@ -435,6 +451,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('80a8094c-211e-440a-ab88-9e59d556c7ee')
|
||||
def test_lock_unlock_server(self):
|
||||
# Lock the server,try server stop(exceptions throw),unlock it and retry
|
||||
self.servers_client.lock_server(self.server_id)
|
||||
|
@ -456,6 +473,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotEqual('None', parsed_url.hostname)
|
||||
self.assertIn(parsed_url.scheme, valid_scheme)
|
||||
|
||||
@test.idempotent_id('c6bc11bf-592e-4015-9319-1c98dc64daf5')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.vnc_console,
|
||||
'VNC Console feature is disabled.')
|
||||
@test.attr(type='gate')
|
||||
|
|
|
@ -37,6 +37,7 @@ class ServerAddressesTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server = cls.create_test_server(wait_until='ACTIVE')
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('6eb718c0-02d9-4d5e-acd1-4e0c269cef39')
|
||||
@test.services('network')
|
||||
def test_list_server_addresses(self):
|
||||
# All public and private addresses for
|
||||
|
@ -54,6 +55,7 @@ class ServerAddressesTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertTrue(address['version'])
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('87bbc374-5538-4f64-b673-2b0e4443cc30')
|
||||
@test.services('network')
|
||||
def test_list_server_addresses_by_network(self):
|
||||
# Providing a network type should filter
|
||||
|
|
|
@ -37,6 +37,7 @@ class ServerAddressesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server = cls.create_test_server(wait_until='ACTIVE')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('02c3f645-2d2e-4417-8525-68c0407d001b')
|
||||
@test.services('network')
|
||||
def test_list_server_addresses_invalid_server_id(self):
|
||||
# List addresses request should fail if server id not in system
|
||||
|
@ -44,6 +45,7 @@ class ServerAddressesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
'999')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a2ab5144-78c0-4942-a0ed-cc8edccfd9ba')
|
||||
@test.services('network')
|
||||
def test_list_server_addresses_by_network_neg(self):
|
||||
# List addresses by network should fail if network name not valid
|
||||
|
|
|
@ -63,11 +63,13 @@ class ServerGroupTestJSON(base.BaseV2ComputeTest):
|
|||
self._delete_server_group(server_group)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('5dc57eda-35b7-4af7-9e5f-3c2be3d2d68b')
|
||||
def test_create_delete_server_group_with_affinity_policy(self):
|
||||
# Create and Delete the server-group with affinity policy
|
||||
self._create_delete_server_group(self.policy)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3645a102-372f-4140-afad-13698d850d23')
|
||||
def test_create_delete_server_group_with_anti_affinity_policy(self):
|
||||
# Create and Delete the server-group with anti-affinity policy
|
||||
policy = ['anti-affinity']
|
||||
|
@ -75,12 +77,14 @@ class ServerGroupTestJSON(base.BaseV2ComputeTest):
|
|||
|
||||
@decorators.skip_because(bug="1324348")
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6d9bae05-eb32-425d-a673-e14e1b1c6306')
|
||||
def test_create_delete_server_group_with_multiple_policies(self):
|
||||
# Create and Delete the server-group with multiple policies
|
||||
policies = ['affinity', 'affinity']
|
||||
self._create_delete_server_group(policies)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('154dc5a4-a2fe-44b5-b99e-f15806a4a113')
|
||||
def test_create_delete_multiple_server_groups_with_same_name_policy(self):
|
||||
# Create and Delete the server-groups with same name and same policy
|
||||
server_groups = []
|
||||
|
@ -96,6 +100,7 @@ class ServerGroupTestJSON(base.BaseV2ComputeTest):
|
|||
self._delete_server_group(server_groups[i])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b3545034-dd78-48f0-bdc2-a4adfa6d0ead')
|
||||
def test_get_server_group(self):
|
||||
# Get the server-group
|
||||
body = self.client.get_server_group(
|
||||
|
@ -103,6 +108,7 @@ class ServerGroupTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(self.created_server_group, body)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('d4874179-27b4-4d7d-80e4-6c560cdfe321')
|
||||
def test_list_server_groups(self):
|
||||
# List the server-group
|
||||
body = self.client.list_server_groups()
|
||||
|
|
|
@ -33,6 +33,7 @@ class ServerMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.set_server_metadata(self.server_id, meta)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('479da087-92b3-4dcf-aeb3-fd293b2d14ce')
|
||||
def test_list_server_metadata(self):
|
||||
# All metadata key/value pairs for a server should be returned
|
||||
resp_metadata = self.client.list_server_metadata(self.server_id)
|
||||
|
@ -42,6 +43,7 @@ class ServerMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(expected, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('211021f6-21de-4657-a68f-908878cfe251')
|
||||
def test_set_server_metadata(self):
|
||||
# The server's metadata should be replaced with the provided values
|
||||
# Create a new set of metadata for the server
|
||||
|
@ -54,6 +56,7 @@ class ServerMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(resp_metadata, req_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('344d981e-0c33-4997-8a5d-6c1d803e4134')
|
||||
def test_update_server_metadata(self):
|
||||
# The server's metadata values should be updated to the
|
||||
# provided values
|
||||
|
@ -66,6 +69,7 @@ class ServerMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(expected, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('0f58d402-e34a-481d-8af8-b392b17426d9')
|
||||
def test_update_metadata_empty_body(self):
|
||||
# The original metadata should not be lost if empty metadata body is
|
||||
# passed
|
||||
|
@ -76,12 +80,14 @@ class ServerMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(expected, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3043c57d-7e0e-49a6-9a96-ad569c265e6a')
|
||||
def test_get_server_metadata_item(self):
|
||||
# The value for a specific metadata key should be returned
|
||||
meta = self.client.get_server_metadata_item(self.server_id, 'key2')
|
||||
self.assertEqual('value2', meta['key2'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('58c02d4f-5c67-40be-8744-d3fa5982eb1c')
|
||||
def test_set_server_metadata_item(self):
|
||||
# The item's value should be updated to the provided value
|
||||
# Update the metadata value
|
||||
|
@ -94,6 +100,7 @@ class ServerMetadataTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(expected, resp_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('127642d6-4c7b-4486-b7cd-07265a378658')
|
||||
def test_delete_server_metadata_item(self):
|
||||
# The metadata value/key pair should be deleted from the server
|
||||
self.client.delete_server_metadata_item(self.server_id, 'key1')
|
||||
|
|
|
@ -33,6 +33,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server_id = server['id']
|
||||
|
||||
@test.attr(type=['gate', 'negative'])
|
||||
@test.idempotent_id('fe114a8f-3a57-4eff-9ee2-4e14628df049')
|
||||
def test_server_create_metadata_key_too_long(self):
|
||||
# Attempt to start a server with a meta-data key that is > 255
|
||||
# characters
|
||||
|
@ -48,6 +49,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
# no teardown - all creates should fail
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('92431555-4d8b-467c-b95b-b17daa5e57ff')
|
||||
def test_create_server_metadata_blank_key(self):
|
||||
# Blank key should trigger an error.
|
||||
meta = {'': 'data1'}
|
||||
|
@ -56,6 +58,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
meta=meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('4d9cd7a3-2010-4b41-b8fe-3bbf0b169466')
|
||||
def test_server_metadata_non_existent_server(self):
|
||||
# GET on a non-existent server should not succeed
|
||||
non_existent_server_id = data_utils.rand_uuid()
|
||||
|
@ -65,6 +68,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
'test2')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f408e78e-3066-4097-9299-3b0182da812e')
|
||||
def test_list_server_metadata_non_existent_server(self):
|
||||
# List metadata on a non-existent server should not succeed
|
||||
non_existent_server_id = data_utils.rand_uuid()
|
||||
|
@ -73,6 +77,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
non_existent_server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0025fbd6-a4ba-4cde-b8c2-96805dcfdabc')
|
||||
def test_wrong_key_passed_in_body(self):
|
||||
# Raise BadRequest if key in uri does not match
|
||||
# the key passed in body.
|
||||
|
@ -82,6 +87,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, 'key', meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0df38c2a-3d4e-4db5-98d8-d4d9fa843a12')
|
||||
def test_set_metadata_non_existent_server(self):
|
||||
# Set metadata on a non-existent server should not succeed
|
||||
non_existent_server_id = data_utils.rand_uuid()
|
||||
|
@ -92,6 +98,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('904b13dc-0ef2-4e4c-91cd-3b4a0f2f49d8')
|
||||
def test_update_metadata_non_existent_server(self):
|
||||
# An update should not happen for a non-existent server
|
||||
non_existent_server_id = data_utils.rand_uuid()
|
||||
|
@ -102,6 +109,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a452f38c-05c2-4b47-bd44-a4f0bf5a5e48')
|
||||
def test_update_metadata_with_blank_key(self):
|
||||
# Blank key should trigger an error
|
||||
meta = {'': 'data1'}
|
||||
|
@ -110,6 +118,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, meta=meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6bbd88e1-f8b3-424d-ba10-ae21c45ada8d')
|
||||
def test_delete_metadata_non_existent_server(self):
|
||||
# Should not be able to delete metadata item from a non-existent server
|
||||
non_existent_server_id = data_utils.rand_uuid()
|
||||
|
@ -119,6 +128,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
'd')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('d8c0a210-a5c3-4664-be04-69d96746b547')
|
||||
def test_metadata_items_limit(self):
|
||||
# A 403 Forbidden or 413 Overlimit (old behaviour) exception
|
||||
# will be raised while exceeding metadata items limit for
|
||||
|
@ -143,6 +153,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, req_metadata)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('96100343-7fa9-40d8-80fa-d29ef588ce1c')
|
||||
def test_set_server_metadata_blank_key(self):
|
||||
# Raise a bad request error for blank key.
|
||||
# set_server_metadata will replace all metadata with new value
|
||||
|
@ -152,6 +163,7 @@ class ServerMetadataNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, meta=meta)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('64a91aee-9723-4863-be44-4c9d9f1e7d0e')
|
||||
def test_set_server_metadata_missing_metadata(self):
|
||||
# Raise a bad request error for a missing metadata field
|
||||
# set_server_metadata will replace all metadata with new value
|
||||
|
|
|
@ -27,9 +27,11 @@ class ServerPasswordTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server = cls.create_test_server(wait_until="ACTIVE")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f83b582f-62a8-4f22-85b0-0dee50ff783a')
|
||||
def test_get_server_password(self):
|
||||
self.client.get_password(self.server['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f8229e8b-b625-4493-800a-bde86ac611ea')
|
||||
def test_delete_server_password(self):
|
||||
self.client.delete_password(self.server['id'])
|
||||
|
|
|
@ -29,6 +29,7 @@ class ServerPersonalityTestJSON(base.BaseV2ComputeTest):
|
|||
cls.user_client = cls.limits_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('176cd8c9-b9e8-48ee-a480-180beab292bf')
|
||||
def test_personality_files_exceed_limit(self):
|
||||
# Server creation should fail if greater than the maximum allowed
|
||||
# number of files are injected into the server.
|
||||
|
@ -48,6 +49,7 @@ class ServerPersonalityTestJSON(base.BaseV2ComputeTest):
|
|||
self.create_test_server, personality=personality)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('52f12ee8-5180-40cc-b417-31572ea3d555')
|
||||
def test_can_create_server_with_max_number_personality_files(self):
|
||||
# Server should be created successfully if maximum allowed number of
|
||||
# files is injected into the server during creation.
|
||||
|
|
|
@ -77,6 +77,7 @@ class ServerRescueTestJSON(base.BaseV2ComputeTest):
|
|||
self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('fd032140-714c-42e4-a8fd-adcd8df06be6')
|
||||
def test_rescue_unrescue_instance(self):
|
||||
self.servers_client.rescue_server(
|
||||
self.server_id, adminPass=self.password)
|
||||
|
@ -85,6 +86,7 @@ class ServerRescueTestJSON(base.BaseV2ComputeTest):
|
|||
self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('4842e0cf-e87d-4d9d-b61f-f4791da3cacc')
|
||||
def test_rescued_vm_associate_dissociate_floating_ip(self):
|
||||
# Rescue the server
|
||||
self.servers_client.rescue_server(
|
||||
|
@ -102,6 +104,7 @@ class ServerRescueTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('affca41f-7195-492d-8065-e09eee245404')
|
||||
def test_rescued_vm_add_remove_security_group(self):
|
||||
# Rescue the server
|
||||
self.servers_client.rescue_server(
|
||||
|
|
|
@ -78,6 +78,7 @@ class ServerRescueNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.servers_client.unpause_server(server_id)
|
||||
self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
|
||||
|
||||
@test.idempotent_id('cc3a883f-43c0-4fb6-a9bb-5579d64984ed')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.pause,
|
||||
'Pause is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -91,11 +92,13 @@ class ServerRescueNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('db22b618-f157-4566-a317-1b6d467a8094')
|
||||
def test_rescued_vm_reboot(self):
|
||||
self.assertRaises(lib_exc.Conflict, self.servers_client.reboot,
|
||||
self.rescue_id, 'HARD')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6dfc0a55-3a77-4564-a144-1587b7971dde')
|
||||
def test_rescue_non_existent_server(self):
|
||||
# Rescue a non-existing server
|
||||
non_existent_server = data_utils.rand_uuid()
|
||||
|
@ -104,12 +107,14 @@ class ServerRescueNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
non_existent_server)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('70cdb8a1-89f8-437d-9448-8844fd82bf46')
|
||||
def test_rescued_vm_rebuild(self):
|
||||
self.assertRaises(lib_exc.Conflict,
|
||||
self.servers_client.rebuild,
|
||||
self.rescue_id,
|
||||
self.image_ref_alt)
|
||||
|
||||
@test.idempotent_id('d0ccac79-0091-4cf4-a1ce-26162d0cc55f')
|
||||
@test.services('volume')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
def test_rescued_vm_attach_volume(self):
|
||||
|
@ -128,6 +133,7 @@ class ServerRescueNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
volume['id'],
|
||||
device='/dev/%s' % self.device)
|
||||
|
||||
@test.idempotent_id('f56e465b-fe10-48bf-b75d-646cda3a8bc9')
|
||||
@test.services('volume')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
def test_rescued_vm_detach_volume(self):
|
||||
|
|
|
@ -30,6 +30,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
super(ServersTestJSON, self).tearDown()
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b92d5ec7-b1dd-44a2-87e4-45e888c46ef0')
|
||||
def test_create_server_with_admin_password(self):
|
||||
# If an admin password is provided on server creation, the server's
|
||||
# root password should be set to that password.
|
||||
|
@ -39,6 +40,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual('testpassword', server['adminPass'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('8fea6be7-065e-47cf-89b8-496e6f96c699')
|
||||
def test_create_with_existing_server_name(self):
|
||||
# Creating a server with a name that already exists is allowed
|
||||
|
||||
|
@ -58,6 +60,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual(name1, name2)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f9e15296-d7f9-4e62-b53f-a04e89160833')
|
||||
def test_create_specify_keypair(self):
|
||||
# Specify a keypair while creating a server
|
||||
|
||||
|
@ -83,6 +86,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
return server
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('5e6ccff8-349d-4852-a8b3-055df7988dd2')
|
||||
def test_update_server_name(self):
|
||||
# The server name should be changed to the the provided value
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -90,6 +94,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self._update_server_name(server['id'], 'ACTIVE')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6ac19cb1-27a3-40ec-b350-810bdc04c08e')
|
||||
def test_update_server_name_in_stop_state(self):
|
||||
# The server name should be changed to the the provided value
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -99,6 +104,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn('progress', updated_server)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('89b90870-bc13-4b73-96af-f9d4f2b70077')
|
||||
def test_update_access_server_address(self):
|
||||
# The server's access addresses should reflect the provided values
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
|
@ -115,6 +121,7 @@ class ServersTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertEqual('::babe:202:202', server['accessIPv6'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('38fb1d02-c3c5-41de-91d3-9bc2025a75eb')
|
||||
def test_create_server_with_ipv6_addr_only(self):
|
||||
# Create a server without an IPv4 address(only IPv6 address).
|
||||
server = self.create_test_server(accessIPv6='2001:2001::3')
|
||||
|
|
|
@ -50,6 +50,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.server_id = server['id']
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('dbbfd247-c40c-449e-8f6c-d2aa7c7da7cf')
|
||||
def test_server_name_blank(self):
|
||||
# Create a server with name parameter empty
|
||||
|
||||
|
@ -58,6 +59,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
name='')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('b8a7235e-5246-4a8f-a08e-b34877c6586f')
|
||||
def test_personality_file_contents_not_encoded(self):
|
||||
# Use an unencoded file when creating a server with personality
|
||||
|
||||
|
@ -70,6 +72,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
personality=person)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('fcba1052-0a50-4cf3-b1ac-fae241edf02f')
|
||||
def test_create_with_invalid_image(self):
|
||||
# Create a server with an unknown image
|
||||
|
||||
|
@ -78,6 +81,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
image_id=-1)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('18f5227f-d155-4429-807c-ccb103887537')
|
||||
def test_create_with_invalid_flavor(self):
|
||||
# Create a server with an unknown flavor
|
||||
|
||||
|
@ -86,6 +90,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
flavor=-1,)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7f70a4d1-608f-4794-9e56-cb182765972c')
|
||||
def test_invalid_access_ip_v4_address(self):
|
||||
# An access IPv4 address must match a valid address pattern
|
||||
|
||||
|
@ -94,6 +99,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.create_test_server, accessIPv4=IPv4)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('5226dd80-1e9c-4d8a-b5f9-b26ca4763fd0')
|
||||
def test_invalid_ip_v6_address(self):
|
||||
# An access IPv6 address must match a valid address pattern
|
||||
|
||||
|
@ -102,6 +108,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.BadRequest,
|
||||
self.create_test_server, accessIPv6=IPv6)
|
||||
|
||||
@test.idempotent_id('7ea45b3e-e770-46fa-bfcc-9daaf6d987c0')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -112,6 +119,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.resize,
|
||||
nonexistent_server, self.flavor_ref)
|
||||
|
||||
@test.idempotent_id('ced1a1d7-2ab6-45c9-b90f-b27d87b30efd')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -121,6 +129,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.BadRequest, self.client.resize,
|
||||
self.server_id, flavor_ref=nonexistent_flavor)
|
||||
|
||||
@test.idempotent_id('45436a7d-a388-4a35-a9d8-3adc5d0d940b')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||
'Resize not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -130,12 +139,14 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id, flavor_ref="")
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('d4c023a0-9c55-4747-9dd5-413b820143c7')
|
||||
def test_reboot_non_existent_server(self):
|
||||
# Reboot a non existent server
|
||||
nonexistent_server = data_utils.rand_uuid()
|
||||
self.assertRaises(lib_exc.NotFound, self.client.reboot,
|
||||
nonexistent_server, 'SOFT')
|
||||
|
||||
@test.idempotent_id('d1417e7f-a509-41b5-a102-d5eed8613369')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.pause,
|
||||
'Pause is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -149,6 +160,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.unpause_server(self.server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('98fa0458-1485-440f-873b-fe7f0d714930')
|
||||
def test_rebuild_reboot_deleted_server(self):
|
||||
# Rebuild and Reboot a deleted server
|
||||
server = self.create_test_server()
|
||||
|
@ -162,6 +174,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
server['id'], 'SOFT')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('d86141a7-906e-4731-b187-d64a2ea61422')
|
||||
def test_rebuild_non_existent_server(self):
|
||||
# Rebuild a non existent server
|
||||
nonexistent_server = data_utils.rand_uuid()
|
||||
|
@ -171,6 +184,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.image_ref_alt)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('fd57f159-68d6-4c2a-902b-03070828a87e')
|
||||
def test_create_numeric_server_name(self):
|
||||
server_name = 12345
|
||||
self.assertRaises(lib_exc.BadRequest,
|
||||
|
@ -178,6 +192,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
name=server_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('c3e0fb12-07fc-4d76-a22e-37409887afe8')
|
||||
def test_create_server_name_length_exceeds_256(self):
|
||||
# Create a server with name length exceeding 256 characters
|
||||
|
||||
|
@ -187,6 +202,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
name=server_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('4e72dc2d-44c5-4336-9667-f7972e95c402')
|
||||
def test_create_with_invalid_network_uuid(self):
|
||||
# Pass invalid network uuid while creating a server
|
||||
|
||||
|
@ -197,6 +213,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
networks=networks)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7a2efc39-530c-47de-b875-2dd01c8d39bd')
|
||||
def test_create_with_non_existent_keypair(self):
|
||||
# Pass a non-existent keypair while creating a server
|
||||
|
||||
|
@ -206,6 +223,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
key_name=key_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7fc74810-0bd2-4cd7-8244-4f33a9db865a')
|
||||
def test_create_server_metadata_exceeds_length_limit(self):
|
||||
# Pass really long metadata while creating a server
|
||||
|
||||
|
@ -215,6 +233,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
meta=metadata)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('aa8eed43-e2cb-4ebf-930b-da14f6a21d81')
|
||||
def test_update_name_of_non_existent_server(self):
|
||||
# Update name of a non-existent server
|
||||
|
||||
|
@ -225,6 +244,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
server_name, name=new_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('38204696-17c6-44da-9590-40f87fb5a899')
|
||||
def test_update_server_set_empty_name(self):
|
||||
# Update name of the server to an empty string
|
||||
|
||||
|
@ -235,6 +255,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
server_name, name=new_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('543d84c1-dd2e-4c6d-8cb2-b9da0efaa384')
|
||||
def test_update_server_of_another_tenant(self):
|
||||
# Update name of a server that belongs to another tenant
|
||||
|
||||
|
@ -244,6 +265,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
name=new_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('5c8e244c-dada-4590-9944-749c455b431f')
|
||||
def test_update_server_name_length_exceeds_256(self):
|
||||
# Update name of server exceed the name length limit
|
||||
|
||||
|
@ -254,6 +276,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
name=new_name)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('1041b4e6-514b-4855-96a5-e974b60870a3')
|
||||
def test_delete_non_existent_server(self):
|
||||
# Delete a non existent server
|
||||
|
||||
|
@ -262,6 +285,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
nonexistent_server)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('5c75009d-3eea-423e-bea3-61b09fd25f9c')
|
||||
def test_delete_a_server_of_another_tenant(self):
|
||||
# Delete a server that belongs to another tenant
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -269,12 +293,14 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('75f79124-277c-45e6-a373-a1d6803f4cc4')
|
||||
def test_delete_server_pass_negative_id(self):
|
||||
# Pass an invalid string parameter to delete server
|
||||
|
||||
self.assertRaises(lib_exc.NotFound, self.client.delete_server, -1)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f4d7279b-5fd2-4bf2-9ba4-ae35df0d18c5')
|
||||
def test_delete_server_pass_id_exceeding_length_limit(self):
|
||||
# Pass a server ID that exceeds length limit to delete server
|
||||
|
||||
|
@ -282,6 +308,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
sys.maxint + 1)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('c5fa6041-80cd-483b-aa6d-4e45f19d093c')
|
||||
def test_create_with_nonexistent_security_group(self):
|
||||
# Create a server with a nonexistent security group
|
||||
|
||||
|
@ -291,6 +318,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
security_groups=security_groups)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('3436b02f-1b1e-4f03-881e-c6a602327439')
|
||||
def test_get_non_existent_server(self):
|
||||
# Get a non existent server details
|
||||
nonexistent_server = data_utils.rand_uuid()
|
||||
|
@ -298,12 +326,14 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
nonexistent_server)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('a31460a9-49e1-42aa-82ee-06e0bb7c2d03')
|
||||
def test_stop_non_existent_server(self):
|
||||
# Stop a non existent server
|
||||
nonexistent_server = data_utils.rand_uuid()
|
||||
self.assertRaises(lib_exc.NotFound, self.servers_client.stop,
|
||||
nonexistent_server)
|
||||
|
||||
@test.idempotent_id('6a8dc0c6-6cd4-4c0a-9f32-413881828091')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.pause,
|
||||
'Pause is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -313,6 +343,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.NotFound, self.client.pause_server,
|
||||
nonexistent_server)
|
||||
|
||||
@test.idempotent_id('705b8e3a-e8a7-477c-a19b-6868fc24ac75')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.pause,
|
||||
'Pause is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -322,6 +353,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.NotFound, self.client.unpause_server,
|
||||
nonexistent_server)
|
||||
|
||||
@test.idempotent_id('c8e639a7-ece8-42dd-a2e0-49615917ba4f')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.pause,
|
||||
'Pause is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -331,6 +363,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.client.unpause_server,
|
||||
self.server_id)
|
||||
|
||||
@test.idempotent_id('d1f032d5-7b6e-48aa-b252-d5f16dd994ca')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
|
||||
'Suspend is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -340,6 +373,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.NotFound, self.client.suspend_server,
|
||||
nonexistent_server)
|
||||
|
||||
@test.idempotent_id('7f323206-05a9-4bf8-996b-dd5b2036501b')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
|
||||
'Suspend is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -352,6 +386,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id)
|
||||
self.client.resume_server(self.server_id)
|
||||
|
||||
@test.idempotent_id('221cd282-bddb-4837-a683-89c2487389b6')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
|
||||
'Suspend is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -361,6 +396,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.NotFound, self.client.resume_server,
|
||||
nonexistent_server)
|
||||
|
||||
@test.idempotent_id('ccb6294d-c4c9-498f-8a43-554c098bfadb')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.suspend,
|
||||
'Suspend is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -371,6 +407,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.server_id)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7dd919e7-413f-4198-bebb-35e2a01b13e9')
|
||||
def test_get_console_output_of_non_existent_server(self):
|
||||
# get the console output for a non existent server
|
||||
nonexistent_server = data_utils.rand_uuid()
|
||||
|
@ -379,6 +416,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
nonexistent_server, 10)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('6f47992b-5144-4250-9f8b-f00aa33950f3')
|
||||
def test_force_delete_nonexistent_server_id(self):
|
||||
# force-delete a non existent server
|
||||
nonexistent_server = data_utils.rand_uuid()
|
||||
|
@ -387,6 +425,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
nonexistent_server)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('9c6d38cc-fcfb-437a-85b9-7b788af8bf01')
|
||||
def test_restore_nonexistent_server_id(self):
|
||||
# restore-delete a non existent server
|
||||
nonexistent_server = data_utils.rand_uuid()
|
||||
|
@ -395,12 +434,14 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
nonexistent_server)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7fcadfab-bd6a-4753-8db7-4a51e51aade9')
|
||||
def test_restore_server_invalid_state(self):
|
||||
# we can only restore-delete a server in 'soft-delete' state
|
||||
self.assertRaises(lib_exc.Conflict,
|
||||
self.client.restore_soft_deleted_server,
|
||||
self.server_id)
|
||||
|
||||
@test.idempotent_id('abca56e2-a892-48ea-b5e5-e07e69774816')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
|
||||
'Shelve is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -410,6 +451,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.NotFound, self.client.shelve_server,
|
||||
nonexistent_server)
|
||||
|
||||
@test.idempotent_id('443e4f9b-e6bf-4389-b601-3a710f15fddd')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
|
||||
'Shelve is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -439,6 +481,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
|
||||
self.client.unshelve_server(self.server_id)
|
||||
|
||||
@test.idempotent_id('23d23b37-afaf-40d7-aa5d-5726f82d8821')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
|
||||
'Shelve is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
@ -448,6 +491,7 @@ class ServersNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertRaises(lib_exc.NotFound, self.client.unshelve_server,
|
||||
nonexistent_server)
|
||||
|
||||
@test.idempotent_id('8f198ded-1cca-4228-9e65-c6b449c54880')
|
||||
@testtools.skipUnless(CONF.compute_feature_enabled.shelve,
|
||||
'Shelve is not available.')
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
|
|
|
@ -45,6 +45,7 @@ class VirtualInterfacesTestJSON(base.BaseV2ComputeTest):
|
|||
@decorators.skip_because(bug="1183436",
|
||||
condition=CONF.service_available.neutron)
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('96c4e2ef-5e4d-4d7f-87f5-fed6dca18016')
|
||||
@test.services('network')
|
||||
def test_list_virtual_interfaces(self):
|
||||
# Positive test:Should be able to GET the virtual interfaces list
|
||||
|
|
|
@ -35,6 +35,7 @@ class VirtualInterfacesNegativeTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.servers_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('64ebd03c-1089-4306-93fa-60f5eb5c803c')
|
||||
@test.services('network')
|
||||
def test_list_virtual_interfaces_invalid_server_id(self):
|
||||
# Negative test: Should not be able to GET virtual interfaces
|
||||
|
|
|
@ -104,30 +104,35 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
super(AuthorizationTestJSON, cls).resource_cleanup()
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('56816e4a-bd34-47b5-aee9-268c3efeb5d4')
|
||||
def test_get_server_for_alt_account_fails(self):
|
||||
# A GET request for a server on another user's account should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.get_server,
|
||||
self.server['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('fb8a4870-6d9d-44ad-8375-95d52e98d9f6')
|
||||
def test_delete_server_for_alt_account_fails(self):
|
||||
# A DELETE request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.delete_server,
|
||||
self.server['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('d792f91f-1d49-4eb5-b1ff-b229c4b9dc64')
|
||||
def test_update_server_for_alt_account_fails(self):
|
||||
# An update server request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.update_server,
|
||||
self.server['id'], name='test')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('488f24df-d7f7-4207-949a-f17fcb8e8769')
|
||||
def test_list_server_addresses_for_alt_account_fails(self):
|
||||
# A list addresses request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.list_addresses,
|
||||
self.server['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('00b442d0-2e72-40e7-9b1f-31772e36da01')
|
||||
def test_list_server_addresses_by_network_for_alt_account_fails(self):
|
||||
# A list address/network request for another user's server should fail
|
||||
server_id = self.server['id']
|
||||
|
@ -136,6 +141,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
'public')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('cc90b35a-19f0-45d2-b680-2aabf934aa22')
|
||||
def test_list_servers_with_alternate_tenant(self):
|
||||
# A list on servers from one tenant should not
|
||||
# show on alternate tenant
|
||||
|
@ -146,30 +152,35 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn(self.server['id'], alt_server_ids)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('376dbc16-0779-4384-a723-752774799641')
|
||||
def test_change_password_for_alt_account_fails(self):
|
||||
# A change password request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.change_password,
|
||||
self.server['id'], 'newpass')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('14cb5ff5-f646-45ca-8f51-09081d6c0c24')
|
||||
def test_reboot_server_for_alt_account_fails(self):
|
||||
# A reboot request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.reboot,
|
||||
self.server['id'], 'HARD')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('8a0bce51-cd00-480b-88ba-dbc7d8408a37')
|
||||
def test_rebuild_server_for_alt_account_fails(self):
|
||||
# A rebuild request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.rebuild,
|
||||
self.server['id'], self.image_ref_alt)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('e4da647e-f982-4e61-9dad-1d1abebfb933')
|
||||
def test_resize_server_for_alt_account_fails(self):
|
||||
# A resize request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound, self.alt_client.resize,
|
||||
self.server['id'], self.flavor_ref_alt)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a9fe8112-0ffa-4902-b061-f892bd5fe0d3')
|
||||
def test_create_image_for_alt_account_fails(self):
|
||||
# A create image request for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -177,12 +188,14 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.server['id'], 'testImage')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('95d445f6-babc-4f2e-aea3-aa24ec5e7f0d')
|
||||
def test_create_server_with_unauthorized_image(self):
|
||||
# Server creation with another user's image should fail
|
||||
self.assertRaises(lib_exc.BadRequest, self.alt_client.create_server,
|
||||
'test', self.image['id'], self.flavor_ref)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('acf8724b-142b-4044-82c3-78d31a533f24')
|
||||
def test_create_server_fails_when_tenant_incorrect(self):
|
||||
# A create server request should fail if the tenant id does not match
|
||||
# the current user
|
||||
|
@ -196,6 +209,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.image['id'], self.flavor_ref)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('f03d1ded-7fd4-4d29-bc13-e2391f29c625')
|
||||
def test_create_keypair_in_analt_user_tenant(self):
|
||||
# A create keypair request should fail if the tenant id does not match
|
||||
# the current user
|
||||
|
@ -219,6 +233,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
"if the tenant id does not match the current user")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('85bcdd8f-56b4-4868-ae56-63fbf6f7e405')
|
||||
def test_get_keypair_of_alt_account_fails(self):
|
||||
# A GET request for another user's keypair should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -226,6 +241,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.keypairname)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('6d841683-a8e0-43da-a1b8-b339f7692b61')
|
||||
def test_delete_keypair_of_alt_account_fails(self):
|
||||
# A DELETE request for another user's keypair should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -233,12 +249,14 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.keypairname)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('fcb2e144-36e3-4dfb-9f9f-e72fcdec5656')
|
||||
def test_get_image_for_alt_account_fails(self):
|
||||
# A GET request for an image on another user's account should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.alt_images_client.get_image, self.image['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9facb962-f043-4a9d-b9ee-166a32dea098')
|
||||
def test_delete_image_for_alt_account_fails(self):
|
||||
# A DELETE request for another user's image should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -246,6 +264,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.image['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('752c917e-83be-499d-a422-3559127f7d3c')
|
||||
def test_create_security_group_in_analt_user_tenant(self):
|
||||
# A create security group request should fail if the tenant id does not
|
||||
# match the current user
|
||||
|
@ -271,6 +290,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
"the tenant id does not match the current user")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('9db3590f-4d15-4e5f-985e-b28514919a6f')
|
||||
def test_get_security_group_of_alt_account_fails(self):
|
||||
# A GET request for another user's security group should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -278,6 +298,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.security_group['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('155387a5-2bbc-4acf-ab06-698dae537ea5')
|
||||
def test_delete_security_group_of_alt_account_fails(self):
|
||||
# A DELETE request for another user's security group should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
@ -285,6 +306,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.security_group['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b2b76de0-210a-4089-b921-591c9ec552f6')
|
||||
def test_create_security_group_rule_in_analt_user_tenant(self):
|
||||
# A create security group rule request should fail if the tenant id
|
||||
# does not match the current user
|
||||
|
@ -315,6 +337,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
" current user")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('c6044177-37ef-4ce4-b12c-270ddf26d7da')
|
||||
def test_delete_security_group_rule_of_alt_account_fails(self):
|
||||
# A DELETE request for another user's security group rule
|
||||
# should fail
|
||||
|
@ -323,6 +346,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.rule['id'])
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('c5f52351-53d9-4fc9-83e5-917f7f5e3d71')
|
||||
def test_set_metadata_of_alt_account_server_fails(self):
|
||||
# A set metadata for another user's server should fail
|
||||
req_metadata = {'meta1': 'data1', 'meta2': 'data2'}
|
||||
|
@ -332,6 +356,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
req_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('fb6f51e9-df15-4939-898d-1aca38c258f0')
|
||||
def test_set_metadata_of_alt_account_image_fails(self):
|
||||
# A set metadata for another user's image should fail
|
||||
req_metadata = {'meta1': 'value1', 'meta2': 'value2'}
|
||||
|
@ -340,6 +365,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.image['id'], req_metadata)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('dea1936a-473d-49f2-92ad-97bb7aded22e')
|
||||
def test_get_metadata_of_alt_account_server_fails(self):
|
||||
# A get metadata for another user's server should fail
|
||||
req_metadata = {'meta1': 'data1'}
|
||||
|
@ -351,6 +377,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.server['id'], 'meta1')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('16b2d724-0d3b-4216-a9fa-97bd4d9cf670')
|
||||
def test_get_metadata_of_alt_account_image_fails(self):
|
||||
# A get metadata for another user's image should fail
|
||||
req_metadata = {'meta1': 'value1'}
|
||||
|
@ -363,6 +390,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.image['id'], 'meta1')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('79531e2e-e721-493c-8b30-a35db36fdaa6')
|
||||
def test_delete_metadata_of_alt_account_server_fails(self):
|
||||
# A delete metadata for another user's server should fail
|
||||
req_metadata = {'meta1': 'data1'}
|
||||
|
@ -374,6 +402,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.server['id'], 'meta1')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('a5175dcf-cef8-43d6-9b77-3cb707d62e94')
|
||||
def test_delete_metadata_of_alt_account_image_fails(self):
|
||||
# A delete metadata for another user's image should fail
|
||||
req_metadata = {'meta1': 'data1'}
|
||||
|
@ -386,6 +415,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest):
|
|||
self.image['id'], 'meta1')
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('b0c1e7a0-8853-40fd-8384-01f93d116cae')
|
||||
def test_get_console_output_of_alt_account_server_fails(self):
|
||||
# A Get Console Output for another user's server should fail
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
|
|
|
@ -28,6 +28,7 @@ LOG = logging.getLogger(__name__)
|
|||
class ExtensionsTestJSON(base.BaseV2ComputeTest):
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3bb27738-b759-4e0d-a5fa-37d7a6df07d1')
|
||||
def test_list_extensions(self):
|
||||
# List of all extensions
|
||||
if len(CONF.compute_feature_enabled.api_extensions) == 0:
|
||||
|
@ -44,6 +45,7 @@ class ExtensionsTestJSON(base.BaseV2ComputeTest):
|
|||
extension_list = map(lambda x: x['alias'], extensions)
|
||||
LOG.debug("Nova extensions: %s" % ','.join(extension_list))
|
||||
|
||||
@test.idempotent_id('05762f39-bdfa-4cdb-9b46-b78f8e78e2fd')
|
||||
@test.requires_ext(extension='os-consoles', service='compute')
|
||||
@test.attr(type='gate')
|
||||
def test_get_extension(self):
|
||||
|
|
|
@ -81,6 +81,7 @@ class LiveBlockMigrationTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.volumes_client.wait_for_volume_status(volume_id, 'available')
|
||||
self.volumes_client.delete_volume(volume_id)
|
||||
|
||||
@test.idempotent_id('1dce86b8-eb04-4c03-a9d8-9c1dc3ee0c7b')
|
||||
@testtools.skipIf(not CONF.compute_feature_enabled.live_migration,
|
||||
'Live migration not available')
|
||||
@test.attr(type='gate')
|
||||
|
@ -96,6 +97,7 @@ class LiveBlockMigrationTestJSON(base.BaseV2ComputeAdminTest):
|
|||
self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
|
||||
self.assertEqual(target_host, self._get_host_for_server(server_id))
|
||||
|
||||
@test.idempotent_id('e19c0cc6-6720-4ed8-be83-b6603ed5c812')
|
||||
@testtools.skipIf(not CONF.compute_feature_enabled.live_migration or not
|
||||
CONF.compute_feature_enabled.
|
||||
block_migration_for_live_migration,
|
||||
|
|
|
@ -42,6 +42,7 @@ class LiveBlockMigrationNegativeTestJSON(base.BaseV2ComputeAdminTest):
|
|||
return body
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('7fb7856e-ae92-44c9-861a-af62d7830bcb')
|
||||
def test_invalid_host_for_migration(self):
|
||||
# Migrating to an invalid host should not change the status
|
||||
target_host = data_utils.rand_name('host-')
|
||||
|
|
|
@ -28,6 +28,7 @@ class NetworksTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.os.networks_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('3fe07175-312e-49a5-a623-5f52eeada4c2')
|
||||
def test_list_networks(self):
|
||||
networks = self.client.list_networks()
|
||||
self.assertNotEmpty(networks, "No networks found.")
|
||||
|
|
|
@ -40,6 +40,7 @@ class QuotasTestJSON(base.BaseV2ComputeTest):
|
|||
'cores', 'security_groups'))
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('f1ef0a97-dbbb-4cca-adc5-c9fbc4f76107')
|
||||
def test_get_quotas(self):
|
||||
# User can get the quota set for it's tenant
|
||||
expected_quota_set = self.default_quota_set | set(['id'])
|
||||
|
@ -56,6 +57,7 @@ class QuotasTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(quota, quota_set.keys())
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('9bfecac7-b966-4f47-913f-1a9e2c12134a')
|
||||
def test_get_default_quotas(self):
|
||||
# User can get the default quota set for it's tenant
|
||||
expected_quota_set = self.default_quota_set | set(['id'])
|
||||
|
@ -65,6 +67,7 @@ class QuotasTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertIn(quota, quota_set.keys())
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('cd65d997-f7e4-4966-a7e9-d5001b674fdc')
|
||||
def test_compare_tenant_quotas_with_default_quotas(self):
|
||||
# Tenants are created with the default quota values
|
||||
defualt_quota_set = \
|
||||
|
|
|
@ -24,6 +24,7 @@ class NetworksTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.os.tenant_networks_client
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('edfea98e-bbe3-4c7a-9739-87b986baff26')
|
||||
def test_list_show_tenant_networks(self):
|
||||
tenant_networks = self.client.list_tenant_networks()
|
||||
self.assertNotEmpty(tenant_networks, "No tenant networks found.")
|
||||
|
|
|
@ -84,6 +84,7 @@ class AttachVolumeTestJSON(base.BaseV2ComputeTest):
|
|||
|
||||
self.addCleanup(self._detach, self.server['id'], self.volume['id'])
|
||||
|
||||
@test.idempotent_id('52e9045a-e90d-4c0d-9087-79d657faffff')
|
||||
@testtools.skipUnless(CONF.compute.run_ssh, 'SSH required for this test')
|
||||
@test.attr(type='gate')
|
||||
def test_attach_detach_volume(self):
|
||||
|
@ -120,6 +121,7 @@ class AttachVolumeTestJSON(base.BaseV2ComputeTest):
|
|||
self.assertNotIn(self.device, partitions)
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('7fa563fe-f0f7-43eb-9e22-a1ece036b513')
|
||||
def test_list_get_volume_attachments(self):
|
||||
# Create Server, Volume and attach that Volume to Server
|
||||
self._create_and_attach()
|
||||
|
|
|
@ -39,6 +39,7 @@ class VolumesGetTestJSON(base.BaseV2ComputeTest):
|
|||
cls.client = cls.volumes_extensions_client
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('f10f25eb-9775-4d9d-9cbe-1cf54dae9d5f')
|
||||
def test_volume_create_get_delete(self):
|
||||
# CREATE, GET, DELETE Volume
|
||||
volume = None
|
||||
|
|
|
@ -84,6 +84,7 @@ class VolumesTestJSON(base.BaseV2ComputeTest):
|
|||
super(VolumesTestJSON, cls).resource_cleanup()
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('bc2dd1a0-15af-48e5-9990-f2e75a48325d')
|
||||
def test_volume_list(self):
|
||||
# Should return the list of Volumes
|
||||
# Fetch all Volumes
|
||||
|
@ -99,6 +100,7 @@ class VolumesTestJSON(base.BaseV2ComputeTest):
|
|||
for m_vol in missing_volumes))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('bad0567a-5a4f-420b-851e-780b55bb867c')
|
||||
def test_volume_list_with_details(self):
|
||||
# Should return the list of Volumes with details
|
||||
# Fetch all Volumes
|
||||
|
@ -114,6 +116,7 @@ class VolumesTestJSON(base.BaseV2ComputeTest):
|
|||
for m_vol in missing_volumes))
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('1048ed81-2baf-487a-b284-c0622b86e7b8')
|
||||
def test_volume_list_param_limit(self):
|
||||
# Return the list of volumes based on limit set
|
||||
params = {'limit': 2}
|
||||
|
@ -123,6 +126,7 @@ class VolumesTestJSON(base.BaseV2ComputeTest):
|
|||
"Failed to list volumes by limit set")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('33985568-4965-49d5-9bcc-0aa007ca5b7a')
|
||||
def test_volume_list_with_detail_param_limit(self):
|
||||
# Return the list of volumes with details based on limit set.
|
||||
params = {'limit': 2}
|
||||
|
@ -132,6 +136,7 @@ class VolumesTestJSON(base.BaseV2ComputeTest):
|
|||
"Failed to list volume details by limit set")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('51c22651-a074-4ea7-af0b-094f9331303e')
|
||||
def test_volume_list_param_offset_and_limit(self):
|
||||
# Return the list of volumes based on offset and limit set.
|
||||
# get all volumes list
|
||||
|
@ -149,6 +154,7 @@ class VolumesTestJSON(base.BaseV2ComputeTest):
|
|||
"Failed to list volumes by offset and limit")
|
||||
|
||||
@test.attr(type='gate')
|
||||
@test.idempotent_id('06b6abc4-3f10-48e9-a7a1-3facc98f03e5')
|
||||
def test_volume_list_with_detail_param_offset_and_limit(self):
|
||||
# Return the list of volumes details based on offset and limit set.
|
||||
# get all volumes list
|
||||
|
|
|
@ -40,6 +40,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
|
|||
cls.client = cls.volumes_extensions_client
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('c03ea686-905b-41a2-8748-9635154b7c57')
|
||||
def test_volume_get_nonexistent_volume_id(self):
|
||||
# Negative: Should not be able to get details of nonexistent volume
|
||||
# Creating a nonexistent volume id
|
||||
|
@ -48,6 +49,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
|
|||
str(uuid.uuid4()))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('54a34226-d910-4b00-9ef8-8683e6c55846')
|
||||
def test_volume_delete_nonexistent_volume_id(self):
|
||||
# Negative: Should not be able to delete nonexistent Volume
|
||||
# Creating nonexistent volume id
|
||||
|
@ -56,6 +58,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
|
|||
str(uuid.uuid4()))
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('5125ae14-152b-40a7-b3c5-eae15e9022ef')
|
||||
def test_create_volume_with_invalid_size(self):
|
||||
# Negative: Should not be able to create volume with invalid size
|
||||
# in request
|
||||
|
@ -65,6 +68,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
|
|||
size='#$%', display_name=v_name, metadata=metadata)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('131cb3a1-75cc-4d40-b4c3-1317f64719b0')
|
||||
def test_create_volume_with_out_passing_size(self):
|
||||
# Negative: Should not be able to create volume without passing size
|
||||
# in request
|
||||
|
@ -74,6 +78,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
|
|||
size='', display_name=v_name, metadata=metadata)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('8cce995e-0a83-479a-b94d-e1e40b8a09d1')
|
||||
def test_create_volume_with_size_zero(self):
|
||||
# Negative: Should not be able to create volume with size zero
|
||||
v_name = data_utils.rand_name('Volume-')
|
||||
|
@ -82,17 +87,20 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
|
|||
size='0', display_name=v_name, metadata=metadata)
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('f01904f2-e975-4915-98ce-cb5fa27bde4f')
|
||||
def test_get_invalid_volume_id(self):
|
||||
# Negative: Should not be able to get volume with invalid id
|
||||
self.assertRaises(lib_exc.NotFound,
|
||||
self.client.get_volume, '#$%%&^&^')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('62bab09a-4c03-4617-8cca-8572bc94af9b')
|
||||
def test_get_volume_without_passing_volume_id(self):
|
||||
# Negative: Should not be able to get volume when empty ID is passed
|
||||
self.assertRaises(lib_exc.NotFound, self.client.get_volume, '')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('62972737-124b-4513-b6cf-2f019f178494')
|
||||
def test_delete_invalid_volume_id(self):
|
||||
# Negative: Should not be able to delete volume when invalid ID is
|
||||
# passed
|
||||
|
@ -100,6 +108,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest):
|
|||
self.client.delete_volume, '!@#$%^&*()')
|
||||
|
||||
@test.attr(type=['negative', 'gate'])
|
||||
@test.idempotent_id('0d1417c5-4ae8-4c2c-adc5-5f0b864253e5')
|
||||
def test_delete_volume_without_passing_volume_id(self):
|
||||
# Negative: Should not be able to delete volume when empty ID is passed
|
||||
self.assertRaises(lib_exc.NotFound, self.client.delete_volume, '')
|
||||
|
|
|
@ -112,10 +112,12 @@ class ClusterTemplateTest(dp_base.BaseDataProcessingTest):
|
|||
return resp_body['id'], template_name
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('3525f1f1-3f9c-407d-891a-a996237e728b')
|
||||
def test_cluster_template_create(self):
|
||||
self._create_cluster_template()
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('7a161882-e430-4840-a1c6-1d928201fab2')
|
||||
def test_cluster_template_list(self):
|
||||
template_info = self._create_cluster_template()
|
||||
|
||||
|
@ -126,6 +128,7 @@ class ClusterTemplateTest(dp_base.BaseDataProcessingTest):
|
|||
self.assertIn(template_info, templates_info)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('2b75fe22-f731-4b0f-84f1-89ab25f86637')
|
||||
def test_cluster_template_get(self):
|
||||
template_id, template_name = self._create_cluster_template()
|
||||
|
||||
|
@ -135,6 +138,7 @@ class ClusterTemplateTest(dp_base.BaseDataProcessingTest):
|
|||
self.assertDictContainsSubset(self.cluster_template, template)
|
||||
|
||||
@test.attr(type='smoke')
|
||||
@test.idempotent_id('ff1fd989-171c-4dd7-91fd-9fbc71b09675')
|
||||
def test_cluster_template_delete(self):
|
||||
template_id, _ = self._create_cluster_template()
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue