Switch to use idempotent_id decorator from tempest.lib
Decorator idempotent_id() in tempest.test is deprecated and
tempest.lib.decorators.idempotent_id() should be used instead.
This patch switch all tempest tests to use new decorator.
Change-Id: I2df9c13fbb44b8807da6805761ad30bfd010dc55
diff --git a/neutron/tests/tempest/api/test_qos.py b/neutron/tests/tempest/api/test_qos.py
index 395bda0..4f03557 100644
--- a/neutron/tests/tempest/api/test_qos.py
+++ b/neutron/tests/tempest/api/test_qos.py
@@ -13,6 +13,7 @@
# under the License.
from tempest.lib.common.utils import data_utils
+from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@@ -28,7 +29,7 @@
def resource_setup(cls):
super(QosTestJSON, cls).resource_setup()
- @test.idempotent_id('108fbdf7-3463-4e47-9871-d07f3dcf5bbb')
+ @decorators.idempotent_id('108fbdf7-3463-4e47-9871-d07f3dcf5bbb')
def test_create_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy desc1',
@@ -46,7 +47,7 @@
policies_ids = [p['id'] for p in policies]
self.assertIn(policy['id'], policies_ids)
- @test.idempotent_id('606a48e2-5403-4052-b40f-4d54b855af76')
+ @decorators.idempotent_id('606a48e2-5403-4052-b40f-4d54b855af76')
@test.requires_ext(extension="project-id", service="network")
def test_show_policy_has_project_id(self):
policy = self.create_qos_policy(name='test-policy', shared=False)
@@ -59,7 +60,7 @@
self.assertEqual(self.admin_client.tenant_id,
show_policy['tenant_id'])
- @test.idempotent_id('f8d20e92-f06d-4805-b54f-230f77715815')
+ @decorators.idempotent_id('f8d20e92-f06d-4805-b54f-230f77715815')
def test_list_policy_filter_by_name(self):
self.create_qos_policy(name='test', description='test policy',
shared=False)
@@ -73,7 +74,7 @@
retrieved_policy = policies[0]
self.assertEqual('test', retrieved_policy['name'])
- @test.idempotent_id('8e88a54b-f0b2-4b7d-b061-a15d93c2c7d6')
+ @decorators.idempotent_id('8e88a54b-f0b2-4b7d-b061-a15d93c2c7d6')
def test_policy_update(self):
policy = self.create_qos_policy(name='test-policy',
description='',
@@ -88,7 +89,7 @@
self.assertTrue(retrieved_policy['shared'])
self.assertEqual([], retrieved_policy['rules'])
- @test.idempotent_id('6e880e0f-bbfc-4e54-87c6-680f90e1b618')
+ @decorators.idempotent_id('6e880e0f-bbfc-4e54-87c6-680f90e1b618')
def test_policy_update_forbidden_for_regular_tenants_own_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='',
@@ -99,7 +100,7 @@
self.client.update_qos_policy,
policy['id'], description='test policy')
- @test.idempotent_id('4ecfd7e7-47b6-4702-be38-be9235901a87')
+ @decorators.idempotent_id('4ecfd7e7-47b6-4702-be38-be9235901a87')
def test_policy_update_forbidden_for_regular_tenants_foreign_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='',
@@ -110,7 +111,7 @@
self.client.update_qos_policy,
policy['id'], description='test policy')
- @test.idempotent_id('ee263db4-009a-4641-83e5-d0e83506ba4c')
+ @decorators.idempotent_id('ee263db4-009a-4641-83e5-d0e83506ba4c')
def test_shared_policy_update(self):
policy = self.create_qos_policy(name='test-policy',
description='',
@@ -128,7 +129,7 @@
retrieved_policy = retrieved_policy['policy']
self.assertFalse(retrieved_policy['shared'])
- @test.idempotent_id('1cb42653-54bd-4a9a-b888-c55e18199201')
+ @decorators.idempotent_id('1cb42653-54bd-4a9a-b888-c55e18199201')
def test_delete_policy(self):
policy = self.admin_client.create_qos_policy(
'test-policy', 'desc', True)['policy']
@@ -141,11 +142,11 @@
self.assertRaises(exceptions.NotFound,
self.admin_client.show_qos_policy, policy['id'])
- @test.idempotent_id('cf776f77-8d3d-49f2-8572-12d6a1557224')
+ @decorators.idempotent_id('cf776f77-8d3d-49f2-8572-12d6a1557224')
def test_list_admin_rule_types(self):
self._test_list_rule_types(self.admin_client)
- @test.idempotent_id('49c8ea35-83a9-453a-bd23-239cf3b13929')
+ @decorators.idempotent_id('49c8ea35-83a9-453a-bd23-239cf3b13929')
def test_list_regular_rule_types(self):
self._test_list_rule_types(self.client)
@@ -180,7 +181,7 @@
updated_network = self.admin_client.show_network(network_id)
self.assertIsNone(updated_network['network']['qos_policy_id'])
- @test.idempotent_id('65b9ef75-1911-406a-bbdb-ca1d68d528b0')
+ @decorators.idempotent_id('65b9ef75-1911-406a-bbdb-ca1d68d528b0')
def test_policy_association_with_admin_network(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -194,7 +195,7 @@
self._disassociate_network(self.admin_client, network['id'])
- @test.idempotent_id('1738de5d-0476-4163-9022-5e1b548c208e')
+ @decorators.idempotent_id('1738de5d-0476-4163-9022-5e1b548c208e')
def test_policy_association_with_tenant_network(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -208,7 +209,7 @@
self._disassociate_network(self.client, network['id'])
- @test.idempotent_id('9efe63d0-836f-4cc2-b00c-468e63aa614e')
+ @decorators.idempotent_id('9efe63d0-836f-4cc2-b00c-468e63aa614e')
def test_policy_association_with_network_nonexistent_policy(self):
self.assertRaises(
exceptions.NotFound,
@@ -216,7 +217,7 @@
'test network',
qos_policy_id='9efe63d0-836f-4cc2-b00c-468e63aa614e')
- @test.idempotent_id('1aa55a79-324f-47d9-a076-894a8fc2448b')
+ @decorators.idempotent_id('1aa55a79-324f-47d9-a076-894a8fc2448b')
def test_policy_association_with_network_non_shared_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -226,7 +227,7 @@
self.create_network,
'test network', qos_policy_id=policy['id'])
- @test.idempotent_id('09a9392c-1359-4cbb-989f-fb768e5834a8')
+ @decorators.idempotent_id('09a9392c-1359-4cbb-989f-fb768e5834a8')
def test_policy_update_association_with_admin_network(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -248,7 +249,7 @@
updated_port = self.admin_client.show_port(port_id)
self.assertIsNone(updated_port['port']['qos_policy_id'])
- @test.idempotent_id('98fcd95e-84cf-4746-860e-44692e674f2e')
+ @decorators.idempotent_id('98fcd95e-84cf-4746-860e-44692e674f2e')
def test_policy_association_with_port_shared_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -262,7 +263,7 @@
self._disassociate_port(port['id'])
- @test.idempotent_id('49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
+ @decorators.idempotent_id('49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
def test_policy_association_with_port_nonexistent_policy(self):
network = self.create_shared_network('test network')
self.assertRaises(
@@ -271,7 +272,7 @@
network,
qos_policy_id='49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
- @test.idempotent_id('f53d961c-9fe5-4422-8b66-7add972c6031')
+ @decorators.idempotent_id('f53d961c-9fe5-4422-8b66-7add972c6031')
def test_policy_association_with_port_non_shared_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -282,7 +283,7 @@
self.create_port,
network, qos_policy_id=policy['id'])
- @test.idempotent_id('f8163237-fba9-4db5-9526-bad6d2343c76')
+ @decorators.idempotent_id('f8163237-fba9-4db5-9526-bad6d2343c76')
def test_policy_update_association_with_port_shared_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -299,7 +300,7 @@
self._disassociate_port(port['id'])
- @test.idempotent_id('18163237-8ba9-4db5-9525-bad6d2343c75')
+ @decorators.idempotent_id('18163237-8ba9-4db5-9525-bad6d2343c75')
def test_delete_not_allowed_if_policy_in_use_by_network(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -313,7 +314,7 @@
self._disassociate_network(self.admin_client, network['id'])
self.admin_client.delete_qos_policy(policy['id'])
- @test.idempotent_id('24153230-84a9-4dd5-9525-bad6d2343c75')
+ @decorators.idempotent_id('24153230-84a9-4dd5-9525-bad6d2343c75')
def test_delete_not_allowed_if_policy_in_use_by_port(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -327,7 +328,7 @@
self._disassociate_port(port['id'])
self.admin_client.delete_qos_policy(policy['id'])
- @test.idempotent_id('a2a5849b-dd06-4b18-9664-0b6828a1fc27')
+ @decorators.idempotent_id('a2a5849b-dd06-4b18-9664-0b6828a1fc27')
def test_qos_policy_delete_with_rules(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -340,7 +341,7 @@
with testtools.ExpectedException(exceptions.NotFound):
self.admin_client.show_qos_policy(policy['id'])
- @test.idempotent_id('fb384bde-a973-41c3-a542-6f77a092155f')
+ @decorators.idempotent_id('fb384bde-a973-41c3-a542-6f77a092155f')
def test_get_policy_that_is_shared(self):
policy = self.create_qos_policy(
name='test-policy-shared',
@@ -350,7 +351,7 @@
obtained_policy = self.client.show_qos_policy(policy['id'])['policy']
self.assertEqual(obtained_policy, policy)
- @test.idempotent_id('aed8e2a6-22da-421b-89b9-935a2c1a1b50')
+ @decorators.idempotent_id('aed8e2a6-22da-421b-89b9-935a2c1a1b50')
def test_policy_create_forbidden_for_regular_tenants(self):
self.assertRaises(
exceptions.Forbidden,
@@ -365,7 +366,7 @@
def resource_setup(cls):
super(QosBandwidthLimitRuleTestJSON, cls).resource_setup()
- @test.idempotent_id('8a59b00b-3e9c-4787-92f8-93a5cdf5e378')
+ @decorators.idempotent_id('8a59b00b-3e9c-4787-92f8-93a5cdf5e378')
def test_rule_create(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -396,7 +397,7 @@
self.assertEqual(qos_consts.RULE_TYPE_BANDWIDTH_LIMIT,
policy_rules[0]['type'])
- @test.idempotent_id('8a59b00b-ab01-4787-92f8-93a5cdf5e378')
+ @decorators.idempotent_id('8a59b00b-ab01-4787-92f8-93a5cdf5e378')
def test_rule_create_fail_for_the_same_type(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -410,7 +411,7 @@
policy_id=policy['id'],
max_kbps=201, max_burst_kbps=1338)
- @test.idempotent_id('149a6988-2568-47d2-931e-2dbc858943b3')
+ @decorators.idempotent_id('149a6988-2568-47d2-931e-2dbc858943b3')
def test_rule_update(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -430,7 +431,7 @@
self.assertEqual(200, retrieved_policy['max_kbps'])
self.assertEqual(1337, retrieved_policy['max_burst_kbps'])
- @test.idempotent_id('67ee6efd-7b33-4a68-927d-275b4f8ba958')
+ @decorators.idempotent_id('67ee6efd-7b33-4a68-927d-275b4f8ba958')
def test_rule_delete(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -448,21 +449,21 @@
self.admin_client.show_bandwidth_limit_rule,
policy['id'], rule['id'])
- @test.idempotent_id('f211222c-5808-46cb-a961-983bbab6b852')
+ @decorators.idempotent_id('f211222c-5808-46cb-a961-983bbab6b852')
def test_rule_create_rule_nonexistent_policy(self):
self.assertRaises(
exceptions.NotFound,
self.create_qos_bandwidth_limit_rule,
'policy', 200, 1337)
- @test.idempotent_id('a4a2e7ad-786f-4927-a85a-e545a93bd274')
+ @decorators.idempotent_id('a4a2e7ad-786f-4927-a85a-e545a93bd274')
def test_rule_create_forbidden_for_regular_tenants(self):
self.assertRaises(
exceptions.Forbidden,
self.client.create_bandwidth_limit_rule,
'policy', 1, 2)
- @test.idempotent_id('1bfc55d9-6fd8-4293-ab3a-b1d69bf7cd2e')
+ @decorators.idempotent_id('1bfc55d9-6fd8-4293-ab3a-b1d69bf7cd2e')
def test_rule_update_forbidden_for_regular_tenants_own_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -476,7 +477,7 @@
self.client.update_bandwidth_limit_rule,
policy['id'], rule['id'], max_kbps=2, max_burst_kbps=4)
- @test.idempotent_id('9a607936-4b6f-4c2f-ad21-bd5b3d4fc91f')
+ @decorators.idempotent_id('9a607936-4b6f-4c2f-ad21-bd5b3d4fc91f')
def test_rule_update_forbidden_for_regular_tenants_foreign_policy(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -490,7 +491,7 @@
self.client.update_bandwidth_limit_rule,
policy['id'], rule['id'], max_kbps=2, max_burst_kbps=4)
- @test.idempotent_id('ce0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
+ @decorators.idempotent_id('ce0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
def test_get_rules_by_policy(self):
policy1 = self.create_qos_policy(name='test-policy1',
description='test policy1',
@@ -555,7 +556,7 @@
return net
- @test.idempotent_id('b9dcf582-d3b3-11e5-950a-54ee756c66df')
+ @decorators.idempotent_id('b9dcf582-d3b3-11e5-950a-54ee756c66df')
def test_policy_sharing_with_wildcard(self):
qos_pol = self.create_qos_policy(
name=data_utils.rand_name('test-policy'),
@@ -607,21 +608,21 @@
return rbac_for_client_tenant, rbac_wildcard
- @test.idempotent_id('328b1f70-d424-11e5-a57f-54ee756c66df')
+ @decorators.idempotent_id('328b1f70-d424-11e5-a57f-54ee756c66df')
def test_net_bound_shared_policy_wildcard_and_tenant_id_wild_remove(self):
client_rbac, wildcard_rbac = self._create_net_bound_qos_rbacs()
# globally unshare the qos-policy, the specific share should remain
self.admin_client.delete_rbac_policy(wildcard_rbac['id'])
self.client.list_rbac_policies(id=client_rbac['id'])
- @test.idempotent_id('1997b00c-0c75-4e43-8ce2-999f9fa555ee')
+ @decorators.idempotent_id('1997b00c-0c75-4e43-8ce2-999f9fa555ee')
def test_net_bound_shared_policy_wildcard_and_tenant_id_wild_remains(self):
client_rbac, wildcard_rbac = self._create_net_bound_qos_rbacs()
# remove client_rbac policy the wildcard share should remain
self.admin_client.delete_rbac_policy(client_rbac['id'])
self.client.list_rbac_policies(id=wildcard_rbac['id'])
- @test.idempotent_id('2ace9adc-da6e-11e5-aafe-54ee756c66df')
+ @decorators.idempotent_id('2ace9adc-da6e-11e5-aafe-54ee756c66df')
def test_policy_sharing_with_wildcard_and_tenant_id(self):
res = self._make_admin_policy_shared_to_tenant_id(
self.client.tenant_id)
@@ -644,7 +645,7 @@
self.assertIn(rbac,
self.admin_client.list_rbac_policies()['rbac_policies'])
- @test.idempotent_id('9f85c76a-a350-11e5-8ae5-54ee756c66df')
+ @decorators.idempotent_id('9f85c76a-a350-11e5-8ae5-54ee756c66df')
def test_policy_target_update(self):
res = self._make_admin_policy_shared_to_tenant_id(
self.client.tenant_id)
@@ -658,7 +659,7 @@
update_res['rbac_policy'].pop('target_tenant')
self.assertEqual(res['rbac_policy'], update_res['rbac_policy'])
- @test.idempotent_id('a9b39f46-a350-11e5-97c7-54ee756c66df')
+ @decorators.idempotent_id('a9b39f46-a350-11e5-97c7-54ee756c66df')
def test_network_presence_prevents_policy_rbac_policy_deletion(self):
res = self._make_admin_policy_shared_to_tenant_id(
self.client2.tenant_id)
@@ -686,7 +687,7 @@
self.admin_client.update_rbac_policy(
wild['id'], target_tenant=self.client2.tenant_id)
- @test.idempotent_id('b0fe87e8-a350-11e5-9f08-54ee756c66df')
+ @decorators.idempotent_id('b0fe87e8-a350-11e5-9f08-54ee756c66df')
def test_regular_client_shares_to_another_regular_client(self):
# owned by self.admin_client
policy = self._create_qos_policy()
@@ -705,7 +706,7 @@
self.assertNotIn(rbac_policy['id'], [p['id'] for p in
self.client2.list_rbac_policies()['rbac_policies']])
- @test.idempotent_id('ba88d0ca-a350-11e5-a06f-54ee756c66df')
+ @decorators.idempotent_id('ba88d0ca-a350-11e5-a06f-54ee756c66df')
def test_filter_fields(self):
policy = self._create_qos_policy()
self.admin_client.create_rbac_policy(
@@ -717,7 +718,7 @@
res = self.admin_client.list_rbac_policies(fields=fields)
self.assertEqual(set(fields), set(res['rbac_policies'][0].keys()))
- @test.idempotent_id('c10d993a-a350-11e5-9c7a-54ee756c66df')
+ @decorators.idempotent_id('c10d993a-a350-11e5-9c7a-54ee756c66df')
def test_rbac_policy_show(self):
res = self._make_admin_policy_shared_to_tenant_id(
self.client.tenant_id)
@@ -732,7 +733,7 @@
self.assertEqual(
p2, self.admin_client.show_rbac_policy(p2['id'])['rbac_policy'])
- @test.idempotent_id('c7496f86-a350-11e5-b380-54ee756c66df')
+ @decorators.idempotent_id('c7496f86-a350-11e5-b380-54ee756c66df')
def test_filter_rbac_policies(self):
policy = self._create_qos_policy()
rbac_pol1 = self.admin_client.create_rbac_policy(
@@ -752,7 +753,7 @@
self.assertEqual(rbac_pol1['id'], res1[0]['id'])
self.assertEqual(rbac_pol2['id'], res2[0]['id'])
- @test.idempotent_id('cd7d755a-a350-11e5-a344-54ee756c66df')
+ @decorators.idempotent_id('cd7d755a-a350-11e5-a344-54ee756c66df')
def test_regular_client_blocked_from_sharing_anothers_policy(self):
qos_policy = self._make_admin_policy_shared_to_tenant_id(
self.client.tenant_id)['policy']
@@ -777,7 +778,7 @@
def resource_setup(cls):
super(QosDscpMarkingRuleTestJSON, cls).resource_setup()
- @test.idempotent_id('f5cbaceb-5829-497c-9c60-ad70969e9a08')
+ @decorators.idempotent_id('f5cbaceb-5829-497c-9c60-ad70969e9a08')
def test_rule_create(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -806,7 +807,7 @@
self.assertEqual(qos_consts.RULE_TYPE_DSCP_MARKING,
policy_rules[0]['type'])
- @test.idempotent_id('08553ffe-030f-4037-b486-7e0b8fb9385a')
+ @decorators.idempotent_id('08553ffe-030f-4037-b486-7e0b8fb9385a')
def test_rule_create_fail_for_the_same_type(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -819,7 +820,7 @@
policy_id=policy['id'],
dscp_mark=self.VALID_DSCP_MARK2)
- @test.idempotent_id('76f632e5-3175-4408-9a32-3625e599c8a2')
+ @decorators.idempotent_id('76f632e5-3175-4408-9a32-3625e599c8a2')
def test_rule_update(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -835,7 +836,7 @@
retrieved_policy = retrieved_policy['dscp_marking_rule']
self.assertEqual(self.VALID_DSCP_MARK2, retrieved_policy['dscp_mark'])
- @test.idempotent_id('74f81904-c35f-48a3-adae-1f5424cb3c18')
+ @decorators.idempotent_id('74f81904-c35f-48a3-adae-1f5424cb3c18')
def test_rule_delete(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -853,21 +854,21 @@
self.admin_client.show_dscp_marking_rule,
policy['id'], rule['id'])
- @test.idempotent_id('9cb8ef5c-96fc-4978-9ee0-e3b02bab628a')
+ @decorators.idempotent_id('9cb8ef5c-96fc-4978-9ee0-e3b02bab628a')
def test_rule_create_rule_nonexistent_policy(self):
self.assertRaises(
exceptions.NotFound,
self.admin_client.create_dscp_marking_rule,
'policy', self.VALID_DSCP_MARK1)
- @test.idempotent_id('bf6002ea-29de-486f-b65d-08aea6d4c4e2')
+ @decorators.idempotent_id('bf6002ea-29de-486f-b65d-08aea6d4c4e2')
def test_rule_create_forbidden_for_regular_tenants(self):
self.assertRaises(
exceptions.Forbidden,
self.client.create_dscp_marking_rule,
'policy', self.VALID_DSCP_MARK1)
- @test.idempotent_id('33646b08-4f05-4493-a48a-bde768a18533')
+ @decorators.idempotent_id('33646b08-4f05-4493-a48a-bde768a18533')
def test_invalid_rule_create(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -877,7 +878,7 @@
self.admin_client.create_dscp_marking_rule,
policy['id'], 58)
- @test.idempotent_id('c565131d-4c80-4231-b0f3-9ae2be4de129')
+ @decorators.idempotent_id('c565131d-4c80-4231-b0f3-9ae2be4de129')
def test_get_rules_by_policy(self):
policy1 = self.create_qos_policy(name='test-policy1',
description='test policy1',
@@ -911,7 +912,7 @@
def resource_setup(cls):
super(QosMinimumBandwidthRuleTestJSON, cls).resource_setup()
- @test.idempotent_id('aa59b00b-3e9c-4787-92f8-93a5cdf5e378')
+ @decorators.idempotent_id('aa59b00b-3e9c-4787-92f8-93a5cdf5e378')
def test_rule_create(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -943,7 +944,7 @@
self.assertEqual(qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH,
policy_rules[0]['type'])
- @test.idempotent_id('266d9b87-e51c-48bd-9aa7-8269573621be')
+ @decorators.idempotent_id('266d9b87-e51c-48bd-9aa7-8269573621be')
def test_rule_create_fail_for_missing_min_kbps(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -953,7 +954,7 @@
policy_id=policy['id'],
direction=self.DIRECTION_EGRESS)
- @test.idempotent_id('aa59b00b-ab01-4787-92f8-93a5cdf5e378')
+ @decorators.idempotent_id('aa59b00b-ab01-4787-92f8-93a5cdf5e378')
def test_rule_create_fail_for_the_same_type(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -967,7 +968,7 @@
policy_id=policy['id'],
direction=self.DIRECTION_EGRESS, min_kbps=201)
- @test.idempotent_id('d6fce764-e511-4fa6-9f86-f4b41cf142cf')
+ @decorators.idempotent_id('d6fce764-e511-4fa6-9f86-f4b41cf142cf')
def test_rule_create_fail_for_direction_ingress(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -978,7 +979,7 @@
direction=self.DIRECTION_INGRESS,
min_kbps=201)
- @test.idempotent_id('a49a6988-2568-47d2-931e-2dbc858943b3')
+ @decorators.idempotent_id('a49a6988-2568-47d2-931e-2dbc858943b3')
def test_rule_update(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -997,7 +998,7 @@
self.assertEqual(350, retrieved_policy['min_kbps'])
self.assertEqual(self.DIRECTION_EGRESS, retrieved_policy['direction'])
- @test.idempotent_id('a7ee6efd-7b33-4a68-927d-275b4f8ba958')
+ @decorators.idempotent_id('a7ee6efd-7b33-4a68-927d-275b4f8ba958')
def test_rule_delete(self):
policy = self.create_qos_policy(name='test-policy',
description='test policy',
@@ -1016,21 +1017,21 @@
self.admin_client.show_minimum_bandwidth_rule,
policy['id'], rule['id'])
- @test.idempotent_id('a211222c-5808-46cb-a961-983bbab6b852')
+ @decorators.idempotent_id('a211222c-5808-46cb-a961-983bbab6b852')
def test_rule_create_rule_nonexistent_policy(self):
self.assertRaises(
exceptions.NotFound,
self.admin_client.create_minimum_bandwidth_rule,
'policy', self.DIRECTION_EGRESS, min_kbps=200)
- @test.idempotent_id('b4a2e7ad-786f-4927-a85a-e545a93bd274')
+ @decorators.idempotent_id('b4a2e7ad-786f-4927-a85a-e545a93bd274')
def test_rule_create_forbidden_for_regular_tenants(self):
self.assertRaises(
exceptions.Forbidden,
self.client.create_minimum_bandwidth_rule,
'policy', self.DIRECTION_EGRESS, min_kbps=300)
- @test.idempotent_id('de0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
+ @decorators.idempotent_id('de0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
def test_get_rules_by_policy(self):
policy1 = self.create_qos_policy(name='test-policy1',
description='test policy1',
@@ -1074,38 +1075,38 @@
cls.create_qos_policy(
name=name, description='search-criteria-test')
- @test.idempotent_id('55fc0103-fdc1-4d34-ab62-c579bb739a91')
+ @decorators.idempotent_id('55fc0103-fdc1-4d34-ab62-c579bb739a91')
def test_list_sorts_asc(self):
self._test_list_sorts_asc()
- @test.idempotent_id('13e08ac3-bfed-426b-892a-b3b158560c23')
+ @decorators.idempotent_id('13e08ac3-bfed-426b-892a-b3b158560c23')
def test_list_sorts_desc(self):
self._test_list_sorts_desc()
- @test.idempotent_id('719e61cc-e33c-4918-aa4d-1a791e6e0e86')
+ @decorators.idempotent_id('719e61cc-e33c-4918-aa4d-1a791e6e0e86')
def test_list_pagination(self):
self._test_list_pagination()
- @test.idempotent_id('3bd8fb58-c0f8-4954-87fb-f286e1eb096a')
+ @decorators.idempotent_id('3bd8fb58-c0f8-4954-87fb-f286e1eb096a')
def test_list_pagination_with_marker(self):
self._test_list_pagination_with_marker()
- @test.idempotent_id('3bad0747-8082-46e9-be4d-c428a842db41')
+ @decorators.idempotent_id('3bad0747-8082-46e9-be4d-c428a842db41')
def test_list_pagination_with_href_links(self):
self._test_list_pagination_with_href_links()
- @test.idempotent_id('d6a8bacd-d5e8-4ef3-bc55-23ca6998d208')
+ @decorators.idempotent_id('d6a8bacd-d5e8-4ef3-bc55-23ca6998d208')
def test_list_pagination_page_reverse_asc(self):
self._test_list_pagination_page_reverse_asc()
- @test.idempotent_id('0b9aecdc-2b27-421b-b104-53d24e905ae8')
+ @decorators.idempotent_id('0b9aecdc-2b27-421b-b104-53d24e905ae8')
def test_list_pagination_page_reverse_desc(self):
self._test_list_pagination_page_reverse_desc()
- @test.idempotent_id('1a3dc257-dafd-4870-8c71-639ae7ddc6ea')
+ @decorators.idempotent_id('1a3dc257-dafd-4870-8c71-639ae7ddc6ea')
def test_list_pagination_page_reverse_with_href_links(self):
self._test_list_pagination_page_reverse_with_href_links()
- @test.idempotent_id('40e09b53-4eb8-4526-9181-d438c8005a20')
+ @decorators.idempotent_id('40e09b53-4eb8-4526-9181-d438c8005a20')
def test_list_no_pagination_limit_0(self):
self._test_list_no_pagination_limit_0()