Tempest: Moving from test.idempotent_id to decorators.idempotent_id

- Decorator idempotent_id() in tempest.test is deprecated and
tempest.lib.decorators.idempotent_id() should be used instead.
This patch will move all the tests on new decorator.

- Removed deprecated tempest-lib from test-requirements.txt

Change-Id: I0c007de3137b1236dc0977dc6d13ae22583dc811
This commit is contained in:
Devang Doshi 2017-03-02 00:26:28 -08:00 committed by Adit Sarfaty
parent a93abf957d
commit 5b65a7e652
64 changed files with 630 additions and 589 deletions

View File

@ -21,7 +21,6 @@ testtools>=1.4.0 # MIT
testscenarios>=0.4 # Apache-2.0/BSD
WebTest>=2.0 # MIT
# This is needed for subunit-trace
tempest-lib>=0.14.0 # Apache-2.0
reno>=1.8.0 # Apache-2.0
bandit>=1.1.0 # Apache-2.0
tempest>=14.0.0 # Apache-2.0

View File

@ -113,7 +113,7 @@ class NetworkTagAddTest(BaseTagsTest):
super(NetworkTagAddTest, cls).resource_setup()
cls.net = cls.create_network()
@test.idempotent_id('0e37a579-aff3-47ba-9f1f-3ac4482fce16')
@decorators.idempotent_id('0e37a579-aff3-47ba-9f1f-3ac4482fce16')
def test_add_tags(self):
"""neutron tag-add operations."""
tags = ['a', 'gold', 'T' * MAX_TAG_LEN]
@ -125,7 +125,7 @@ class NetworkTagAddTest(BaseTagsTest):
for tag in tags:
self.assertIn(tag, network['tags'])
@test.idempotent_id('eb52eac3-5e79-4183-803a-a3d97ceb171d')
@decorators.idempotent_id('eb52eac3-5e79-4183-803a-a3d97ceb171d')
@test.attr(type='negative')
def test_add_tag_one_char_too_long(self):
tag_too_long = 'a' * (MAX_TAG_LEN + 1)
@ -134,7 +134,7 @@ class NetworkTagAddTest(BaseTagsTest):
self.network_add_tag,
network_id, tag_too_long)
@test.idempotent_id('d08f3fbe-dc6f-4f3c-b9b2-4d9957884edf')
@decorators.idempotent_id('d08f3fbe-dc6f-4f3c-b9b2-4d9957884edf')
@test.attr(type='negative')
def test_add_tag_empty_one(self):
network_id = self.net.get('id')
@ -152,7 +152,7 @@ class NetworkTagRemoveTest(BaseTagsTest):
super(NetworkTagRemoveTest, cls).resource_setup()
cls.net = cls.create_network()
@test.idempotent_id('178fbd96-900f-4c3d-8cd1-5525f4cf2b81')
@decorators.idempotent_id('178fbd96-900f-4c3d-8cd1-5525f4cf2b81')
def test_remove_tags(self):
"""neutron tag-remove operations."""
network_id = self.net.get('id')
@ -160,7 +160,7 @@ class NetworkTagRemoveTest(BaseTagsTest):
self.network_add_tag(network_id, tag)
self.network_remove_tag(network_id, tag)
@test.idempotent_id('1fe5a8b2-ff5d-4250-b930-21b1a3b48055')
@decorators.idempotent_id('1fe5a8b2-ff5d-4250-b930-21b1a3b48055')
@test.attr(type='negative')
def test_remove_all_tags(self):
network_id = self.net.get('id')
@ -171,7 +171,7 @@ class NetworkTagRemoveTest(BaseTagsTest):
network = self.networks_client.show_network(network_id)['network']
self.assertEqual(len(network['tags']), 0)
@test.idempotent_id('591337b0-a2e6-4d72-984c-e5b6a6ec12d2')
@decorators.idempotent_id('591337b0-a2e6-4d72-984c-e5b6a6ec12d2')
@test.attr(type='negative')
def test_remove_not_exist_tag(self):
"""neutron tag-remove operations."""
@ -191,7 +191,7 @@ class NetworkTagReplaceTest(BaseTagsTest):
super(NetworkTagReplaceTest, cls).resource_setup()
cls.net = cls.create_network()
@test.idempotent_id('7d4fb288-2f2d-4f47-84af-be3175b057b5')
@decorators.idempotent_id('7d4fb288-2f2d-4f47-84af-be3175b057b5')
def test_replace_tags(self):
"""neutron tag-replace operations."""
network_id = self.net.get('id')
@ -203,7 +203,7 @@ class NetworkTagReplaceTest(BaseTagsTest):
empty_tags = []
self.network_replace_tags(network_id, empty_tags)
@test.idempotent_id('20a05e9e-0b25-4085-b89f-fd5f0c57d2fa')
@decorators.idempotent_id('20a05e9e-0b25-4085-b89f-fd5f0c57d2fa')
@test.attr(type='negative')
def test_replace_tags_one_char_too_long(self):
tags_too_long = ['aaa', 'z' * (MAX_TAG_LEN + 1)]
@ -259,7 +259,7 @@ class NetworkTagFilterTest(BaseTagsTest):
for net in matched_nets:
self.assertIn(net['id'], m_net_list)
@test.idempotent_id('9646af99-7e04-4724-ac54-4a938de764f1')
@decorators.idempotent_id('9646af99-7e04-4724-ac54-4a938de764f1')
def test_tags_only_one_network(self):
"""each tag in self.a_b_c only tag one network."""
for tag in self.a_b_c:
@ -268,7 +268,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.assertEqual(len(nets), 1)
@test.idempotent_id('5632b745-651a-444f-922d-6434e060991a')
@decorators.idempotent_id('5632b745-651a-444f-922d-6434e060991a')
def test_tags_any_only_one_network(self):
"""each tag in self.a_b_c only tag one network."""
for tag in self.a_b_c:
@ -277,7 +277,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.assertEqual(len(nets), 1)
@test.idempotent_id('a0d8c21b-1ec0-4c6d-b5d8-72baebabde26')
@decorators.idempotent_id('a0d8c21b-1ec0-4c6d-b5d8-72baebabde26')
def test_tags_not_tagged(self):
"""search with tags for tags not being tagged."""
for tag in self.not_tagged_tags:
@ -286,7 +286,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.assertEqual(len(nets), 0)
@test.idempotent_id('1049eac1-028b-4664-aeb7-c7656240622d')
@decorators.idempotent_id('1049eac1-028b-4664-aeb7-c7656240622d')
def test_tags_any_not_tagged(self):
"""search with tags-any for tags not being tagged."""
for tag in self.not_tagged_tags:
@ -295,7 +295,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.assertEqual(len(nets), 0)
@test.idempotent_id('a9b42503-5dd1-490d-b0c6-673951cc86a1')
@decorators.idempotent_id('a9b42503-5dd1-490d-b0c6-673951cc86a1')
def test_tags(self):
"""find networks having tags (and operation)"""
tags = ['gold', 'production']
@ -305,7 +305,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.check_matched_search_list(nets, m_net_list, 'tags')
@test.idempotent_id('c38e788d-749e-401a-8bbb-26e36a7b573f')
@decorators.idempotent_id('c38e788d-749e-401a-8bbb-26e36a7b573f')
def test_tags_any(self):
"""find networks having tags-any (or operation)"""
tags = ['gold', 'production']
@ -315,7 +315,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.check_matched_search_list(nets, m_net_list, 'tags-any')
@test.idempotent_id('e7bb1cea-3271-418c-bfe2-038fff6187e6')
@decorators.idempotent_id('e7bb1cea-3271-418c-bfe2-038fff6187e6')
def test_not_tags(self):
"""find networks not having not-tags (and operation)"""
tags = ['gold', 'production']
@ -325,7 +325,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.check_matched_search_list(nets, m_net_list, 'not-tags')
@test.idempotent_id('c36a1d00-c131-4297-86c1-a3fc06c61629')
@decorators.idempotent_id('c36a1d00-c131-4297-86c1-a3fc06c61629')
def test_not_tags_any(self):
"""find networks not having not-tags-any (or operation)"""
tags = ['gold', 'production']
@ -335,7 +335,7 @@ class NetworkTagFilterTest(BaseTagsTest):
nets = self.list_networks(**filters)
self.check_matched_search_list(nets, m_net_list, 'not-tags-any')
@test.idempotent_id('4345e944-6b2b-4106-a208-ce07cefe764f')
@decorators.idempotent_id('4345e944-6b2b-4106-a208-ce07cefe764f')
def test_tags_any_not_tags(self):
"""find networks having tags-any and not-tags."""
tags = ['gold', 'production']
@ -348,7 +348,7 @@ class NetworkTagFilterTest(BaseTagsTest):
self.check_matched_search_list(nets, m_net_list,
'tags-any & not-tags')
@test.idempotent_id('0d635ba7-5c94-4a24-b7a8-d3b413d1ec83')
@decorators.idempotent_id('0d635ba7-5c94-4a24-b7a8-d3b413d1ec83')
@decorators.skip_because(bug="1611054")
def test_tags_tags_any(self):
"""finding networks using tags and tags-any."""
@ -362,7 +362,7 @@ class NetworkTagFilterTest(BaseTagsTest):
self.check_matched_search_list(nets, m_net_list,
'tags & tags-any')
@test.idempotent_id('2067a8fc-2d7b-4085-a6c2-7e454f6f26f3')
@decorators.idempotent_id('2067a8fc-2d7b-4085-a6c2-7e454f6f26f3')
def test_tags_not_tags_any(self):
"""finding networks using tags and not-tags-any."""
tags = ['gold', 'production']
@ -375,7 +375,7 @@ class NetworkTagFilterTest(BaseTagsTest):
self.check_matched_search_list(nets, m_net_list,
'tags & not-tags-any')
@test.idempotent_id('f2bbf51c-e32e-4664-a0db-59eed493c3d1')
@decorators.idempotent_id('f2bbf51c-e32e-4664-a0db-59eed493c3d1')
def test_tags_not_tags_any2(self):
"""finding networks using tags and not-tags-any."""
tags = ['gold', 'production']
@ -388,7 +388,7 @@ class NetworkTagFilterTest(BaseTagsTest):
self.check_matched_search_list(nets, m_net_list,
'tags & not-tags-any2')
@test.idempotent_id('7b17dfa8-f7ac-47c2-b814-35c5ed1c325b')
@decorators.idempotent_id('7b17dfa8-f7ac-47c2-b814-35c5ed1c325b')
def test_tags_not_tags(self):
"""finding networks using tags and not-tags."""
tags = ['gold', 'production']
@ -401,7 +401,7 @@ class NetworkTagFilterTest(BaseTagsTest):
self.check_matched_search_list(nets, m_net_list,
'tags & not-tags')
@test.idempotent_id('f723f717-660b-4d8e-ae9f-014f0a3f812d')
@decorators.idempotent_id('f723f717-660b-4d8e-ae9f-014f0a3f812d')
def test_tags_not_tags_itself(self):
""""tags and not-tags itself is always an empty set."""
tags = ['gold', 'production']

View File

@ -18,6 +18,7 @@ import testtools
from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -180,7 +181,7 @@ class QosPolicyTest(BaseQosTest):
test qos policies and network/port association and disassociation.
"""
@test.idempotent_id('108fbdf7-3463-4e47-9871-d07f3dcf5bbb')
@decorators.idempotent_id('108fbdf7-3463-4e47-9871-d07f3dcf5bbb')
def test_create_policy(self):
"""qos-policy-create: create policy."""
policy = self.create_qos_policy(name='test-policy',
@ -199,7 +200,7 @@ class QosPolicyTest(BaseQosTest):
policies_ids = [p['id'] for p in policies]
self.assertIn(policy['id'], policies_ids)
@test.idempotent_id('f8d20e92-f06d-4805-b54f-230f77715815')
@decorators.idempotent_id('f8d20e92-f06d-4805-b54f-230f77715815')
def test_list_policy_filter_by_name(self):
"""qos-policy-list --name=<name>: list policies."""
name1 = data_utils.rand_name('test-policy')
@ -215,7 +216,7 @@ class QosPolicyTest(BaseQosTest):
retrieved_policy = policies[0]
self.assertEqual(name1, retrieved_policy['name'])
@test.idempotent_id('8e88a54b-f0b2-4b7d-b061-a15d93c2c7d6')
@decorators.idempotent_id('8e88a54b-f0b2-4b7d-b061-a15d93c2c7d6')
def test_policy_update(self):
"""qos-policy-update POLICY_ID."""
policy = self.create_qos_policy(name='test-policy',
@ -231,7 +232,7 @@ class QosPolicyTest(BaseQosTest):
self.assertTrue(retrieved_policy['shared'])
self.assertEqual([], retrieved_policy['rules'])
@test.idempotent_id('1cb42653-54bd-4a9a-b888-c55e18199201')
@decorators.idempotent_id('1cb42653-54bd-4a9a-b888-c55e18199201')
def test_delete_policy(self):
"""qos-policy-delete POLICY_ID."""
policy = self.create_qos_policy(
@ -244,12 +245,12 @@ class QosPolicyTest(BaseQosTest):
self.assertRaises(exceptions.NotFound,
self.adm_qos_client.show_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):
"""qos-available-rule-types: available rule type from admin view."""
self._test_list_rule_types(self.adm_qos_client)
@test.idempotent_id('49c8ea35-83a9-453a-bd23-239cf3b13929')
@decorators.idempotent_id('49c8ea35-83a9-453a-bd23-239cf3b13929')
def _test_list_regular_rule_types(self):
"""qos-available-rule-types: available rule type from project view."""
self._test_list_rule_types(self.pri_qos_client)
@ -287,7 +288,7 @@ class QosPolicyTest(BaseQosTest):
client_mgr=client_mgr)
self.assertIsNone(updated_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):
"""admin can create network with non-shared policy."""
policy = self.create_qos_policy(name='test-policy',
@ -302,7 +303,7 @@ class QosPolicyTest(BaseQosTest):
self._disassociate_network(network['id'], self.admin_mgr)
@test.idempotent_id('1738de5d-0476-4163-9022-5e1b548c208e')
@decorators.idempotent_id('1738de5d-0476-4163-9022-5e1b548c208e')
def test_policy_association_with_tenant_network(self):
"""project/tenant can create network with shared policy."""
policy = self.create_qos_policy(name='test-policy',
@ -320,7 +321,7 @@ class QosPolicyTest(BaseQosTest):
self._disassociate_network(network['id'], self.primary_mgr)
@test.attr(type='negative')
@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):
"""Can not create network with nonexist policy."""
self.assertRaises(
@ -330,7 +331,7 @@ class QosPolicyTest(BaseQosTest):
qos_policy_id='9efe63d0-836f-4cc2-b00c-468e63aa614e')
@test.attr(type='negative')
@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):
"""tenant/project can not create network with not-shared policy."""
policy = self.create_qos_policy(name='test-policy',
@ -342,7 +343,7 @@ class QosPolicyTest(BaseQosTest):
'test network', qos_policy_id=policy['id'],
client_mgr=self.primary_mgr)
@test.idempotent_id('10a9392c-1359-4cbb-989f-fb768e5834a8')
@decorators.idempotent_id('10a9392c-1359-4cbb-989f-fb768e5834a8')
def test_policy_update_association_with_admin_network(self):
"""admin can create associate non-shared policy to network."""
policy = self.create_qos_policy(name='test-policy',
@ -367,7 +368,7 @@ class QosPolicyTest(BaseQosTest):
updated_port = self.show_port(port_id, client_mgr=client_mgr)
self.assertIsNone(updated_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):
"""test port can associate shared policy."""
policy = self.create_qos_policy(name='test-policy',
@ -385,7 +386,7 @@ class QosPolicyTest(BaseQosTest):
self._disassociate_port(port['id'], client_mgr=self.primary_mgr)
@test.attr(type='negative')
@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):
"""test port cannot be created with nonexist policy."""
network = self.create_shared_network('test network')
@ -396,7 +397,7 @@ class QosPolicyTest(BaseQosTest):
qos_policy_id='49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
@test.attr(type='negative')
@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):
"""project/tenant can not associate port with non-shared policy."""
policy = self.create_qos_policy(name='test-policy',
@ -409,7 +410,7 @@ class QosPolicyTest(BaseQosTest):
network, qos_policy_id=policy['id'],
client_mgr=self.primary_mgr)
@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):
"""project/tenant can update port with shared policy."""
policy = self.create_qos_policy(name='test-policy',
@ -431,7 +432,7 @@ class QosPolicyTest(BaseQosTest):
self._disassociate_port(port['id'])
@test.attr(type='negative')
@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):
"""can not delete policy if used by network."""
policy = self.create_qos_policy(name='test-policy',
@ -447,7 +448,7 @@ class QosPolicyTest(BaseQosTest):
self.adm_qos_client.delete_policy(policy['id'])
@test.attr(type='negative')
@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):
"""can not delete policy if used by port."""
policy = self.create_qos_policy(name='test-policy',
@ -463,7 +464,7 @@ class QosPolicyTest(BaseQosTest):
self._disassociate_port(port['id'], client_mgr=self.primary_mgr)
self.adm_qos_client.delete_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 with rules attached can be deleted."""
policy = self.create_qos_policy(name='test-policy',
@ -481,7 +482,7 @@ class QosPolicyTest(BaseQosTest):
class QosBandwidthLimitRuleTest(BaseQosTest):
"""QoS Bandwidth limit rule CURD operations."""
@test.idempotent_id('8a59b00b-3e9c-4787-92f8-93a5cdf5e378')
@decorators.idempotent_id('8a59b00b-3e9c-4787-92f8-93a5cdf5e378')
def test_rule_create(self):
"""qos-bandwidth-limit-rule-create POLICY_ID."""
qos_client = self.adm_qos_client
@ -512,7 +513,7 @@ class QosBandwidthLimitRuleTest(BaseQosTest):
policy_rules[0]['type'])
@test.attr(type='negative')
@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):
"""One bandwidth limit rule per policy."""
policy = self.create_qos_policy(name='test-policy',
@ -526,7 +527,7 @@ class QosBandwidthLimitRuleTest(BaseQosTest):
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):
"""qos-bandwidth-limit-rule-update RULE-ID POLICY_ID."""
qos_client = self.adm_qos_client
@ -547,7 +548,7 @@ class QosBandwidthLimitRuleTest(BaseQosTest):
self.assertEqual(max_kbps, retrieved_rule['max_kbps'])
self.assertEqual(max_burst_kbps, retrieved_rule['max_burst_kbps'])
@test.idempotent_id('67ee6efd-7b33-4a68-927d-275b4f8ba958')
@decorators.idempotent_id('67ee6efd-7b33-4a68-927d-275b4f8ba958')
def test_rule_delete(self):
"""qos-bandwidth-limit-rule-delete RULE-ID POLICY_ID."""
qos_client = self.adm_qos_client
@ -571,7 +572,7 @@ class QosBandwidthLimitRuleTest(BaseQosTest):
rule['id'], policy['id'])
@test.attr(type='negative')
@test.idempotent_id('f211222c-5808-46cb-a961-983bbab6b852')
@decorators.idempotent_id('f211222c-5808-46cb-a961-983bbab6b852')
def test_rule_create_rule_nonexistent_policy(self):
"""Cannot create rule with nonexist policy."""
self.assertRaises(
@ -580,7 +581,7 @@ class QosBandwidthLimitRuleTest(BaseQosTest):
'policy', max_kbps=200, max_burst_kbps=1337)
@test.attr(type='negative')
@test.idempotent_id('eed8e2a6-22da-421b-89b9-935a2c1a1b50')
@decorators.idempotent_id('eed8e2a6-22da-421b-89b9-935a2c1a1b50')
def test_policy_create_forbidden_for_regular_tenants(self):
"""project/tenant cannot create policy."""
self.assertRaises(
@ -590,7 +591,7 @@ class QosBandwidthLimitRuleTest(BaseQosTest):
qos_client=self.pri_qos_client)
@test.attr(type='negative')
@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):
"""project/tenant cannot create rule."""
self.assertRaises(
@ -599,7 +600,7 @@ class QosBandwidthLimitRuleTest(BaseQosTest):
'policy', max_kbps=1, max_burst_kbps=2,
qos_client=self.pri_qos_client)
@test.idempotent_id('ce0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
@decorators.idempotent_id('ce0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
def test_get_rules_by_policy(self):
"""qos-bandwidth-limit-rule-list POLICY_ID."""
policy1 = self.create_qos_policy(name='test-policy1',
@ -627,7 +628,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
VALID_DSCP_MARK1 = 56
VALID_DSCP_MARK2 = 48
@test.idempotent_id('8a59b40b-3e9c-4787-92f8-93a5cdf5e378')
@decorators.idempotent_id('8a59b40b-3e9c-4787-92f8-93a5cdf5e378')
def test_rule_create(self):
"""qos-dscp-marking-rule-create POLICY_ID."""
qos_client = self.adm_qos_client
@ -657,7 +658,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
policy_rules[0]['type'])
@test.attr(type='negative')
@test.idempotent_id('8b59b10b-ab01-4787-92f8-93a5cdf5e378')
@decorators.idempotent_id('8b59b10b-ab01-4787-92f8-93a5cdf5e378')
def test_rule_create_fail_for_the_same_type(self):
"""One dscp marking rule per policy."""
policy = self.create_qos_policy(name='test-policy',
@ -671,7 +672,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
policy_id=policy['id'],
dscp_mark=self.VALID_DSCP_MARK2)
@test.idempotent_id('249a6988-2568-47d2-931e-2dbc858943b3')
@decorators.idempotent_id('249a6988-2568-47d2-931e-2dbc858943b3')
def test_rule_update(self):
"""qos-dscp-marking-rule-create POLICY_ID."""
qos_client = self.adm_qos_client
@ -688,7 +689,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
rule['id'], policy['id'])
self.assertEqual(self.VALID_DSCP_MARK2, retrieved_rule['dscp_mark'])
@test.idempotent_id('67ed6efd-7b33-4a68-927d-275b4f8ba958')
@decorators.idempotent_id('67ed6efd-7b33-4a68-927d-275b4f8ba958')
def test_rule_delete(self):
"""qos-dscp-marking-rule-delete POLICY_ID."""
qos_client = self.adm_qos_client
@ -708,7 +709,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
rule['id'], policy['id'])
@test.attr(type='negative')
@test.idempotent_id('f215222c-5808-46cb-a961-983bbab6b852')
@decorators.idempotent_id('f215222c-5808-46cb-a961-983bbab6b852')
def test_rule_create_rule_nonexistent_policy(self):
"""can not create dscp marking rule with nonexist policy."""
self.assertRaises(
@ -717,7 +718,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
'policy', self.VALID_DSCP_MARK1)
@test.attr(type='negative')
@test.idempotent_id('a4a2e3ad-786f-4927-a85a-e545a93bd274')
@decorators.idempotent_id('a4a2e3ad-786f-4927-a85a-e545a93bd274')
def test_rule_create_forbidden_for_regular_tenants(self):
"""project/tenant can not create dscp marking rule."""
self.assertRaises(
@ -727,7 +728,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
qos_client=self.pri_qos_client)
@test.attr(type='negative')
@test.idempotent_id('32646b08-4f05-4493-a48a-bde768a18533')
@decorators.idempotent_id('32646b08-4f05-4493-a48a-bde768a18533')
def test_invalid_rule_create(self):
"""Can not create rule with invalid dscp_mark value."""
policy = self.create_qos_policy(name='test-policy',
@ -738,7 +739,7 @@ class QosDscpMarkingRuleTest(BaseQosTest):
self.create_qos_dscp_marking_rule,
policy['id'], 58)
@test.idempotent_id('cf0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
@decorators.idempotent_id('cf0bd0c2-54d9-4e29-85f1-cfb36ac3ebe2')
def test_get_rules_by_policy(self):
"""qos-dscp-marking-rule-list POLICY_ID."""
policy1 = self.create_qos_policy(name='test-policy1',

View File

@ -16,6 +16,7 @@
import base_dvs as base
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
@ -40,7 +41,7 @@ class AdminNetworksTestJSON(base.BaseDvsAdminNetworkTest):
cls.cidr = cls.subnet['cidr']
@test.attr(type='smoke')
@test.idempotent_id('1dcead1d-d773-4da1-9534-0b984ca684b3')
@decorators.idempotent_id('1dcead1d-d773-4da1-9534-0b984ca684b3')
def test_create_update_delete_flat_network_subnet(self):
# Create an admin network
name = data_utils.rand_name('admin-network-')
@ -65,7 +66,7 @@ class AdminNetworksTestJSON(base.BaseDvsAdminNetworkTest):
self.networks.pop()
@test.attr(type='smoke')
@test.idempotent_id('15d3d53c-3328-401f-b8f5-3a29aee2ea3a')
@decorators.idempotent_id('15d3d53c-3328-401f-b8f5-3a29aee2ea3a')
def test_create_update_delete_vlan_network_subnet(self):
# Create an admin network
name = data_utils.rand_name('admin-network-')
@ -92,7 +93,7 @@ class AdminNetworksTestJSON(base.BaseDvsAdminNetworkTest):
self.networks.pop()
@test.attr(type='smoke')
@test.idempotent_id('838aee5f-92f2-47b9-86c6-629a04aa6269')
@decorators.idempotent_id('838aee5f-92f2-47b9-86c6-629a04aa6269')
def test_show_network(self):
# Verify the details of a network
body = self.show_network(self.network['id'])
@ -102,7 +103,7 @@ class AdminNetworksTestJSON(base.BaseDvsAdminNetworkTest):
self.assertEqual(network[key], self.network[key])
@test.attr(type='smoke')
@test.idempotent_id('b86d50ef-39a7-4136-8c89-e5e534fe92aa')
@decorators.idempotent_id('b86d50ef-39a7-4136-8c89-e5e534fe92aa')
def test_list_networks(self):
# Verify the network exists in the list of all networks
body = self.list_networks()
@ -111,7 +112,7 @@ class AdminNetworksTestJSON(base.BaseDvsAdminNetworkTest):
self.assertNotEmpty(networks, "Created network not found in the list")
@test.attr(type='smoke')
@test.idempotent_id('ee3f8b79-da3f-4394-9bea-012488202257')
@decorators.idempotent_id('ee3f8b79-da3f-4394-9bea-012488202257')
def test_show_subnet(self):
# Verify the details of a subnet
body = self.show_subnet(self.subnet['id'])

View File

@ -14,8 +14,8 @@
# under the License.
import base_dvs as base
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
@ -39,7 +39,7 @@ class AdminPortsTestJSON(base.BaseDvsAdminNetworkTest):
cls.network = cls.create_network(net_name=name)
cls.port = cls.create_port(cls.network['id'])
@test.idempotent_id('c3f751d4-e358-44b9-bfd2-3d563c4a2d04')
@decorators.idempotent_id('c3f751d4-e358-44b9-bfd2-3d563c4a2d04')
def test_create_update_delete_port(self):
# Verify port creation
network_id = self.network['id']
@ -56,7 +56,7 @@ class AdminPortsTestJSON(base.BaseDvsAdminNetworkTest):
self.assertFalse(updated_port['admin_state_up'])
@test.attr(type='smoke')
@test.idempotent_id('d3dcd23b-7d5a-4720-8d88-473fb154d609')
@decorators.idempotent_id('d3dcd23b-7d5a-4720-8d88-473fb154d609')
def test_show_port(self):
# Verify the details of port
body = self.show_port(self.port['id'])
@ -76,7 +76,7 @@ class AdminPortsTestJSON(base.BaseDvsAdminNetworkTest):
self.assertEqual(port['fixed_ips'], [])
@test.attr(type='smoke')
@test.idempotent_id('c5f74042-c512-4569-b9b9-bc2bf46e77e1')
@decorators.idempotent_id('c5f74042-c512-4569-b9b9-bc2bf46e77e1')
def test_list_ports(self):
# Verify the port exists in the list of all ports
body = self.list_ports()
@ -84,8 +84,8 @@ class AdminPortsTestJSON(base.BaseDvsAdminNetworkTest):
if port['id'] == self.port['id']]
self.assertNotEmpty(ports, "Created port not found in the list")
@decorators.idempotent_id('2775f96c-a09b-49e1-a5a4-adb83a3e91c7')
@test.attr(type='smoke')
@test.idempotent_id('2775f96c-a09b-49e1-a5a4-adb83a3e91c7')
def test_list_ports_fields(self):
# Verify specific fields of ports
fields = ['binding:vif_type', 'id', 'mac_address']

View File

@ -18,6 +18,7 @@ from oslo_log import log as logging
from tempest import config
from tempest import exceptions
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -169,8 +170,8 @@ class TestDvsNetworkBasicOps(manager.NetworkScenarioTest):
should_connect)
@test.attr(type='smoke')
@test.idempotent_id('b977dce6-6527-4676-9b66-862b22058f0f')
@test.services('compute', 'network')
@decorators.idempotent_id('b977dce6-6527-4676-9b66-862b22058f0f')
def test_network_basic_ops(self):
"""
For a freshly-booted VM with an IP address ("port") on a given

View File

@ -14,6 +14,7 @@ from oslo_log import log as logging
from oslo_utils import uuidutils
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -53,7 +54,7 @@ class TestHealthMonitors(base.BaseAdminTestCase):
super(TestHealthMonitors, cls).resource_cleanup()
@test.attr(type='smoke')
@test.idempotent_id('24cf7da4-b829-4df5-a133-b6cef97ec560')
@decorators.idempotent_id('24cf7da4-b829-4df5-a133-b6cef97ec560')
def test_create_health_monitor_missing_tenant_id_field(self):
"""Test if admin user can
@ -69,7 +70,7 @@ class TestHealthMonitors(base.BaseAdminTestCase):
self.assertEqual(admin_tenant_id, hm_tenant_id)
@test.attr(type='negative')
@test.idempotent_id('acbff982-15d6-43c5-a015-e72b7df30998')
@decorators.idempotent_id('acbff982-15d6-43c5-a015-e72b7df30998')
def test_create_health_monitor_empty_tenant_id_field(self):
"""Test with admin user
@ -83,7 +84,7 @@ class TestHealthMonitors(base.BaseAdminTestCase):
tenant_id="")
@test.attr(type='smoke')
@test.idempotent_id('a318d351-a72e-46dc-a094-8a751e4fa7aa')
@decorators.idempotent_id('a318d351-a72e-46dc-a094-8a751e4fa7aa')
def test_create_health_monitor_for_another_tenant_id_field(self):
"""Test with admin user

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -62,20 +63,20 @@ class TestHealthMonitors(base.BaseTestCase):
return None
@test.attr(type='smoke')
@test.idempotent_id('3c223a4d-3733-4daa-a6e3-69a31f9e7304')
@decorators.idempotent_id('3c223a4d-3733-4daa-a6e3-69a31f9e7304')
def test_list_health_monitors_empty(self):
hm_list = self._list_health_monitors()
self.assertEmpty(hm_list)
@test.attr(type='smoke')
@test.idempotent_id('76880edd-b01c-4b80-ba4d-1d10f35aaeb7')
@decorators.idempotent_id('76880edd-b01c-4b80-ba4d-1d10f35aaeb7')
def test_list_health_monitors_one(self):
hm = self._create_health_monitor(**self.create_basic_hm_kwargs)
hm_list = self._list_health_monitors()
self.assertIn(hm, hm_list)
@test.attr(type='smoke')
@test.idempotent_id('22b984d5-8284-4f7c-90c4-407d0e872ea8')
@decorators.idempotent_id('22b984d5-8284-4f7c-90c4-407d0e872ea8')
def test_list_health_monitors_two(self):
hm1 = self._create_health_monitor(**self.create_basic_hm_kwargs)
new_listener = self._create_listener(
@ -95,28 +96,28 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertIn(hm2, hm_list)
@test.attr(type='smoke')
@test.idempotent_id('ca49b640-259c-49ee-be9c-b425a4bbd2cf')
@decorators.idempotent_id('ca49b640-259c-49ee-be9c-b425a4bbd2cf')
def test_get_health_monitor(self):
hm = self._create_health_monitor(**self.create_basic_hm_kwargs)
hm_test = self._show_health_monitor(hm.get('id'))
self.assertEqual(hm, hm_test)
@test.attr(type='smoke')
@test.idempotent_id('80ded4c2-2277-4e19-8280-3519b22a999e')
@decorators.idempotent_id('80ded4c2-2277-4e19-8280-3519b22a999e')
def test_create_health_monitor(self):
new_hm = self._create_health_monitor(**self.create_basic_hm_kwargs)
hm = self._show_health_monitor(new_hm.get('id'))
self.assertEqual(new_hm, hm)
@test.attr(type='smoke')
@test.idempotent_id('387f669b-7a02-4ab3-880d-719dd79ff853')
@decorators.idempotent_id('387f669b-7a02-4ab3-880d-719dd79ff853')
def test_create_health_monitor_missing_attribute(self):
self.assertRaises(ex.BadRequest, self._create_health_monitor,
type='HTTP', delay=3, max_retries=10,
pool_id=self.pool.get('id'))
@test.attr(type=['smoke', 'negative'])
@test.idempotent_id('bf2ec88e-91d3-48f5-b9f2-be3dab21445c')
@decorators.idempotent_id('bf2ec88e-91d3-48f5-b9f2-be3dab21445c')
def test_create_health_monitor_missing_required_field_type(self):
"""Test if a non_admin user can
@ -127,7 +128,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type=['smoke', 'negative'])
@test.idempotent_id('85110a81-d905-40f1-92c0-7dafb1617915')
@decorators.idempotent_id('85110a81-d905-40f1-92c0-7dafb1617915')
def test_create_health_monitor_missing_required_field_delay(self):
"""Test if a non_admin user can
@ -138,7 +139,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type=['smoke', 'negative'])
@test.idempotent_id('10ed9396-271a-4edd-948d-93ad44df2713')
@decorators.idempotent_id('10ed9396-271a-4edd-948d-93ad44df2713')
def test_create_health_monitor_missing_required_field_timeout(self):
"""Test if a non_admin user can
@ -149,7 +150,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type=['smoke', 'negative'])
@test.idempotent_id('69614cb5-9078-4b93-8dfa-45d59ac240f8')
@decorators.idempotent_id('69614cb5-9078-4b93-8dfa-45d59ac240f8')
def test_create_health_monitor_missing_required_field_max_retries(self):
"""Test if a non_admin user
@ -160,7 +161,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type=['smoke', 'negative'])
@test.idempotent_id('543d1f68-1b3a-49c8-bc6c-3eb8123b6e9a')
@decorators.idempotent_id('543d1f68-1b3a-49c8-bc6c-3eb8123b6e9a')
def test_create_health_monitor_missing_required_field_pool_id(self):
"""Test if a non_admin user
@ -170,7 +171,7 @@ class TestHealthMonitors(base.BaseTestCase):
type='HTTP', delay=3, max_retries=10, timeout=5)
@test.attr(type='smoke')
@test.idempotent_id('4f8d17d2-3e52-4e34-83c7-4398b328c559')
@decorators.idempotent_id('4f8d17d2-3e52-4e34-83c7-4398b328c559')
def test_create_health_monitor_missing_admin_state_up(self):
"""Test if a non_admin user
@ -185,7 +186,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(True, hm_test.get('admin_state_up'))
@test.attr(type='smoke')
@test.idempotent_id('6e1066d3-f358-446e-a574-5d4ceaf0b51d')
@decorators.idempotent_id('6e1066d3-f358-446e-a574-5d4ceaf0b51d')
def test_create_health_monitor_missing_http_method(self):
"""Test if a non_admin user
@ -200,7 +201,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual('GET', hm_test.get('http_method'))
@test.attr(type='smoke')
@test.idempotent_id('9b25196f-7476-4ed7-9542-1f22a76b79f8')
@decorators.idempotent_id('9b25196f-7476-4ed7-9542-1f22a76b79f8')
def test_create_health_monitor_missing_url_path(self):
"""Test if a non_admin user
@ -215,7 +216,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual('/', hm_test.get('url_path'))
@test.attr(type='smoke')
@test.idempotent_id('c69da922-1c46-4b9b-8b8b-2e700d506a9c')
@decorators.idempotent_id('c69da922-1c46-4b9b-8b8b-2e700d506a9c')
def test_create_health_monitor_missing_expected_codes(self):
"""Test if a non_admin user
@ -230,7 +231,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual('200', hm_test.get('expected_codes'))
@test.attr(type='negative')
@test.idempotent_id('a00cb8e0-cd0b-44d0-85b0-5935a0297e37')
@decorators.idempotent_id('a00cb8e0-cd0b-44d0-85b0-5935a0297e37')
def test_create_health_monitor_invalid_tenant_id(self):
"""Test create health monitor with invalid tenant_id"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -239,7 +240,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('fcd93a6d-1fec-4031-9c18-611f4f3b270e')
@decorators.idempotent_id('fcd93a6d-1fec-4031-9c18-611f4f3b270e')
def test_create_health_monitor_invalid_type(self):
"""Test create health monitor with invalid type"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -247,7 +248,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('3c2829d9-5d51-4bcc-b83e-f28f6e6d0bc3')
@decorators.idempotent_id('3c2829d9-5d51-4bcc-b83e-f28f6e6d0bc3')
def test_create_health_monitor_invalid_delay(self):
"""Test create health monitor with invalid delay"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -255,7 +256,7 @@ class TestHealthMonitors(base.BaseTestCase):
timeout=5, pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('7155e366-72a2-47a0-9fcf-25e38a3ef7f7')
@decorators.idempotent_id('7155e366-72a2-47a0-9fcf-25e38a3ef7f7')
def test_create_health_monitor_invalid_max_retries(self):
"""Test create health monitor with invalid max_retries"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -263,7 +264,7 @@ class TestHealthMonitors(base.BaseTestCase):
timeout=5, pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('fb5d0016-5ea6-4697-8049-e80473e67880')
@decorators.idempotent_id('fb5d0016-5ea6-4697-8049-e80473e67880')
def test_create_health_monitor_invalid_timeout(self):
"""Test create health monitor with invalid timeout"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -271,7 +272,7 @@ class TestHealthMonitors(base.BaseTestCase):
timeout='blah', pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('7f3e6e95-3eac-4a46-983a-ba1fd3b0afdf')
@decorators.idempotent_id('7f3e6e95-3eac-4a46-983a-ba1fd3b0afdf')
def test_create_health_monitor_invalid_pool_id(self):
"""Test create health monitor with invalid pool id"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -279,7 +280,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id='blah')
@test.attr(type='negative')
@test.idempotent_id('f5aacc27-3573-4749-9cb9-3261fcabf1e9')
@decorators.idempotent_id('f5aacc27-3573-4749-9cb9-3261fcabf1e9')
def test_create_health_monitor_invalid_admin_state_up(self):
"""Test if a non_admin user
@ -291,7 +292,7 @@ class TestHealthMonitors(base.BaseTestCase):
admin_state_up='blah')
@test.attr(type='negative')
@test.idempotent_id('0f9f2488-aefb-44c9-a08b-67b715e63091')
@decorators.idempotent_id('0f9f2488-aefb-44c9-a08b-67b715e63091')
def test_create_health_monitor_invalid_expected_codes(self):
"""Test if a non_admin user
@ -303,7 +304,7 @@ class TestHealthMonitors(base.BaseTestCase):
expected_codes='blah')
@test.attr(type='negative')
@test.idempotent_id('0d637b7f-52ea-429f-8f97-584a5a9118aa')
@decorators.idempotent_id('0d637b7f-52ea-429f-8f97-584a5a9118aa')
def test_create_health_monitor_invalid_url_path(self):
"""Test if a non_admin user
@ -315,7 +316,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'), url_path='blah')
@test.attr(type='negative')
@test.idempotent_id('7d4061c4-1fbc-43c3-81b5-2d099a120297')
@decorators.idempotent_id('7d4061c4-1fbc-43c3-81b5-2d099a120297')
def test_create_health_monitor_invalid_http_method(self):
"""Test if a non_admin user
@ -327,7 +328,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'), http_method='blah')
@test.attr(type='negative')
@test.idempotent_id('b655cee7-df0d-4531-bd98-a4918d2e752a')
@decorators.idempotent_id('b655cee7-df0d-4531-bd98-a4918d2e752a')
def test_create_health_monitor_empty_type(self):
"""Test create health monitor with empty type"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -335,7 +336,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('d843c9f4-507e-462f-8f2b-319af23029db')
@decorators.idempotent_id('d843c9f4-507e-462f-8f2b-319af23029db')
def test_create_health_monitor_empty_delay(self):
"""Test create health monitor with empty delay"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -343,7 +344,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('bb9cb2b0-2684-4f4d-b344-6e7b0c58b019')
@decorators.idempotent_id('bb9cb2b0-2684-4f4d-b344-6e7b0c58b019')
def test_create_health_monitor_empty_timeout(self):
"""Test create health monitor with empty timeout"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -351,7 +352,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('3b52441d-5e8a-4d17-b772-bd261d0c2656')
@decorators.idempotent_id('3b52441d-5e8a-4d17-b772-bd261d0c2656')
def test_create_health_monitor_empty_max_retries(self):
"""Test create health monitor with empty max_retries"""
self.assertRaises(ex.BadRequest, self._create_health_monitor,
@ -359,7 +360,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('397aa201-25c1-4828-8c60-9cee5c4d89ab')
@decorators.idempotent_id('397aa201-25c1-4828-8c60-9cee5c4d89ab')
# NSX-v does reject empty pool_id
def test_create_health_monitor_empty_max_pool_id(self):
"""Test create health monitor with empty pool_id"""
@ -368,7 +369,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id='')
@test.attr(type='negative')
@test.idempotent_id('e806c916-877c-41dc-bacb-aabd9684a540')
@decorators.idempotent_id('e806c916-877c-41dc-bacb-aabd9684a540')
# NSX-v does reject empty admin_state_up
def test_create_health_monitor_empty_max_admin_state_up(self):
"""Test create health monitor with empty admin_state_up"""
@ -377,7 +378,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'), admin_state_up='')
@test.attr(type='negative')
@test.idempotent_id('9c8e8fe8-a3a2-481b-9ac8-eb9ecccd8330')
@decorators.idempotent_id('9c8e8fe8-a3a2-481b-9ac8-eb9ecccd8330')
def test_create_health_monitor_empty_max_http_method(self):
"""Test create health monitor with empty http_method
@ -388,7 +389,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'), http_method='')
@test.attr(type='negative')
@test.idempotent_id('9016c846-fc7c-4063-9f01-61fad37c435d')
@decorators.idempotent_id('9016c846-fc7c-4063-9f01-61fad37c435d')
def test_create_health_monitor_empty_max_url_path(self):
"""Test create health monitor with empty url_path
@ -399,7 +400,7 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'), url_path='')
@test.attr(type='negative')
@test.idempotent_id('5df60d27-55ec-42a9-96cd-3affa611c8b1')
@decorators.idempotent_id('5df60d27-55ec-42a9-96cd-3affa611c8b1')
# NSX-v does reject empty expected_codes
def test_create_health_monitor_empty_expected_codes(self):
"""Test create health monitor with empty expected_codes"""
@ -408,21 +409,21 @@ class TestHealthMonitors(base.BaseTestCase):
pool_id=self.pool.get('id'), expected_codes='')
@test.attr(type='negative')
@test.idempotent_id('da63bd3a-89d5-40dd-b920-420263cbfd93')
@decorators.idempotent_id('da63bd3a-89d5-40dd-b920-420263cbfd93')
def test_create_health_monitor_invalid_attribute(self):
self.assertRaises(ex.BadRequest, self._create_health_monitor,
type='HTTP', delay=3, max_retries='twenty one',
pool_id=self.pool.get('id'))
@test.attr(type='negative')
@test.idempotent_id('2005ded4-7d26-4946-8d22-e05bf026bd44')
@decorators.idempotent_id('2005ded4-7d26-4946-8d22-e05bf026bd44')
def test_create_health_monitor_extra_attribute(self):
self.assertRaises(ex.BadRequest, self._create_health_monitor,
type='HTTP', delay=3, max_retries=10,
pool_id=self.pool.get('id'), subnet_id=10)
@test.attr(type='smoke')
@test.idempotent_id('79b4a4f9-1d2d-4df0-a11b-dd97f973dff2')
@decorators.idempotent_id('79b4a4f9-1d2d-4df0-a11b-dd97f973dff2')
def test_update_health_monitor(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -433,7 +434,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(max_retries, new_hm.get('max_retries'))
@test.attr(type='smoke')
@test.idempotent_id('9496ba1f-e917-4972-883b-432e44f3cf19')
@decorators.idempotent_id('9496ba1f-e917-4972-883b-432e44f3cf19')
def test_update_health_monitor_missing_admin_state_up(self):
"""Test update health monitor with missing admin state field"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -444,7 +445,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(True, new_hm.get('admin_state_up'))
@test.attr(type='smoke')
@test.idempotent_id('88570f22-cb68-47b4-a020-52b75af818d3')
@decorators.idempotent_id('88570f22-cb68-47b4-a020-52b75af818d3')
def test_update_health_monitor_missing_delay(self):
"""Test update health monitor with missing delay field"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -455,7 +456,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(hm.get('delay'), new_hm.get('delay'))
@test.attr(type='smoke')
@test.idempotent_id('45ace70d-28a5-405d-95cd-b2c92ccaa593')
@decorators.idempotent_id('45ace70d-28a5-405d-95cd-b2c92ccaa593')
def test_update_health_monitor_missing_timeout(self):
"""Test update health monitor with missing timeout field"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -466,7 +467,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(hm.get('timeout'), new_hm.get('timeout'))
@test.attr(type='smoke')
@test.idempotent_id('269af536-2352-4772-bf35-268df9f4542c')
@decorators.idempotent_id('269af536-2352-4772-bf35-268df9f4542c')
def test_update_health_monitor_missing_max_retries(self):
"""Test update health monitor with missing max retries field"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -477,7 +478,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(hm.get('max_retries'), new_hm.get('max_retries'))
@test.attr(type='smoke')
@test.idempotent_id('318d972f-9cd1-42ef-9b8b-2f91ba785ac7')
@decorators.idempotent_id('318d972f-9cd1-42ef-9b8b-2f91ba785ac7')
def test_update_health_monitor_missing_http_method(self):
"""Test update health monitor with missing http_method field"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -488,7 +489,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(hm.get('http_method'), new_hm.get('http_method'))
@test.attr(type='smoke')
@test.idempotent_id('4b97ab67-889d-480c-bedc-f06d86479bb5')
@decorators.idempotent_id('4b97ab67-889d-480c-bedc-f06d86479bb5')
def test_update_health_monitor_missing_url_path(self):
"""Test update health monitor with missing url_path field"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -499,7 +500,7 @@ class TestHealthMonitors(base.BaseTestCase):
self.assertEqual(hm.get('url_path'), new_hm.get('url_path'))
@test.attr(type='smoke')
@test.idempotent_id('095cdb91-0937-4ae1-8b46-5edd10f00a1e')
@decorators.idempotent_id('095cdb91-0937-4ae1-8b46-5edd10f00a1e')
def test_update_health_monitor_missing_expected_codes(self):
"""Test update health monitor with missing expected_codes field"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -511,7 +512,7 @@ class TestHealthMonitors(base.BaseTestCase):
new_hm.get('expected_codes'))
@test.attr(type='negative')
@test.idempotent_id('646d74ed-9afe-4710-a677-c36f85482731')
@decorators.idempotent_id('646d74ed-9afe-4710-a677-c36f85482731')
def test_update_health_monitor_invalid_attribute(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -521,7 +522,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), max_retries='blue')
@test.attr(type='negative')
@test.idempotent_id('9d717551-82ab-4073-a269-8b05b67d8306')
@decorators.idempotent_id('9d717551-82ab-4073-a269-8b05b67d8306')
def test_update_health_monitor_invalid_admin_state_up(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -531,7 +532,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), admin_state_up='blah')
@test.attr(type='negative')
@test.idempotent_id('b865dc8a-695b-4f15-891c-e73b7402ddeb')
@decorators.idempotent_id('b865dc8a-695b-4f15-891c-e73b7402ddeb')
def test_update_health_monitor_invalid_delay(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -541,7 +542,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), delay='blah')
@test.attr(type='negative')
@test.idempotent_id('813c8bc1-7ba6-4ae5-96f3-1fdb10ae7be3')
@decorators.idempotent_id('813c8bc1-7ba6-4ae5-96f3-1fdb10ae7be3')
def test_update_health_monitor_invalid_timeout(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -551,7 +552,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), timeout='blah')
@test.attr(type='negative')
@test.idempotent_id('05456473-5014-43ae-97a2-3790e4987526')
@decorators.idempotent_id('05456473-5014-43ae-97a2-3790e4987526')
def test_update_health_monitor_invalid_max_retries(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -561,7 +562,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), max_retries='blah')
@test.attr(type='negative')
@test.idempotent_id('1e2fb718-de77-46a3-8897-6f5aff6cab5e')
@decorators.idempotent_id('1e2fb718-de77-46a3-8897-6f5aff6cab5e')
def test_update_health_monitor_invalid_http_method(self):
"""Kilo: @decorators.skip_because(bug="1641643")"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -572,7 +573,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), http_method='blah')
@test.attr(type='negative')
@test.idempotent_id('07d62a55-18b3-4b74-acb2-b73a0b5e4364')
@decorators.idempotent_id('07d62a55-18b3-4b74-acb2-b73a0b5e4364')
def test_update_health_monitor_invalid_url_path(self):
"""Kilo: @decorators.skip_because(bug="1641652")"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -583,7 +584,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), url_path='blah')
@test.attr(type='negative')
@test.idempotent_id('47c96e10-4863-4635-8bc6-371d460f61bc')
@decorators.idempotent_id('47c96e10-4863-4635-8bc6-371d460f61bc')
def test_update_health_monitor_invalid_expected_codes(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -593,7 +594,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), expected_codes='blah')
@test.attr(type='negative')
@test.idempotent_id('8594b3a3-70e8-4dfa-8928-18bc1cc7ab4a')
@decorators.idempotent_id('8594b3a3-70e8-4dfa-8928-18bc1cc7ab4a')
def test_update_health_monitor_empty_admin_state_up(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -603,7 +604,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), admin_state_up='')
@test.attr(type='negative')
@test.idempotent_id('1e1b761d-5114-4931-935d-1069d66e2bb1')
@decorators.idempotent_id('1e1b761d-5114-4931-935d-1069d66e2bb1')
def test_update_health_monitor_empty_delay(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -613,7 +614,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), empty_delay='')
@test.attr(type='negative')
@test.idempotent_id('e6e4a6b7-50b4-465d-be02-44fd5f258bb6')
@decorators.idempotent_id('e6e4a6b7-50b4-465d-be02-44fd5f258bb6')
def test_update_health_monitor_empty_timeout(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -623,7 +624,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), timeout='')
@test.attr(type='negative')
@test.idempotent_id('65d05adf-a399-4457-bd83-92c43c1eca01')
@decorators.idempotent_id('65d05adf-a399-4457-bd83-92c43c1eca01')
def test_update_health_monitor_empty_max_retries(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -633,7 +634,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), max_retries='')
@test.attr(type='negative')
@test.idempotent_id('0c464bb3-ff84-4816-9237-4583e4da9881')
@decorators.idempotent_id('0c464bb3-ff84-4816-9237-4583e4da9881')
def test_update_health_monitor_empty_empty_http_method(self):
"""Kilo: @decorators.skip_because(bug="1639340")"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -644,7 +645,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), http_method='')
@test.attr(type='negative')
@test.idempotent_id('3e87c0a8-ef15-457c-a58f-270de8c5c76c')
@decorators.idempotent_id('3e87c0a8-ef15-457c-a58f-270de8c5c76c')
def test_update_health_monitor_empty_url_path(self):
"""Kilo: @decorators.skip_because(bug="1639340")"""
hm = self._create_health_monitor(type='HTTP', delay=3,
@ -655,7 +656,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), url_path='')
@test.attr(type='negative')
@test.idempotent_id('d45189e6-db9f-44d1-b5ad-8b7691e781ee')
@decorators.idempotent_id('d45189e6-db9f-44d1-b5ad-8b7691e781ee')
def test_update_health_monitor_empty_expected_codes(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -665,7 +666,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), expected_codes='')
@test.attr(type=['smoke', 'negative'])
@test.idempotent_id('cf70e44e-8060-494a-b577-d656726ba3d8')
@decorators.idempotent_id('cf70e44e-8060-494a-b577-d656726ba3d8')
def test_update_health_monitor_extra_attribute(self):
hm = self._create_health_monitor(type='HTTP', delay=3,
max_retries=10, timeout=5,
@ -675,7 +676,7 @@ class TestHealthMonitors(base.BaseTestCase):
hm.get('id'), protocol='UDP')
@test.attr(type=['smoke', 'negative'])
@test.idempotent_id('fe44e0d9-957b-44cf-806b-af7819444864')
@decorators.idempotent_id('fe44e0d9-957b-44cf-806b-af7819444864')
def test_delete_health_monitor(self):
"""Kilo: @decorators.skip_because(bug="1639340")"""
hm = self._create_health_monitor(cleanup=False, type='HTTP', delay=3,

View File

@ -11,7 +11,7 @@
# under the License.
from tempest import config
from tempest import test
from tempest.lib import decorators
from vmware_nsx_tempest.tests.nsxv.api.lbaas import base
@ -104,7 +104,7 @@ class TestL7Policies(base.BaseTestCase):
self.assertEqual(policy.get('redirect_pool_id'), self.pool7_id)
return policy
@test.idempotent_id('465c9bea-53de-4a1f-ae00-fa2ee52d250b')
@decorators.idempotent_id('465c9bea-53de-4a1f-ae00-fa2ee52d250b')
def test_l7policies_crud_ops(self):
policy = self.create_to_pool_policy()
# update
@ -125,7 +125,7 @@ class TestL7Policies(base.BaseTestCase):
policy_id_list = [x.get('id') for x in policies]
self.assertNotIn(policy.get('id'), policy_id_list)
@test.idempotent_id('726588f4-970a-4f32-8253-95766ddaa7b4')
@decorators.idempotent_id('726588f4-970a-4f32-8253-95766ddaa7b4')
def test_policy_position(self):
self.remove_all_policies()
policy1 = self.create_to_pool_policy()

View File

@ -11,7 +11,7 @@
# under the License.
from tempest import config
from tempest import test
from tempest.lib import decorators
from vmware_nsx_tempest.tests.nsxv.api.lbaas import base
@ -61,7 +61,7 @@ class TestL7Rules(base.BaseTestCase):
def resource_cleanup(cls):
super(TestL7Rules, cls).resource_cleanup()
@test.idempotent_id('27e8a3a1-bd3a-40e5-902d-fe9bc79ebf1f')
@decorators.idempotent_id('27e8a3a1-bd3a-40e5-902d-fe9bc79ebf1f')
def test_l7rules_crud_ops(self):
rule = self._create_l7rule(self.policy7_id,
type='PATH',

View File

@ -13,6 +13,7 @@
from oslo_log import log as logging
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -53,7 +54,7 @@ class ListenersTest(base.BaseAdminTestCase):
super(ListenersTest, cls).resource_cleanup()
@test.attr(type='negative')
@test.idempotent_id('f84bfb35-7f73-4576-b2ca-26193850d2bf')
@decorators.idempotent_id('f84bfb35-7f73-4576-b2ca-26193850d2bf')
def test_create_listener_empty_tenant_id(self):
"""Test create listener with an empty tenant id should fail
@ -70,7 +71,7 @@ class ListenersTest(base.BaseAdminTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('71ebb8d6-ff2a-410d-a089-b086f195609d')
@decorators.idempotent_id('71ebb8d6-ff2a-410d-a089-b086f195609d')
def test_create_listener_invalid_tenant_id(self):
"""Test create listener with an invalid tenant id"""
create_new_listener_kwargs = self.create_listener_kwargs
@ -87,7 +88,7 @@ class ListenersTest(base.BaseAdminTestCase):
self.assertEqual(new_listener, listener)
@test.attr(type='smoke')
@test.idempotent_id('55eaeab9-a21e-470c-8861-5af1ded9d64a')
@decorators.idempotent_id('55eaeab9-a21e-470c-8861-5af1ded9d64a')
def test_create_listener_missing_tenant_id(self):
"""Test create listener with an missing tenant id.

View File

@ -13,6 +13,7 @@
from oslo_log import log as logging
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -53,7 +54,7 @@ class ListenersTest(base.BaseTestCase):
cls.listener_id = cls.listener['id']
@test.attr(type='smoke')
@test.idempotent_id('32ae6156-d809-49fc-a45b-55269660651c')
@decorators.idempotent_id('32ae6156-d809-49fc-a45b-55269660651c')
def test_get_listener(self):
"""Test get listener"""
listener = self._show_listener(self.listener_id)
@ -62,7 +63,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('4013ab83-924a-4c53-982e-83388d7ad4d9')
@decorators.idempotent_id('4013ab83-924a-4c53-982e-83388d7ad4d9')
def test_list_listeners(self):
"""Test get listeners with one listener"""
listeners = self._list_listeners()
@ -72,7 +73,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('04f58729-3f93-4616-bb9d-8baaff3542b2')
@decorators.idempotent_id('04f58729-3f93-4616-bb9d-8baaff3542b2')
def test_list_listeners_two(self):
"""Test get listeners with two listeners"""
create_new_listener_kwargs = self.create_listener_kwargs
@ -91,7 +92,7 @@ class ListenersTest(base.BaseTestCase):
self.assertNotEqual(self.listener, new_listener)
@test.attr(type='smoke')
@test.idempotent_id('7989096b-95c2-4b26-86b1-5aec0a2d8386')
@decorators.idempotent_id('7989096b-95c2-4b26-86b1-5aec0a2d8386')
def test_create_listener(self):
"""Test create listener"""
create_new_listener_kwargs = self.create_listener_kwargs
@ -108,7 +109,7 @@ class ListenersTest(base.BaseTestCase):
self.assertNotEqual(self.listener, new_listener)
@test.attr(type='negative')
@test.idempotent_id('f7ef7f56-b791-48e8-9bbe-838a3ed94519')
@decorators.idempotent_id('f7ef7f56-b791-48e8-9bbe-838a3ed94519')
def test_create_listener_missing_field_loadbalancer(self):
"""Test create listener with a missing required field loadbalancer"""
self.assertRaises(exceptions.BadRequest,
@ -119,7 +120,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('c392301c-3d9a-4123-85c3-124e4e3253f6')
@decorators.idempotent_id('c392301c-3d9a-4123-85c3-124e4e3253f6')
def test_create_listener_missing_field_protocol(self):
"""Test create listener with a missing required field protocol"""
self.assertRaises(exceptions.BadRequest,
@ -130,7 +131,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('12c1c5b5-81a9-4384-811e-7131f65f3b1b')
@decorators.idempotent_id('12c1c5b5-81a9-4384-811e-7131f65f3b1b')
def test_create_listener_missing_field_protocol_port(self):
"""Test create listener with a missing required field protocol_port"""
self.assertRaises(exceptions.BadRequest,
@ -141,7 +142,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('214a7acc-eacb-4828-ad27-b7f4774947cf')
@decorators.idempotent_id('214a7acc-eacb-4828-ad27-b7f4774947cf')
def test_create_listener_missing_admin_state_up(self):
"""Test create listener with a missing admin_state_up field"""
create_new_listener_kwargs = self.create_listener_kwargs
@ -158,7 +159,7 @@ class ListenersTest(base.BaseTestCase):
self.assertTrue(new_listener['admin_state_up'])
@test.attr(type='negative')
@test.idempotent_id('86d892dd-9025-4051-a160-8bf1bbb8c64d')
@decorators.idempotent_id('86d892dd-9025-4051-a160-8bf1bbb8c64d')
def test_create_listener_invalid_load_balancer_id(self):
"""Test create listener with an invalid load_balancer_id"""
self.assertRaises(exceptions.BadRequest,
@ -170,7 +171,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('fb430d68-e68d-4bd0-b43d-f1175ad5a819')
@decorators.idempotent_id('fb430d68-e68d-4bd0-b43d-f1175ad5a819')
def test_create_listener_invalid_protocol(self):
"""Test create listener with an invalid protocol"""
self.assertRaises(exceptions.BadRequest,
@ -182,7 +183,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('8e472e7e-a5c2-4dba-ac5c-993f6e6bb229')
@decorators.idempotent_id('8e472e7e-a5c2-4dba-ac5c-993f6e6bb229')
def test_create_listener_invalid_protocol_port(self):
"""Test create listener with an invalid protocol_port"""
self.assertRaises(exceptions.BadRequest,
@ -194,7 +195,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('57fc90f4-95e4-4f3c-8f53-32c7282b956e')
@decorators.idempotent_id('57fc90f4-95e4-4f3c-8f53-32c7282b956e')
def test_create_listener_invalid_admin_state_up(self):
"""Test update listener with an invalid admin_state_up"""
self.assertRaises(exceptions.BadRequest,
@ -206,7 +207,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('556e1ab9-051c-4e9c-aaaa-f11d15de070b')
@decorators.idempotent_id('556e1ab9-051c-4e9c-aaaa-f11d15de070b')
def test_create_listener_invalid_tenant_id(self):
"""Test create listener with an invalid tenant id"""
self.assertRaises(exceptions.BadRequest,
@ -219,7 +220,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('59d32fd7-06f6-4466-bdd4-0be23b15970c')
@decorators.idempotent_id('59d32fd7-06f6-4466-bdd4-0be23b15970c')
def test_create_listener_invalid_name(self):
"""Test create listener with an invalid name
@ -235,7 +236,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('95457f70-2c1a-4c14-aa80-db8e803d78a9')
@decorators.idempotent_id('95457f70-2c1a-4c14-aa80-db8e803d78a9')
def test_create_listener_invalid_description(self):
"""Test create listener with an invalid description
@ -251,7 +252,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('177d337f-fe0c-406c-92f1-a25c0103bd0f')
@decorators.idempotent_id('177d337f-fe0c-406c-92f1-a25c0103bd0f')
def test_create_listener_invalid_connection_limit(self):
"""Test create listener_ids
@ -267,7 +268,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('8af7b033-8ff7-4bdb-8949-76809745d8a9')
@decorators.idempotent_id('8af7b033-8ff7-4bdb-8949-76809745d8a9')
def test_create_listener_empty_load_balancer_id(self):
"""Test create listener with an empty load_balancer_id"""
self.assertRaises(exceptions.BadRequest,
@ -279,7 +280,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('242af61b-ce50-46e2-926a-6801600dcee4')
@decorators.idempotent_id('242af61b-ce50-46e2-926a-6801600dcee4')
def test_create_listener_empty_protocol(self):
"""Test create listener with an empty protocol"""
self.assertRaises(exceptions.BadRequest,
@ -291,7 +292,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('4866af4c-2b91-4bce-af58-af77f19d9119')
@decorators.idempotent_id('4866af4c-2b91-4bce-af58-af77f19d9119')
def test_create_listener_empty_protocol_port(self):
"""Test create listener with an empty protocol_port"""
self.assertRaises(exceptions.BadRequest,
@ -303,7 +304,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('09636ad1-a9d5-4c03-92db-ae5d9847993d')
@decorators.idempotent_id('09636ad1-a9d5-4c03-92db-ae5d9847993d')
def test_create_listener_empty_admin_state_up(self):
"""Test update listener with an empty admin_state_up"""
self.assertRaises(exceptions.BadRequest,
@ -315,7 +316,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('46fc3784-d676-42f7-953b-a23c1d62323d')
@decorators.idempotent_id('46fc3784-d676-42f7-953b-a23c1d62323d')
def test_create_listener_empty_tenant_id(self):
"""Test create listener with an empty tenant id
@ -331,7 +332,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('b4120626-a47e-4b4e-9b64-017e595c4daf')
@decorators.idempotent_id('b4120626-a47e-4b4e-9b64-017e595c4daf')
def test_create_listener_empty_name(self):
"""Test create listener with an empty name"""
create_new_listener_kwargs = self.create_listener_kwargs
@ -348,7 +349,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(new_listener, listener)
@test.attr(type='smoke')
@test.idempotent_id('af067d00-d496-4f02-87d6-40624c34d492')
@decorators.idempotent_id('af067d00-d496-4f02-87d6-40624c34d492')
def test_create_listener_empty_description(self):
"""Test create listener with an empty description"""
create_new_listener_kwargs = self.create_listener_kwargs
@ -365,7 +366,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(new_listener, listener)
@test.attr(type='negative')
@test.idempotent_id('dd271757-c447-4579-a417-f9d0871b145c')
@decorators.idempotent_id('dd271757-c447-4579-a417-f9d0871b145c')
def test_create_listener_empty_connection_limit(self):
"""Test create listener with an empty connection _limit field"""
self.assertRaises(exceptions.BadRequest,
@ -378,7 +379,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('a1602217-e1b4-4f85-8a5e-d474477333f3')
@decorators.idempotent_id('a1602217-e1b4-4f85-8a5e-d474477333f3')
def test_create_listener_incorrect_attribute(self):
"""Test create a listener withan extra, incorrect field"""
self.assertRaises(exceptions.BadRequest,
@ -389,7 +390,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('27c443ff-3aee-4ae6-8b9a-6abf3d5443bf')
@decorators.idempotent_id('27c443ff-3aee-4ae6-8b9a-6abf3d5443bf')
def test_update_listener(self):
"""Test update listener"""
self._update_listener(self.listener_id,
@ -400,7 +401,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(listener.get('name'), 'new_name')
@test.attr(type='negative')
@test.idempotent_id('a709e4da-01ef-4dda-a336-f5e37268b5ea')
@decorators.idempotent_id('a709e4da-01ef-4dda-a336-f5e37268b5ea')
def test_update_listener_invalid_tenant_id(self):
"""Test update listener with an invalid tenant id"""
self.assertRaises(exceptions.BadRequest,
@ -411,7 +412,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('d88dd3d5-a52f-4306-ba53-e8f6f4e1b399')
@decorators.idempotent_id('d88dd3d5-a52f-4306-ba53-e8f6f4e1b399')
def test_update_listener_invalid_admin_state_up(self):
"""Test update a listener with an invalid admin_state_up"""
self.assertRaises(exceptions.BadRequest,
@ -422,7 +423,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('7c0efb63-90d9-43d0-b959-eb841ef39832')
@decorators.idempotent_id('7c0efb63-90d9-43d0-b959-eb841ef39832')
def test_update_listener_invalid_name(self):
"""Test update a listener with an invalid name
@ -436,7 +437,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('ba9bfad8-dbb0-4cbc-b2e3-52bf72bc1fc5')
@decorators.idempotent_id('ba9bfad8-dbb0-4cbc-b2e3-52bf72bc1fc5')
def test_update_listener_invalid_description(self):
"""Test update a listener with an invalid description
@ -450,7 +451,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('dcafa50b-cece-4904-bcc9-a0dd1ac99a7e')
@decorators.idempotent_id('dcafa50b-cece-4904-bcc9-a0dd1ac99a7e')
def test_update_listener_invalid_connection_limit(self):
"""Test update a listener with an invalid connection_limit"""
self.assertRaises(exceptions.BadRequest,
@ -461,7 +462,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('27e009c5-3c79-414d-863d-24b731f03123')
@decorators.idempotent_id('27e009c5-3c79-414d-863d-24b731f03123')
def test_update_listener_incorrect_attribute(self):
"""Test update a listener with an extra, incorrect field"""
self.assertRaises(exceptions.BadRequest,
@ -476,7 +477,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('e8bdd948-7bea-494b-8a4a-e730b70f2882')
@decorators.idempotent_id('e8bdd948-7bea-494b-8a4a-e730b70f2882')
def test_update_listener_missing_name(self):
"""Test update listener with a missing name"""
old_listener = self._show_listener(self.listener_id)
@ -489,7 +490,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(listener.get('name'), old_name)
@test.attr(type='smoke')
@test.idempotent_id('7e0194b8-9315-452d-9de5-d48f227b626f')
@decorators.idempotent_id('7e0194b8-9315-452d-9de5-d48f227b626f')
def test_update_listener_missing_description(self):
"""Test update listener with a missing description"""
old_listener = self._show_listener(self.listener_id)
@ -502,7 +503,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(listener.get('description'), old_description)
@test.attr(type='smoke')
@test.idempotent_id('285dd3f2-fcb8-4ccb-b9ce-d6207b29a2f8')
@decorators.idempotent_id('285dd3f2-fcb8-4ccb-b9ce-d6207b29a2f8')
def test_update_listener_missing_admin_state_up(self):
"""Test update listener with a missing admin_state_up"""
old_listener = self._show_listener(self.listener_id)
@ -515,7 +516,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(listener.get('admin_state_up'), old_admin_state_up)
@test.attr(type='smoke')
@test.idempotent_id('5c510338-0f8a-4d1e-805b-f8458f2e80ee')
@decorators.idempotent_id('5c510338-0f8a-4d1e-805b-f8458f2e80ee')
def test_update_listener_missing_connection_limit(self):
"""Test update listener with a missing connection_limit"""
old_listener = self._show_listener(self.listener_id)
@ -529,7 +530,7 @@ class ListenersTest(base.BaseTestCase):
old_connection_limit)
@test.attr(type='negative')
@test.idempotent_id('677205d9-9d97-4232-a8e3-d17ebf42ff05')
@decorators.idempotent_id('677205d9-9d97-4232-a8e3-d17ebf42ff05')
def test_update_listener_empty_tenant_id(self):
"""Test update listener with an empty tenant id"""
self.assertRaises(exceptions.BadRequest,
@ -540,7 +541,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='negative')
@test.idempotent_id('6e9f8fdb-48b0-4c4e-9b29-460576b125ff')
@decorators.idempotent_id('6e9f8fdb-48b0-4c4e-9b29-460576b125ff')
def test_update_listener_empty_admin_state_up(self):
"""Test update a listener with an empty admin_state_up"""
self.assertRaises(exceptions.BadRequest,
@ -551,7 +552,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('cf619b8d-1916-4144-85c7-e5a34e0d7a2b')
@decorators.idempotent_id('cf619b8d-1916-4144-85c7-e5a34e0d7a2b')
def test_update_listener_empty_name(self):
"""Test update a listener with an empty name"""
self._update_listener(self.listener_id,
@ -562,7 +563,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(listener.get('name'), "")
@test.attr(type='smoke')
@test.idempotent_id('a9b6f721-c3c1-4d22-a3e5-7e89b58fa3a7')
@decorators.idempotent_id('a9b6f721-c3c1-4d22-a3e5-7e89b58fa3a7')
def test_update_listener_empty_description(self):
"""Test update a listener with an empty description"""
self._update_listener(self.listener_id,
@ -573,7 +574,7 @@ class ListenersTest(base.BaseTestCase):
self.assertEqual(listener.get('description'), "")
@test.attr(type='negative')
@test.idempotent_id('7ddcf46b-068b-449c-9dde-ea4021dd76bf')
@decorators.idempotent_id('7ddcf46b-068b-449c-9dde-ea4021dd76bf')
def test_update_listener_empty_connection_limit(self):
"""Test update a listener with an empty connection_limit"""
self.assertRaises(exceptions.BadRequest,
@ -584,7 +585,7 @@ class ListenersTest(base.BaseTestCase):
listener_ids=[self.listener_id])
@test.attr(type='smoke')
@test.idempotent_id('c891c857-fa89-4775-92d8-5320321b86cd')
@decorators.idempotent_id('c891c857-fa89-4775-92d8-5320321b86cd')
def test_delete_listener(self):
"""Test delete listener"""
create_new_listener_kwargs = self.create_listener_kwargs

View File

@ -14,6 +14,7 @@ from oslo_log import log as logging
import testtools
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -49,7 +50,7 @@ class LoadBalancersTest(base.BaseAdminTestCase):
@test.attr(type='smoke')
@testtools.skipIf('1641902' in CONF.nsxv.bugs_to_resolve,
"skip_because bug=1641902")
@test.idempotent_id('0008ae1e-77a2-45d9-b81e-0e3119b5a26d')
@decorators.idempotent_id('0008ae1e-77a2-45d9-b81e-0e3119b5a26d')
def test_create_load_balancer_missing_tenant_id_field_for_admin(self):
"""Test create load balancer with a missing tenant id field.
@ -69,7 +70,7 @@ class LoadBalancersTest(base.BaseAdminTestCase):
@test.attr(type='smoke')
@testtools.skipIf('1715126' in CONF.nsxv.bugs_to_resolve,
"skip_because bug=1715126")
@test.idempotent_id('37620941-47c1-40b2-84d8-db17ff823ebc')
@decorators.idempotent_id('37620941-47c1-40b2-84d8-db17ff823ebc')
def test_create_load_balancer_missing_tenant_id_for_other_tenant(self):
"""Test create load balancer with a missing tenant id field.
@ -85,7 +86,7 @@ class LoadBalancersTest(base.BaseAdminTestCase):
self._wait_for_load_balancer_status(load_balancer['id'])
@test.attr(type='negative')
@test.idempotent_id('5bf483f5-ae28-47f5-8805-642da0ffcb40')
@decorators.idempotent_id('5bf483f5-ae28-47f5-8805-642da0ffcb40')
# Empty tenant_id causing ServerFault
def test_create_load_balancer_empty_tenant_id_field(self):
"""Test create load balancer with empty tenant_id field should fail
@ -99,7 +100,7 @@ class LoadBalancersTest(base.BaseAdminTestCase):
tenant_id="")
@test.attr(type='smoke')
@test.idempotent_id('19fc8a44-1280-49f3-be5b-0d30e6e43363')
@decorators.idempotent_id('19fc8a44-1280-49f3-be5b-0d30e6e43363')
# NSX-v: 2nd tenant_id at the same subnet not supported; got serverFault
def test_create_load_balancer_for_another_tenant(self):
"""Test create load balancer for other tenant

View File

@ -16,6 +16,7 @@ from oslo_log import log as logging
import testtools
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -49,7 +50,7 @@ class LoadBalancersTest(base.BaseTestCase):
cls.load_balancer_id = cls.load_balancer['id']
@test.attr(type='smoke')
@test.idempotent_id('b7ea6c09-e077-4a67-859b-b2cd01e3b46b')
@decorators.idempotent_id('b7ea6c09-e077-4a67-859b-b2cd01e3b46b')
def test_list_load_balancers(self):
"""Test list load balancers with one load balancer"""
load_balancers = self._list_load_balancers()
@ -57,7 +58,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertIn(self.load_balancer, load_balancers)
@test.attr(type='smoke')
@test.idempotent_id('8c2302df-ca94-4950-9826-eb996630a392')
@decorators.idempotent_id('8c2302df-ca94-4950-9826-eb996630a392')
def test_list_load_balancers_two(self):
"""Test list load balancers with two load balancers"""
new_load_balancer = self._create_active_load_balancer(
@ -71,7 +72,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertNotEqual(self.load_balancer, new_load_balancer)
@test.attr(type='smoke')
@test.idempotent_id('56345a78-1d53-4c05-9d7b-3e5cf34c22aa')
@decorators.idempotent_id('56345a78-1d53-4c05-9d7b-3e5cf34c22aa')
def test_get_load_balancer(self):
"""Test get load balancer"""
load_balancer = self._show_load_balancer(
@ -79,7 +80,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(self.load_balancer, load_balancer)
@test.attr(type='smoke')
@test.idempotent_id('5bf80330-d908-4025-9467-bca1727525c8')
@decorators.idempotent_id('5bf80330-d908-4025-9467-bca1727525c8')
def test_create_load_balancer(self):
"""Test create load balancer"""
new_load_balancer = self._create_active_load_balancer(
@ -92,7 +93,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertNotEqual(self.load_balancer, new_load_balancer)
@test.attr(type='negative')
@test.idempotent_id('66bf5390-154f-4627-af61-2c1c30325d6f')
@decorators.idempotent_id('66bf5390-154f-4627-af61-2c1c30325d6f')
def test_create_load_balancer_missing_vip_subnet_id_field(self):
"""Test create load balancer
@ -104,7 +105,7 @@ class LoadBalancersTest(base.BaseTestCase):
tenant_id=self.subnet['tenant_id'])
@test.attr(type='negative')
@test.idempotent_id('8e78a7e6-2da3-4f79-9f66-fd1447277883')
@decorators.idempotent_id('8e78a7e6-2da3-4f79-9f66-fd1447277883')
def test_create_load_balancer_empty_provider_field(self):
"""Test create load balancer with an empty provider field"""
self.assertRaises(exceptions.BadRequest,
@ -113,7 +114,7 @@ class LoadBalancersTest(base.BaseTestCase):
provider="")
@test.attr(type='smoke')
@test.idempotent_id('def37122-3f9a-47f5-b7b5-b5c0d5e7e5ca')
@decorators.idempotent_id('def37122-3f9a-47f5-b7b5-b5c0d5e7e5ca')
def test_create_load_balancer_empty_description_field(self):
"""Test create load balancer with an empty description field"""
load_balancer = self._create_active_load_balancer(
@ -122,7 +123,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer.get('description'), "")
@test.attr(type='negative')
@test.idempotent_id('69944c74-3ea1-4c06-8d28-82120721a13e')
@decorators.idempotent_id('69944c74-3ea1-4c06-8d28-82120721a13e')
def test_create_load_balancer_empty_vip_address_field(self):
"""Test create load balancer with empty vip_address field"""
self.assertRaises(exceptions.BadRequest,
@ -132,7 +133,7 @@ class LoadBalancersTest(base.BaseTestCase):
vip_address="")
@test.attr(type='smoke')
@test.idempotent_id('63bbe788-f3a6-444f-89b3-8c740425fc39')
@decorators.idempotent_id('63bbe788-f3a6-444f-89b3-8c740425fc39')
def test_create_load_balancer_missing_admin_state_up(self):
"""Test create load balancer with a missing admin_state_up field"""
load_balancer = self._create_active_load_balancer(
@ -141,7 +142,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer.get('admin_state_up'), True)
@test.attr(type='negative')
@test.idempotent_id('499f164a-e926-47a6-808a-14f3c29d04c9')
@decorators.idempotent_id('499f164a-e926-47a6-808a-14f3c29d04c9')
def test_create_load_balancer_empty_admin_state_up_field(self):
"""Test create load balancer with empty admin_state_up field"""
self.assertRaises(exceptions.BadRequest,
@ -151,7 +152,7 @@ class LoadBalancersTest(base.BaseTestCase):
admin_state_up="")
@test.attr(type='smoke')
@test.idempotent_id('e4511356-0e78-457c-a310-8515b2dedad4')
@decorators.idempotent_id('e4511356-0e78-457c-a310-8515b2dedad4')
def test_create_load_balancer_missing_name(self):
"""Test create load balancer with a missing name field"""
load_balancer = self._create_load_balancer(
@ -161,7 +162,7 @@ class LoadBalancersTest(base.BaseTestCase):
self._wait_for_load_balancer_status(load_balancer['id'])
@test.attr(type='smoke')
@test.idempotent_id('6bd4a92c-7498-4b92-aeae-bce0b74608e3')
@decorators.idempotent_id('6bd4a92c-7498-4b92-aeae-bce0b74608e3')
def test_create_load_balancer_empty_name(self):
"""Test create load balancer with an empty name field"""
load_balancer = self._create_load_balancer(
@ -171,7 +172,7 @@ class LoadBalancersTest(base.BaseTestCase):
self._wait_for_load_balancer_status(load_balancer['id'])
@test.attr(type='smoke')
@test.idempotent_id('e605b1ea-5179-4035-8100-c24d0164a5a5')
@decorators.idempotent_id('e605b1ea-5179-4035-8100-c24d0164a5a5')
def test_create_load_balancer_missing_description(self):
"""Test create load balancer with a missing description field"""
load_balancer = self._create_load_balancer(
@ -181,7 +182,7 @@ class LoadBalancersTest(base.BaseTestCase):
self._wait_for_load_balancer_status(load_balancer['id'])
@test.attr(type='smoke')
@test.idempotent_id('9f718024-340b-405f-817f-311392353c32')
@decorators.idempotent_id('9f718024-340b-405f-817f-311392353c32')
def test_create_load_balancer_missing_vip_address(self):
"""Test create load balancer
@ -200,7 +201,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer_ip_initial, load_balancer_final)
@test.attr(type='smoke')
@test.idempotent_id('f599ccbd-73e8-4e27-96a5-d9e0e3419a9f')
@decorators.idempotent_id('f599ccbd-73e8-4e27-96a5-d9e0e3419a9f')
def test_create_load_balancer_missing_provider_field(self):
"""Test create load balancer with a missing provider field"""
load_balancer = self._create_active_load_balancer(
@ -213,7 +214,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer_initial, load_balancer_final)
@test.attr(type='negative')
@test.idempotent_id('377166eb-f581-4383-bc2e-54fdeed73e42')
@decorators.idempotent_id('377166eb-f581-4383-bc2e-54fdeed73e42')
def test_create_load_balancer_invalid_vip_subnet_id(self):
"""Test create load balancer with an invalid vip subnet id"""
self.assertRaises(exceptions.BadRequest,
@ -222,7 +223,7 @@ class LoadBalancersTest(base.BaseTestCase):
vip_subnet_id="abc123")
@test.attr(type='negative')
@test.idempotent_id('512bec06-5259-4e93-b482-7ec3346c794a')
@decorators.idempotent_id('512bec06-5259-4e93-b482-7ec3346c794a')
def test_create_load_balancer_empty_vip_subnet_id(self):
"""Test create load balancer with an empty vip subnet id"""
self.assertRaises(exceptions.BadRequest,
@ -231,7 +232,7 @@ class LoadBalancersTest(base.BaseTestCase):
vip_subnet_id="")
@test.attr(type='negative')
@test.idempotent_id('02bd6d0e-820e-46fb-89cb-1d335e7aaa02')
@decorators.idempotent_id('02bd6d0e-820e-46fb-89cb-1d335e7aaa02')
def test_create_load_balancer_invalid_tenant_id(self):
"""Test create load balancer with an invalid tenant id"""
self.assertRaises(exceptions.BadRequest,
@ -240,7 +241,7 @@ class LoadBalancersTest(base.BaseTestCase):
tenant_id="&^%123")
@test.attr(type='negative')
@test.idempotent_id('b8c56e4a-9644-4119-8fc9-130841caf662')
@decorators.idempotent_id('b8c56e4a-9644-4119-8fc9-130841caf662')
def test_create_load_balancer_invalid_name(self):
"""Test create load balancer with an invalid name
@ -254,7 +255,7 @@ class LoadBalancersTest(base.BaseTestCase):
name='n' * 256)
@test.attr(type='negative')
@test.idempotent_id('d638ae60-7de5-45da-a7d9-53eca4998980')
@decorators.idempotent_id('d638ae60-7de5-45da-a7d9-53eca4998980')
def test_create_load_balancer_invalid_description(self):
"""Test create load balancer with an invalid description
@ -268,7 +269,7 @@ class LoadBalancersTest(base.BaseTestCase):
description='d' * 256)
@test.attr(type='negative')
@test.idempotent_id('56768aa6-b26e-48aa-8118-956c62930d79')
@decorators.idempotent_id('56768aa6-b26e-48aa-8118-956c62930d79')
def test_create_load_balancer_incorrect_attribute(self):
"""Test create a load balancer with an extra, incorrect field"""
self.assertRaises(exceptions.BadRequest,
@ -279,7 +280,7 @@ class LoadBalancersTest(base.BaseTestCase):
protocol_port=80)
@test.attr(type='smoke')
@test.idempotent_id('a130e70f-9d76-4bff-89de-3e564952b244')
@decorators.idempotent_id('a130e70f-9d76-4bff-89de-3e564952b244')
def test_create_load_balancer_missing_tenant_id_field(self):
"""Test create load balancer with a missing tenant id field"""
load_balancer = self._create_load_balancer(
@ -290,7 +291,7 @@ class LoadBalancersTest(base.BaseTestCase):
self._wait_for_load_balancer_status(load_balancer['id'])
@test.attr(type='negative')
@test.idempotent_id('25261cca-0c38-4dc8-bb40-f7692035740f')
@decorators.idempotent_id('25261cca-0c38-4dc8-bb40-f7692035740f')
def test_create_load_balancer_empty_tenant_id_field(self):
"""Test create load balancer with empty tenant_id field"""
self.assertRaises(exceptions.BadRequest,
@ -300,7 +301,7 @@ class LoadBalancersTest(base.BaseTestCase):
tenant_id="")
@test.attr(type='negative')
@test.idempotent_id('10de328d-c754-484b-841f-313307f92935')
@decorators.idempotent_id('10de328d-c754-484b-841f-313307f92935')
def test_create_load_balancer_other_tenant_id_field(self):
"""Test create load balancer for other tenant"""
tenant = 'deffb4d7c0584e89a8ec99551565713c'
@ -313,7 +314,7 @@ class LoadBalancersTest(base.BaseTestCase):
@test.attr(type='negative')
@testtools.skipIf('1703396' in CONF.nsxv.bugs_to_resolve,
"skip_because bug=1703396")
@test.idempotent_id('9963cbf5-97d0-4ab9-96e5-6cbd65c98714')
@decorators.idempotent_id('9963cbf5-97d0-4ab9-96e5-6cbd65c98714')
def test_create_load_balancer_invalid_flavor_field(self):
"""Test create load balancer with an invalid flavor field"""
self.assertRaises(exceptions.NotFound,
@ -324,7 +325,7 @@ class LoadBalancersTest(base.BaseTestCase):
@test.attr(type='negative')
@testtools.skipIf('1703396' in CONF.nsxv.bugs_to_resolve,
"skip_because bug=1703396")
@test.idempotent_id('f7319e32-0fad-450e-8f53-7567f56e8223')
@decorators.idempotent_id('f7319e32-0fad-450e-8f53-7567f56e8223')
def test_create_load_balancer_provider_flavor_conflict(self):
"""Test create load balancer with both a provider and a flavor"""
self.assertRaises(exceptions.Conflict,
@ -334,7 +335,7 @@ class LoadBalancersTest(base.BaseTestCase):
provider="NO_SUCH_PROVIDER")
@test.attr(type='smoke')
@test.idempotent_id('1d92d98f-550f-4f05-a246-cdf4525459a2')
@decorators.idempotent_id('1d92d98f-550f-4f05-a246-cdf4525459a2')
def test_update_load_balancer(self):
"""Test update load balancer"""
self._update_load_balancer(self.load_balancer_id,
@ -344,7 +345,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer.get('name'), 'new_name')
@test.attr(type='smoke')
@test.idempotent_id('474ca200-8dea-4d20-8468-abc0169a445b')
@decorators.idempotent_id('474ca200-8dea-4d20-8468-abc0169a445b')
def test_update_load_balancer_empty_name(self):
"""Test update load balancer with empty name"""
self._update_load_balancer(self.load_balancer_id,
@ -354,7 +355,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer.get('name'), "")
@test.attr(type='negative')
@test.idempotent_id('551be885-215d-4941-8870-651cbc871162')
@decorators.idempotent_id('551be885-215d-4941-8870-651cbc871162')
def test_update_load_balancer_invalid_name(self):
"""Test update load balancer with invalid name
@ -367,7 +368,7 @@ class LoadBalancersTest(base.BaseTestCase):
name='a' * 256)
@test.attr(type='smoke')
@test.idempotent_id('62eef0ba-3859-4c8f-9e6a-8d6918754597')
@decorators.idempotent_id('62eef0ba-3859-4c8f-9e6a-8d6918754597')
def test_update_load_balancer_missing_name(self):
"""Test update load balancer with missing name"""
loadbalancer = self._show_load_balancer(
@ -380,7 +381,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer_initial, load_balancer_new)
@test.attr(type='negative')
@test.idempotent_id('ab3550c6-8b21-463c-bc5d-e79cbae3432f')
@decorators.idempotent_id('ab3550c6-8b21-463c-bc5d-e79cbae3432f')
def test_update_load_balancer_invalid_description(self):
"""Test update load balancer with invalid description
@ -393,7 +394,7 @@ class LoadBalancersTest(base.BaseTestCase):
description='a' * 256)
@test.attr(type='smoke')
@test.idempotent_id('157ebdbf-4ad2-495d-b880-c1b1a8edc46d')
@decorators.idempotent_id('157ebdbf-4ad2-495d-b880-c1b1a8edc46d')
def test_update_load_balancer_empty_description(self):
"""Test update load balancer with empty description"""
self._update_load_balancer(self.load_balancer_id,
@ -403,7 +404,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer.get('description'), "")
@test.attr(type='smoke')
@test.idempotent_id('d13fa2f5-e8df-4d53-86a8-68583941200c')
@decorators.idempotent_id('d13fa2f5-e8df-4d53-86a8-68583941200c')
def test_update_load_balancer_missing_description(self):
"""Test update load balancer with missing description"""
loadbalancer = self._show_load_balancer(
@ -416,7 +417,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer_initial, load_balancer_new)
@test.attr(type='negative')
@test.idempotent_id('96e46a1a-62e7-47f1-98c5-9983f89e622f')
@decorators.idempotent_id('96e46a1a-62e7-47f1-98c5-9983f89e622f')
def test_update_load_balancer_invalid_admin_state_up_field(self):
"""Test update load balancer with an invalid admin_state_up"""
self.assertRaises(exceptions.BadRequest,
@ -426,7 +427,7 @@ class LoadBalancersTest(base.BaseTestCase):
admin_state_up="a&^%$jbc123")
@test.attr(type='negative')
@test.idempotent_id('48f1e227-8b15-4389-a050-7ce76f4b4d46')
@decorators.idempotent_id('48f1e227-8b15-4389-a050-7ce76f4b4d46')
def test_update_load_balancer_empty_admin_state_up_field(self):
"""Test update load balancer with an empty admin_state_up"""
self.assertRaises(exceptions.BadRequest,
@ -436,7 +437,7 @@ class LoadBalancersTest(base.BaseTestCase):
admin_state_up="")
@test.attr(type='smoke')
@test.idempotent_id('a9182e53-ddaa-4f41-af54-585d983279ba')
@decorators.idempotent_id('a9182e53-ddaa-4f41-af54-585d983279ba')
def test_update_load_balancer_missing_admin_state_up(self):
"""Test update load balancer with missing admin state field"""
loadbalancer = self._show_load_balancer(
@ -446,7 +447,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(load_balancer_initial, True)
@test.attr(type='negative')
@test.idempotent_id('bfbe9339-d083-4a88-b6d6-015522809c3a')
@decorators.idempotent_id('bfbe9339-d083-4a88-b6d6-015522809c3a')
def test_update_load_balancer_incorrect_attribute(self):
"""Test update a load balancer with an extra, invalid attribute"""
self.assertRaises(exceptions.BadRequest,
@ -459,7 +460,7 @@ class LoadBalancersTest(base.BaseTestCase):
port=80)
@test.attr(type='smoke')
@test.idempotent_id('d2258984-6e9a-41d6-bffa-0543c8b1f2b0')
@decorators.idempotent_id('d2258984-6e9a-41d6-bffa-0543c8b1f2b0')
def test_get_load_balancer_status_tree(self):
"""Test get load balancer status tree"""
statuses = self._show_load_balancer_status_tree(
@ -470,7 +471,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual([], load_balancer['listeners'])
@test.attr(type='smoke')
@test.idempotent_id('a23677a9-b770-4894-8be9-cd66590c228b')
@decorators.idempotent_id('a23677a9-b770-4894-8be9-cd66590c228b')
def test_get_load_balancer_stats(self):
"""Test get load balancer stats"""
stats = self._show_load_balancer_stats(
@ -481,7 +482,7 @@ class LoadBalancersTest(base.BaseTestCase):
self.assertEqual(0, stats['active_connections'])
@test.attr(type='smoke')
@test.idempotent_id('f289f8df-a867-45cd-bee3-7ff08f5e96e0')
@decorators.idempotent_id('f289f8df-a867-45cd-bee3-7ff08f5e96e0')
def test_delete_load_balancer(self):
"""Test delete load balancer"""
new_load_balancer = self._create_active_load_balancer(

View File

@ -13,6 +13,7 @@
from oslo_log import log as logging
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -54,7 +55,7 @@ class MemberTest(base.BaseAdminTestCase):
super(MemberTest, cls).resource_cleanup()
@test.attr(type='smoke')
@test.idempotent_id('03eeec24-78d8-4c2f-8d6c-4a78817f352e')
@decorators.idempotent_id('03eeec24-78d8-4c2f-8d6c-4a78817f352e')
def test_create_member_invalid_tenant_id(self):
"""Test create member with invalid tenant_id"""
member_opts = {}
@ -69,7 +70,7 @@ class MemberTest(base.BaseAdminTestCase):
self.assertEqual(member['tenant_id'], "$232!$pw")
@test.attr(type='negative')
@test.idempotent_id('01c9ea0c-bdfe-4108-95d1-69ecdc0a1f26')
@decorators.idempotent_id('01c9ea0c-bdfe-4108-95d1-69ecdc0a1f26')
def test_create_member_empty_tenant_id(self):
"""Test create member with an empty tenant_id should fail

View File

@ -13,6 +13,7 @@
from oslo_log import log as logging
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -58,7 +59,7 @@ class MemberTest(base.BaseTestCase):
super(MemberTest, cls).resource_cleanup()
@test.attr(type='smoke')
@test.idempotent_id('6dcdc53c-52cf-4b6e-aeec-d13df68ed001')
@decorators.idempotent_id('6dcdc53c-52cf-4b6e-aeec-d13df68ed001')
def test_list_empty_members(self):
"""Test that pool members are empty."""
members = self._list_members(self.pool_id)
@ -66,7 +67,7 @@ class MemberTest(base.BaseTestCase):
msg='Initial pool was supposed to be empty')
@test.attr(type='smoke')
@test.idempotent_id('346e49ce-0665-4995-a03a-b007052d3619')
@decorators.idempotent_id('346e49ce-0665-4995-a03a-b007052d3619')
def test_list_3_members(self):
"""Test that we can list members. """
member_ips_exp = set([u"127.0.0.0", u"127.0.0.1", u"127.0.0.2"])
@ -85,7 +86,7 @@ class MemberTest(base.BaseTestCase):
self.assertEqual(found_member_ips, member_ips_exp)
@test.attr(type='smoke')
@test.idempotent_id('3121bbdc-81e4-40e3-bf66-3ceefd72a0f5')
@decorators.idempotent_id('3121bbdc-81e4-40e3-bf66-3ceefd72a0f5')
def test_add_member(self):
"""Test that we can add a single member."""
expect_empty_members = self._list_members(self.pool_id)
@ -103,7 +104,7 @@ class MemberTest(base.BaseTestCase):
self.assertEqual(1, member["weight"])
@test.attr(type='smoke')
@test.idempotent_id('fc513a45-4c24-42ea-8807-a9b86a81ee56')
@decorators.idempotent_id('fc513a45-4c24-42ea-8807-a9b86a81ee56')
def test_get_member(self):
"""Test that we can fetch a member by id."""
member_opts = self.build_member_opts()
@ -118,7 +119,7 @@ class MemberTest(base.BaseTestCase):
self.assertEqual(member_opts["subnet_id"], member["subnet_id"])
@test.attr(type='smoke')
@test.idempotent_id('2cead036-5a63-43a4-9d9d-03c9b744c101')
@decorators.idempotent_id('2cead036-5a63-43a4-9d9d-03c9b744c101')
def test_create_member_missing_required_field_tenant_id(self):
"""Test if a non_admin user can create a member_opts
@ -132,7 +133,7 @@ class MemberTest(base.BaseTestCase):
self.addCleanup(self._delete_member, self.pool_id, member['id'])
@test.attr(type='negative')
@test.idempotent_id('d7ed0870-a065-4fbd-8d95-0ea4d12063c2')
@decorators.idempotent_id('d7ed0870-a065-4fbd-8d95-0ea4d12063c2')
def test_create_member_missing_required_field_address(self):
"""Test create a member with missing field address"""
member_opts = {}
@ -142,7 +143,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('8d2b9a53-aac7-4fb9-b068-47647289aa21')
@decorators.idempotent_id('8d2b9a53-aac7-4fb9-b068-47647289aa21')
def test_create_member_missing_required_field_protocol_port(self):
"""Test create a member with missing field protocol_port"""
member_opts = {}
@ -152,7 +153,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('9710cd4c-aac0-4b71-b295-82a88c67b0b8')
@decorators.idempotent_id('9710cd4c-aac0-4b71-b295-82a88c67b0b8')
def test_create_member_missing_required_field_subnet_id(self):
"""Test create a member with missing field subnet_id """
member_opts = {}
@ -162,7 +163,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('a6814c49-758d-490a-9557-ef03f0d78c44')
@decorators.idempotent_id('a6814c49-758d-490a-9557-ef03f0d78c44')
def test_raises_BadRequest_when_missing_attrs_during_member_create(self):
"""Test failure on missing attributes on member create."""
member_opts = {}
@ -170,7 +171,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('840bfa84-1d16-4149-a863-6f7afec1682f')
@decorators.idempotent_id('840bfa84-1d16-4149-a863-6f7afec1682f')
def test_create_member_invalid_tenant_id(self):
"""Test create member with invalid tenant_id"""
member_opts = {}
@ -182,7 +183,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('a99dbd0a-5f8c-4c96-8900-1a7d297d913b')
@decorators.idempotent_id('a99dbd0a-5f8c-4c96-8900-1a7d297d913b')
def test_create_member_invalid_address(self):
"""Test create member with invalid address"""
member_opts = {}
@ -193,7 +194,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('736b0771-b98c-4045-97e0-a44e4e18c22e')
@decorators.idempotent_id('736b0771-b98c-4045-97e0-a44e4e18c22e')
def test_create_member_invalid_protocol_port(self):
"""Test create member with invalid protocol_port"""
member_opts = {}
@ -204,7 +205,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('2cc67f5a-3f66-427e-90b8-59a3da5c1d21')
@decorators.idempotent_id('2cc67f5a-3f66-427e-90b8-59a3da5c1d21')
def test_create_member_invalid_subnet_id(self):
"""Test create member with invalid subnet_id"""
member_opts = {}
@ -215,7 +216,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('3403c6f5-5a30-4115-ac3a-8a22855fd614')
@decorators.idempotent_id('3403c6f5-5a30-4115-ac3a-8a22855fd614')
def test_create_member_invalid_admin_state_up(self):
"""Test create member with invalid admin_state_up"""
member_opts = {}
@ -227,7 +228,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('b12216ec-3442-4239-ba2c-dd17640449d1')
@decorators.idempotent_id('b12216ec-3442-4239-ba2c-dd17640449d1')
def test_create_member_invalid_weight(self):
"""Test create member with invalid weight"""
member_opts = {}
@ -239,7 +240,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('88eb464b-4de6-4ed7-a1e8-bc61581a5c6e')
@decorators.idempotent_id('88eb464b-4de6-4ed7-a1e8-bc61581a5c6e')
def test_create_member_empty_tenant_id(self):
"""Test create member with an empty tenant_id"""
member_opts = {}
@ -251,7 +252,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('238cd859-2b60-4e42-b356-c6b38768c3e4')
@decorators.idempotent_id('238cd859-2b60-4e42-b356-c6b38768c3e4')
def test_create_member_empty_address(self):
"""Test create member with an empty address"""
member_opts = {}
@ -262,7 +263,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('834905ac-5c95-4dfc-900c-1676b6c28247')
@decorators.idempotent_id('834905ac-5c95-4dfc-900c-1676b6c28247')
def test_create_member_empty_protocol_port(self):
"""Test create member with an empty protocol_port"""
member_opts = {}
@ -273,7 +274,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('a0f2148e-160e-4b12-8e30-567a0448d179')
@decorators.idempotent_id('a0f2148e-160e-4b12-8e30-567a0448d179')
def test_create_member_empty_subnet_id(self):
"""Test create member with empty subnet_id"""
member_opts = {}
@ -284,7 +285,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('63cd5897-b82c-4508-8be7-3b7ccab21798')
@decorators.idempotent_id('63cd5897-b82c-4508-8be7-3b7ccab21798')
def test_create_member_empty_admin_state_up(self):
"""Test create member with an empty admin_state_up"""
member_opts = {}
@ -296,7 +297,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('55f16682-74a2-4df7-a6b3-2da3623f4a41')
@decorators.idempotent_id('55f16682-74a2-4df7-a6b3-2da3623f4a41')
def test_create_member_empty_weight(self):
"""Test create member with an empty weight"""
member_opts = {}
@ -308,7 +309,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='smoke')
@test.idempotent_id('c99f6146-2c85-4a32-a850-942d6836c175')
@decorators.idempotent_id('c99f6146-2c85-4a32-a850-942d6836c175')
def test_delete_member(self):
"""Test that we can delete a member by id."""
member_opts = self.build_member_opts()
@ -321,7 +322,7 @@ class MemberTest(base.BaseTestCase):
self.assertEmpty(members)
@test.attr(type='smoke')
@test.idempotent_id('7d51aa2d-9582-4160-b07b-bf3c3b3e335e')
@decorators.idempotent_id('7d51aa2d-9582-4160-b07b-bf3c3b3e335e')
def test_update_member(self):
"""Test that we can update a member."""
member_opts = self.build_member_opts()
@ -341,7 +342,7 @@ class MemberTest(base.BaseTestCase):
self.assertEqual(10, member["weight"])
@test.attr(type='smoke')
@test.idempotent_id('101555d6-c472-45e4-b302-b2916ab6fad5')
@decorators.idempotent_id('101555d6-c472-45e4-b302-b2916ab6fad5')
def test_update_member_missing_admin_state_up(self):
"""Test that we can update a member with missing admin_state_up."""
member_opts = self.build_member_opts()
@ -358,7 +359,7 @@ class MemberTest(base.BaseTestCase):
self.assertEqual(10, member["weight"])
@test.attr(type='smoke')
@test.idempotent_id('815c037b-7e3b-474d-a4f6-eec26b44d677')
@decorators.idempotent_id('815c037b-7e3b-474d-a4f6-eec26b44d677')
def test_update_member_missing_weight(self):
"""Test that we can update a member with missing weight."""
member_opts = self.build_member_opts()
@ -375,7 +376,7 @@ class MemberTest(base.BaseTestCase):
self.assertEqual(1, member["weight"])
@test.attr(type='negative')
@test.idempotent_id('3ab3bb11-e287-4693-8ea0-5cfbb4cc2c85')
@decorators.idempotent_id('3ab3bb11-e287-4693-8ea0-5cfbb4cc2c85')
def test_update_member_invalid_admin_state_up(self):
"""Test that we can update a member with empty admin_state_up."""
member_opts = self.build_member_opts()
@ -390,7 +391,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, member_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('71979c3b-08d6-449b-8de2-1eefc9d0db0e')
@decorators.idempotent_id('71979c3b-08d6-449b-8de2-1eefc9d0db0e')
def test_update_member_invalid_weight(self):
"""Test that we can update a member with an empty weight."""
member_opts = self.build_member_opts()
@ -405,7 +406,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, member_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('e1470212-0a36-4d8c-8e30-1f69a8d31ae1')
@decorators.idempotent_id('e1470212-0a36-4d8c-8e30-1f69a8d31ae1')
def test_update_member_empty_admin_state_up(self):
"""Test that we can update a member with empty admin_state_up."""
member_opts = self.build_member_opts()
@ -420,7 +421,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, member_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('cd1e276c-b220-439d-a9dc-823a10d11b6a')
@decorators.idempotent_id('cd1e276c-b220-439d-a9dc-823a10d11b6a')
def test_update_member_empty_weight(self):
"""Test that we can update a member with an empty weight."""
member_opts = self.build_member_opts()
@ -435,7 +436,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, member_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('25779006-1e2c-4155-9126-49f45e7646a3')
@decorators.idempotent_id('25779006-1e2c-4155-9126-49f45e7646a3')
def test_raises_immutable_when_updating_immutable_attrs_on_member(self):
"""Test failure on immutable attribute on member create."""
member_opts = self.build_member_opts()
@ -449,7 +450,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, member_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('a332ecda-bb18-4cc2-b847-c09a72d90fd1')
@decorators.idempotent_id('a332ecda-bb18-4cc2-b847-c09a72d90fd1')
def test_raises_exception_on_invalid_attr_on_create(self):
"""Test failure on invalid attribute on member create."""
member_opts = self.build_member_opts()
@ -458,7 +459,7 @@ class MemberTest(base.BaseTestCase):
self.pool_id, **member_opts)
@test.attr(type='negative')
@test.idempotent_id('bc4c3eb5-14d5-43dd-93cb-603801fa6f32')
@decorators.idempotent_id('bc4c3eb5-14d5-43dd-93cb-603801fa6f32')
def test_raises_exception_on_invalid_attr_on_update(self):
"""Test failure on invalid attribute on member update."""
member_opts = self.build_member_opts()

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -62,7 +63,7 @@ class TestPools(base.BaseAdminTestCase):
return response
@test.attr(type='negative')
@test.idempotent_id('71b9d3e1-3f13-4c84-a905-054c9cd3d4aa')
@decorators.idempotent_id('71b9d3e1-3f13-4c84-a905-054c9cd3d4aa')
def test_create_pool_using_empty_tenant_field(self):
"""Test create pool with empty tenant field should fail
@ -74,7 +75,7 @@ class TestPools(base.BaseAdminTestCase):
lb_algorithm='ROUND_ROBIN')
@test.attr(type='smoke')
@test.idempotent_id('f782967d-8dca-4d7b-b625-bfd811379b42')
@decorators.idempotent_id('f782967d-8dca-4d7b-b625-bfd811379b42')
def test_create_pool_missing_tenant_id_for_other_tenant(self):
"""Test create pool with a missing tenant id field.
@ -89,7 +90,7 @@ class TestPools(base.BaseAdminTestCase):
self.assertNotEqual(pool_tenant, self.subnet['tenant_id'])
@test.attr(type='smoke')
@test.idempotent_id('140c4c95-3d12-47d7-9b20-cc3c60e24af9')
@decorators.idempotent_id('140c4c95-3d12-47d7-9b20-cc3c60e24af9')
def test_create_pool_missing_tenant_id_for_admin(self):
"""Test create pool with a missing tenant id field.
@ -103,7 +104,7 @@ class TestPools(base.BaseAdminTestCase):
self.assertEqual(pool_tenant, pool.get('tenant_id'))
@test.attr(type='smoke')
@test.idempotent_id('1cf07f5c-7609-4b64-b5b8-f27050860132')
@decorators.idempotent_id('1cf07f5c-7609-4b64-b5b8-f27050860132')
def test_create_pool_for_another_tenant(self):
"""Test create pool for other tenant field"""
tenant = 'deffb4d7c0584e89a8ec99551565713c'

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from tempest.lib import decorators
from tempest.lib import exceptions as ex
from tempest import test
@ -70,14 +71,14 @@ class TestPools(base.BaseTestCase):
return response
@test.attr(type='smoke')
@test.idempotent_id('99154002-e598-4277-b6d8-bf0fe10f276f')
@decorators.idempotent_id('99154002-e598-4277-b6d8-bf0fe10f276f')
def test_list_pools_empty(self):
"""Test get pools when empty"""
pools = self._list_pools()
self.assertEqual([], pools)
@test.attr(type='smoke')
@test.idempotent_id('4f09b544-8e82-4313-b452-8fe3ca5ad14e')
@decorators.idempotent_id('4f09b544-8e82-4313-b452-8fe3ca5ad14e')
def test_list_pools_one(self):
"""Test get pools with one pool"""
new_pool = self._prepare_and_create_pool()
@ -87,7 +88,7 @@ class TestPools(base.BaseTestCase):
self.assertIn(new_pool, pools)
@test.attr(type='smoke')
@test.idempotent_id('7562b846-a685-49ea-9d41-afcaff418bae')
@decorators.idempotent_id('7562b846-a685-49ea-9d41-afcaff418bae')
def test_list_pools_two(self):
"""Test get pools with two pools"""
new_pool1 = self._prepare_and_create_pool()
@ -98,7 +99,7 @@ class TestPools(base.BaseTestCase):
self.assertIn(new_pool2, pools)
@test.attr(type='smoke')
@test.idempotent_id('0cf61c6a-efd5-4859-9d92-da204f5ec1ed')
@decorators.idempotent_id('0cf61c6a-efd5-4859-9d92-da204f5ec1ed')
def test_get_pool(self):
"""Test get pool"""
new_pool = self._prepare_and_create_pool()
@ -106,7 +107,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(new_pool, pool)
@test.attr(type='smoke')
@test.idempotent_id('7fc310a0-7640-4f7c-8cdb-53b6ae23bd52')
@decorators.idempotent_id('7fc310a0-7640-4f7c-8cdb-53b6ae23bd52')
def test_create_pool(self):
"""Test create pool"""
new_pool = self._prepare_and_create_pool()
@ -114,7 +115,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(new_pool, pool)
@test.attr(type='negative')
@test.idempotent_id('5f414612-4f8c-4f48-ac99-286356870fae')
@decorators.idempotent_id('5f414612-4f8c-4f48-ac99-286356870fae')
def test_create_pool_missing_required_fields(self):
"""Test create pool with a missing required fields"""
tenant_id = self.subnet.get('tenant_id')
@ -123,7 +124,7 @@ class TestPools(base.BaseTestCase):
lb_algorithm='ROUND_ROBIN')
@test.attr(type='smoke')
@test.idempotent_id('7fe53b0c-d7b8-4283-aeb3-eeeb3219e42f')
@decorators.idempotent_id('7fe53b0c-d7b8-4283-aeb3-eeeb3219e42f')
def test_create_pool_missing_tenant_field(self):
"""Test create pool with a missing required tenant field"""
tenant_id = self.subnet.get('tenant_id')
@ -135,7 +136,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(tenant_id, pool_tenant)
@test.attr(type='negative')
@test.idempotent_id('7d17e507-99c2-4e8f-a403-27b630b403a2')
@decorators.idempotent_id('7d17e507-99c2-4e8f-a403-27b630b403a2')
def test_create_pool_missing_protocol_field(self):
"""Test create pool with a missing required protocol field"""
self.increment_protocol_port()
@ -152,7 +153,7 @@ class TestPools(base.BaseTestCase):
lb_algorithm='ROUND_ROBIN')
@test.attr(type='negative')
@test.idempotent_id('99051cc6-bf51-4af0-b530-edbfb7d4b7ab')
@decorators.idempotent_id('99051cc6-bf51-4af0-b530-edbfb7d4b7ab')
def test_create_pool_missing_lb_algorithm_field(self):
"""Test create pool with a missing required lb algorithm field"""
self.increment_protocol_port()
@ -169,7 +170,7 @@ class TestPools(base.BaseTestCase):
protocol='HTTP')
@test.attr(type='negative')
@test.idempotent_id('d04b75fe-688b-4713-83d1-f0ac29005391')
@decorators.idempotent_id('d04b75fe-688b-4713-83d1-f0ac29005391')
def test_create_pool_missing_listener_id_field(self):
"""Test create pool with a missing required listener id field"""
tenant_id = self.subnet.get('tenant_id')
@ -179,7 +180,7 @@ class TestPools(base.BaseTestCase):
protocol='HTTP')
@test.attr(type='smoke')
@test.idempotent_id('378c56b4-cf61-448b-8460-1ffb1a091ea5')
@decorators.idempotent_id('378c56b4-cf61-448b-8460-1ffb1a091ea5')
def test_create_pool_missing_description_field(self):
"""Test create pool with missing description field"""
self._wait_for_load_balancer_status(self.load_balancer.get('id'))
@ -189,7 +190,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(desc, "")
@test.attr(type='smoke')
@test.idempotent_id('f73ff259-7fbb-41ac-ab92-c6eef0213e20')
@decorators.idempotent_id('f73ff259-7fbb-41ac-ab92-c6eef0213e20')
def test_create_pool_missing_name_field(self):
"""Test create pool with a missing name field"""
new_pool = self._prepare_and_create_pool()
@ -198,7 +199,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(name, "")
@test.attr(type='smoke')
@test.idempotent_id('37957c70-6979-4e15-a316-8c29cb7e724e')
@decorators.idempotent_id('37957c70-6979-4e15-a316-8c29cb7e724e')
def test_create_pool_missing_admin_state_up_field(self):
"""Test create pool with a missing admin_state_up field"""
new_pool = self._prepare_and_create_pool()
@ -207,7 +208,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(state, True)
@test.attr(type='smoke')
@test.idempotent_id('d1e41b4b-fe79-4bec-bc94-5934995c6e05')
@decorators.idempotent_id('d1e41b4b-fe79-4bec-bc94-5934995c6e05')
def test_create_pool_missing_session_pers_field(self):
"""Test create pool with a missing session_pers field"""
new_pool = self._prepare_and_create_pool()
@ -216,7 +217,7 @@ class TestPools(base.BaseTestCase):
self.assertIsNone(sess)
@test.attr(type='negative')
@test.idempotent_id('440b3975-b7c8-4cff-85a5-a0a02ad6b8f9')
@decorators.idempotent_id('440b3975-b7c8-4cff-85a5-a0a02ad6b8f9')
def test_create_pool_invalid_protocol(self):
"""Test create pool with an invalid protocol"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -225,7 +226,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('a0b322b1-629c-483c-9136-397fc9100e48')
@decorators.idempotent_id('a0b322b1-629c-483c-9136-397fc9100e48')
def test_create_pool_invalid_session_persistence_field(self):
"""Test create pool with invalid session persistance field"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -235,7 +236,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('53cd9427-29fa-4a55-adb8-9cb6388b9548')
@decorators.idempotent_id('53cd9427-29fa-4a55-adb8-9cb6388b9548')
def test_create_pool_invalid_algorithm(self):
"""Test create pool with an invalid algorithm"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -244,7 +245,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('26e6bb34-4b0f-4650-a5dc-87484fa55038')
@decorators.idempotent_id('26e6bb34-4b0f-4650-a5dc-87484fa55038')
def test_create_pool_invalid_admin_state_up(self):
"""Test create pool with an invalid admin state up field"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -254,7 +255,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('8df02129-2b9c-4628-a390-805967107090')
@decorators.idempotent_id('8df02129-2b9c-4628-a390-805967107090')
def test_create_pool_invalid_listener_field(self):
"""Test create pool with invalid listener field"""
tenant_id = self.subnet.get('tenant_id')
@ -265,7 +266,7 @@ class TestPools(base.BaseTestCase):
listener_id="$@5$%$7863")
@test.attr(type='negative')
@test.idempotent_id('94949cd4-ebc1-4af5-a220-9ebb32772fbc')
@decorators.idempotent_id('94949cd4-ebc1-4af5-a220-9ebb32772fbc')
def test_create_pool_invalid_tenant_id_field(self):
"""Test create pool with invalid tenant_id field"""
self.increment_protocol_port()
@ -282,7 +283,7 @@ class TestPools(base.BaseTestCase):
listener_id=listener_id)
@test.attr(type='negative')
@test.idempotent_id('e335db64-ad16-4e23-bd60-c72c37c7b188')
@decorators.idempotent_id('e335db64-ad16-4e23-bd60-c72c37c7b188')
def test_create_pool_incorrect_attribute(self):
"""Test create a pool with an extra, incorrect field"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -292,7 +293,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('390053c1-adc9-4b1a-8eb0-dbdb9085cf0f')
@decorators.idempotent_id('390053c1-adc9-4b1a-8eb0-dbdb9085cf0f')
def test_create_pool_empty_listener_field(self):
"""Test create pool with empty listener field"""
tenant_id = self.subnet.get('tenant_id')
@ -303,7 +304,7 @@ class TestPools(base.BaseTestCase):
listener_id="")
@test.attr(type='smoke')
@test.idempotent_id('8b25defa-8efc-47f5-a43d-3d299d7b9752')
@decorators.idempotent_id('8b25defa-8efc-47f5-a43d-3d299d7b9752')
def test_create_pool_empty_description_field(self):
"""Test create pool with empty description field"""
new_pool = self._prepare_and_create_pool(description="")
@ -312,7 +313,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(pool_desc, '')
@test.attr(type='smoke')
@test.idempotent_id('c8cd496c-7698-4c0e-bbed-fe9ef6c910de')
@decorators.idempotent_id('c8cd496c-7698-4c0e-bbed-fe9ef6c910de')
def test_create_pool_empty_name_field(self):
"""Test create pool with empty name field"""
new_pool = self._prepare_and_create_pool(name="")
@ -321,7 +322,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(pool_name, '')
@test.attr(type='negative')
@test.idempotent_id('b7997d71-84ea-43d2-8ce0-eea4156cc952')
@decorators.idempotent_id('b7997d71-84ea-43d2-8ce0-eea4156cc952')
def test_create_pool_empty_protocol(self):
"""Test create pool with an empty protocol"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -330,7 +331,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('bffe50bb-8be5-4ed9-aea6-a15b40342599')
@decorators.idempotent_id('bffe50bb-8be5-4ed9-aea6-a15b40342599')
def test_create_pool_empty_session_persistence_field(self):
"""Test create pool with empty session persistence field"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -340,7 +341,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('4cfd301a-baae-462d-8041-84c337e95d16')
@decorators.idempotent_id('4cfd301a-baae-462d-8041-84c337e95d16')
def test_create_pool_empty_algorithm(self):
"""Test create pool with an empty algorithm"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -349,7 +350,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('814de2e3-a536-4ab1-a80f-9506b11c7bc8')
@decorators.idempotent_id('814de2e3-a536-4ab1-a80f-9506b11c7bc8')
def test_create_pool_empty_admin_state_up(self):
"""Test create pool with an invalid admin state up field"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -358,7 +359,7 @@ class TestPools(base.BaseTestCase):
lb_algorithm='ROUND_ROBIN')
@test.attr(type='negative')
@test.idempotent_id('0f230e6d-057d-4da8-a42d-f32464ae1c47')
@decorators.idempotent_id('0f230e6d-057d-4da8-a42d-f32464ae1c47')
def test_create_pool_empty_tenant_field(self):
"""Test create pool with empty tenant field"""
self.assertRaises(ex.BadRequest, self._create_pool,
@ -368,7 +369,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('4a0e711a-b4da-4226-b265-f87b04ee4977')
@decorators.idempotent_id('4a0e711a-b4da-4226-b265-f87b04ee4977')
def test_create_pool_for_other_tenant_field(self):
"""Test create pool for other tenant field"""
tenant = 'deffb4d7c0584e89a8ec99551565713c'
@ -379,7 +380,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('cb564af8-89aa-40ca-850e-55418da0f235')
@decorators.idempotent_id('cb564af8-89aa-40ca-850e-55418da0f235')
def test_create_pool_invalid_name_field(self):
"""known bug with
@ -393,7 +394,7 @@ class TestPools(base.BaseTestCase):
name='n' * 256)
@test.attr(type='negative')
@test.idempotent_id('7f4472be-feb7-4ab7-9fb9-97e08f1fa787')
@decorators.idempotent_id('7f4472be-feb7-4ab7-9fb9-97e08f1fa787')
def test_create_pool_invalid_desc_field(self):
"""known bug with
@ -407,7 +408,7 @@ class TestPools(base.BaseTestCase):
description='d' * 256)
@test.attr(type='negative')
@test.idempotent_id('b09b14dc-029d-4132-94dd-e713c9bfa0ee')
@decorators.idempotent_id('b09b14dc-029d-4132-94dd-e713c9bfa0ee')
def test_create_pool_with_session_persistence_unsupported_type(self):
"""Test create a pool
@ -420,7 +421,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='smoke')
@test.idempotent_id('b5af574a-d05f-4db0-aece-58676cdbf440')
@decorators.idempotent_id('b5af574a-d05f-4db0-aece-58676cdbf440')
def test_create_pool_with_session_persistence_http_cookie(self):
"""Test create a pool with session_persistence type=HTTP_COOKIE"""
new_pool = self._prepare_and_create_pool(
@ -429,7 +430,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(new_pool, pool)
@test.attr(type='smoke')
@test.idempotent_id('2d6b6667-e38b-4e7f-8443-8dc7ee63ea87')
@decorators.idempotent_id('2d6b6667-e38b-4e7f-8443-8dc7ee63ea87')
def test_create_pool_with_session_persistence_app_cookie(self):
"""Test create a pool with session_persistence type=APP_COOKIE"""
new_pool = self._prepare_and_create_pool(
@ -439,7 +440,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(new_pool, pool)
@test.attr(type='negative')
@test.idempotent_id('9ac450fc-24c5-4b5c-a781-b23e5713f172')
@decorators.idempotent_id('9ac450fc-24c5-4b5c-a781-b23e5713f172')
def test_create_pool_with_session_persistence_redundant_cookie_name(self):
"""Test create a pool
@ -453,7 +454,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='negative')
@test.idempotent_id('7783ebd0-5bd9-43f0-baf2-a43212ba2617')
@decorators.idempotent_id('7783ebd0-5bd9-43f0-baf2-a43212ba2617')
def test_create_pool_with_session_persistence_without_cookie_name(self):
"""Test create a pool
@ -466,7 +467,7 @@ class TestPools(base.BaseTestCase):
listener_id=self.listener['id'])
@test.attr(type='smoke')
@test.idempotent_id('767ed26e-7114-402a-bdee-443d52009a73')
@decorators.idempotent_id('767ed26e-7114-402a-bdee-443d52009a73')
def test_update_pool(self):
"""Test update pool"""
new_pool = self._prepare_and_create_pool()
@ -477,7 +478,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(desc, pool.get('description'))
@test.attr(type='smoke')
@test.idempotent_id('5cbc4dac-13fc-44de-b98f-41ca369a6e0f')
@decorators.idempotent_id('5cbc4dac-13fc-44de-b98f-41ca369a6e0f')
def test_update_pool_missing_name(self):
"""Test update pool with missing name"""
new_pool = self._prepare_and_create_pool()
@ -488,7 +489,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(name, pool.get('name'))
@test.attr(type='smoke')
@test.idempotent_id('af9c2f8e-b0e3-455b-83f0-222f8d692185')
@decorators.idempotent_id('af9c2f8e-b0e3-455b-83f0-222f8d692185')
def test_update_pool_missing_description(self):
"""Test update pool with missing description"""
new_pool = self._prepare_and_create_pool()
@ -499,7 +500,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(desc, pool.get('description'))
@test.attr(type='smoke')
@test.idempotent_id('3b41e855-edca-42c1-a1c6-07421f87704d')
@decorators.idempotent_id('3b41e855-edca-42c1-a1c6-07421f87704d')
def test_update_pool_missing_admin_state_up(self):
"""Test update pool with missing admin state up field"""
new_pool = self._prepare_and_create_pool()
@ -510,7 +511,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(admin, pool.get('admin_state_up'))
@test.attr(type='smoke')
@test.idempotent_id('8b49ecc3-4694-4482-9b2d-dc928576e161')
@decorators.idempotent_id('8b49ecc3-4694-4482-9b2d-dc928576e161')
def test_update_pool_missing_session_persistence(self):
"""Test update pool with missing session persistence"""
new_pool = self._prepare_and_create_pool()
@ -520,7 +521,7 @@ class TestPools(base.BaseTestCase):
self.assertAlmostEqual(sess_pers, pool.get('session_persistence'))
@test.attr(type='negative')
@test.idempotent_id('23a9dbaf-105b-450e-95cf-050203b28366')
@decorators.idempotent_id('23a9dbaf-105b-450e-95cf-050203b28366')
def test_update_pool_invalid_name(self):
"""Test update pool with invalid name
@ -531,7 +532,7 @@ class TestPools(base.BaseTestCase):
new_pool.get('id'), name='n' * 256)
@test.attr(type='negative')
@test.idempotent_id('efeeb827-5cb0-4349-8272-b2dbcbf42d22')
@decorators.idempotent_id('efeeb827-5cb0-4349-8272-b2dbcbf42d22')
def test_update_pool_invalid_desc(self):
"""Test update pool with invalid desc
@ -543,7 +544,7 @@ class TestPools(base.BaseTestCase):
description='d' * 256)
@test.attr(type='negative')
@test.idempotent_id('a91c1380-0d36-43a1-bf64-8fe9078e2bbd')
@decorators.idempotent_id('a91c1380-0d36-43a1-bf64-8fe9078e2bbd')
def test_update_pool_invalid_admin_state_up(self):
"""Test update pool with an invalid admin_state_up"""
new_pool = self._prepare_and_create_pool()
@ -551,7 +552,7 @@ class TestPools(base.BaseTestCase):
new_pool.get('id'), admin_state_up='hello')
@test.attr(type='negative')
@test.idempotent_id('5d45b0e3-7d7f-4523-8504-9ccfd6ecec81')
@decorators.idempotent_id('5d45b0e3-7d7f-4523-8504-9ccfd6ecec81')
def test_update_pool_invalid_session_persistence(self):
"""Test update pool with an invalid session pers. field"""
new_pool = self._prepare_and_create_pool()
@ -560,7 +561,7 @@ class TestPools(base.BaseTestCase):
session_persistence={'type': 'Hello'})
@test.attr(type='smoke')
@test.idempotent_id('3ddec9b1-fc7a-4073-9451-e73316237763')
@decorators.idempotent_id('3ddec9b1-fc7a-4073-9451-e73316237763')
def test_update_pool_empty_name(self):
"""Test update pool with empty name"""
new_pool = self._prepare_and_create_pool()
@ -569,7 +570,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(pool.get('name'), "")
@test.attr(type='smoke')
@test.idempotent_id('171e1153-9898-467d-80ed-d6deed430342')
@decorators.idempotent_id('171e1153-9898-467d-80ed-d6deed430342')
def test_update_pool_empty_description(self):
"""Test update pool with empty description"""
new_pool = self._prepare_and_create_pool()
@ -579,7 +580,7 @@ class TestPools(base.BaseTestCase):
self.assertEqual(pool.get('description'), "")
@test.attr(type='negative')
@test.idempotent_id('397bd0ec-0e82-4421-a672-b7a2c4e84b56')
@decorators.idempotent_id('397bd0ec-0e82-4421-a672-b7a2c4e84b56')
def test_update_pool_empty_admin_state_up(self):
"""Test update pool with empty admin state up"""
new_pool = self._prepare_and_create_pool()
@ -587,7 +588,7 @@ class TestPools(base.BaseTestCase):
new_pool.get('id'), admin_state_up="")
@test.attr(type='negative')
@test.idempotent_id('f68a6ed5-4577-44f1-81c8-6dd30d8a874d')
@decorators.idempotent_id('f68a6ed5-4577-44f1-81c8-6dd30d8a874d')
def test_update_pool_empty_session_persistence(self):
"""Test update pool with empty session persistence field"""
new_pool = self._prepare_and_create_pool()
@ -596,7 +597,7 @@ class TestPools(base.BaseTestCase):
session_persistence="")
@test.attr(type='negative')
@test.idempotent_id('d8027ea2-6912-41f7-bf5a-f2eb3d0901b1')
@decorators.idempotent_id('d8027ea2-6912-41f7-bf5a-f2eb3d0901b1')
def test_update_pool_invalid_attribute(self):
"""Test update pool with an invalid attribute"""
new_pool = self._prepare_and_create_pool()
@ -604,7 +605,7 @@ class TestPools(base.BaseTestCase):
new_pool.get('id'), lb_algorithm='ROUNDED')
@test.attr(type='negative')
@test.idempotent_id('a58822ee-56fc-4b96-bb28-47cd07ae9cb8')
@decorators.idempotent_id('a58822ee-56fc-4b96-bb28-47cd07ae9cb8')
def test_update_pool_incorrect_attribute(self):
"""Test update a pool with an extra, incorrect field"""
new_pool = self._prepare_and_create_pool()
@ -612,7 +613,7 @@ class TestPools(base.BaseTestCase):
new_pool.get('id'), protocol='HTTPS')
@test.attr(type='smoke')
@test.idempotent_id('4839f03e-2439-4619-8546-411ca883066d')
@decorators.idempotent_id('4839f03e-2439-4619-8546-411ca883066d')
def test_delete_pool(self):
"""Test delete pool"""
new_pool = self._prepare_and_create_pool(cleanup=False)
@ -623,7 +624,7 @@ class TestPools(base.BaseTestCase):
new_pool.get('id'))
@test.attr(type='smoke')
@test.idempotent_id('cd30962a-12ce-4ae9-89de-db007aebbd9f')
@decorators.idempotent_id('cd30962a-12ce-4ae9-89de-db007aebbd9f')
def test_delete_invalid_pool(self):
"""Test delete pool that doesn't exist"""
new_pool = self._prepare_and_create_pool(cleanup=False)

View File

@ -18,6 +18,7 @@ import testtools
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -140,7 +141,7 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
sg = sg_client.show_security_group(security_group_id)
return sg.get('security_group', sg)
@test.idempotent_id('825d0270-6649-44f2-ac0c-a3b5566d0d2a')
@decorators.idempotent_id('825d0270-6649-44f2-ac0c-a3b5566d0d2a')
def test_admin_can_crud_policy(self):
sg_desc = "crud security-group-policy"
sg_client = self.cmgr_adm.security_groups_client
@ -155,14 +156,14 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
sg_list = sg_list.get('security_groups', sg_list)
self.assertEqual(len(sg_list), 0)
@test.idempotent_id('809d72be-c2d8-4e32-b538-09a5003630c0')
@decorators.idempotent_id('809d72be-c2d8-4e32-b538-09a5003630c0')
def test_admin_can_create_policy_for_tenant(self):
tenant_id = self.cmgr_alt.networks_client.tenant_id
sg = self.create_security_group_policy(self.cmgr_adm,
tenant_id=tenant_id)
self.assertEqual(self.default_policy_id, sg.get('policy'))
@test.idempotent_id('1ab540b0-2a56-46cd-bbaa-607a655b4688')
@decorators.idempotent_id('1ab540b0-2a56-46cd-bbaa-607a655b4688')
def test_admin_can_create_provider_policy(self):
tenant_id = self.cmgr_pri.networks_client.tenant_id
sg = self.create_security_group_policy(self.cmgr_adm,
@ -171,14 +172,14 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
self.assertEqual(self.default_policy_id, sg.get('policy'))
self.assertEqual(sg.get('provider'), True)
@test.idempotent_id('1d31ea7a-37f1-40db-b917-4acfbf565ae2')
@decorators.idempotent_id('1d31ea7a-37f1-40db-b917-4acfbf565ae2')
def test_tenant_has_default_policy(self):
sg = self.get_default_security_group_policy(self.cmgr_pri)
self.assertEqual(self.default_policy_id, sg.get('policy'))
@testtools.skipIf(not CONF.nsxv.alt_policy_id.startswith('policy-'),
"nsxv.alt_policy_id not defined.")
@test.idempotent_id('6784cf25-6b50-4349-b96b-85076111dbf4')
@decorators.idempotent_id('6784cf25-6b50-4349-b96b-85076111dbf4')
def test_admin_change_tenant_policy(self):
tenant_id = self.cmgr_alt.networks_client.tenant_id
sg = self.create_security_group_policy(tenant_id=tenant_id)
@ -189,7 +190,7 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
@testtools.skipIf(not CONF.nsxv.allow_tenant_rules_with_policy,
"skip because tenant is not allowed to create SG.")
@test.idempotent_id('4abf29bd-22ae-46b4-846b-e7c28f318159')
@decorators.idempotent_id('4abf29bd-22ae-46b4-846b-e7c28f318159')
def test_tenant_create_security_group_if_allowed(self):
"""test if allow_tenant_rules_with_policy=True"""
sg_client = self.cmgr_pri.security_groups_client
@ -198,7 +199,7 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
self.assertEqual(sg.get('name'), sg_name)
@test.attr(type=['negative'])
@test.idempotent_id('5099604c-637a-4b25-8756-c6fc0929f963')
@decorators.idempotent_id('5099604c-637a-4b25-8756-c6fc0929f963')
def test_add_rules_to_policy_disallowed(self):
tenant_id = self.cmgr_pri.networks_client.tenant_id
sg = self.create_security_group_policy(self.cmgr_adm,
@ -208,14 +209,14 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
cmgr=self.cmgr_adm, tenant_id=tenant_id)
@test.attr(type=['negative'])
@test.idempotent_id('9a604036-ace6-4ced-92b8-be732eee310f')
@decorators.idempotent_id('9a604036-ace6-4ced-92b8-be732eee310f')
def test_cannot_create_policy_with_invalid_policy_id(self):
self.assertRaises(exceptions.BadRequest,
self.create_security_group_policy,
self.cmgr_adm, "invalid-policy-id")
@test.attr(type=['negative'])
@test.idempotent_id('4d383d3c-f1e6-47e3-906e-3c171146965a')
@decorators.idempotent_id('4d383d3c-f1e6-47e3-906e-3c171146965a')
def test_tenant_cannot_delete_its_policy(self):
tenant_cmgr = self.cmgr_alt
tenant_id = tenant_cmgr.networks_client.tenant_id
@ -228,7 +229,7 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
tenant_sg_client, sg_id)
@test.attr(type=['negative'])
@test.idempotent_id('154985cd-26b2-468d-af6d-b6144ef2d378')
@decorators.idempotent_id('154985cd-26b2-468d-af6d-b6144ef2d378')
def test_tenant_cannot_update_its_policy(self):
tenant_cmgr = self.cmgr_alt
tenant_id = tenant_cmgr.networks_client.tenant_id
@ -240,7 +241,7 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
sg_id, self.alt_policy_id, self.cmgr_alt)
@test.attr(type=['negative'])
@test.idempotent_id('d6d8c918-d488-40c4-83dc-8ce1a565e54f')
@decorators.idempotent_id('d6d8c918-d488-40c4-83dc-8ce1a565e54f')
def test_tenant_cannot_create_policy(self):
self.assertRaises(exceptions.Forbidden,
self.create_security_group_policy,
@ -249,7 +250,7 @@ class AdminPolicyTest(base.BaseAdminNetworkTest):
@test.attr(type=['negative'])
@testtools.skipIf(CONF.nsxv.allow_tenant_rules_with_policy,
"skip because tenant is allowed to create SG.")
@test.idempotent_id('82aa02ee-8008-47a9-90ea-ba7840bfb932')
@decorators.idempotent_id('82aa02ee-8008-47a9-90ea-ba7840bfb932')
def test_tenant_cannot_create_security_group(self):
"""Only valid if allow_tenant_rules_with_policy=True

View File

@ -13,11 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest import config
from tempest import test
from tempest.lib import decorators
from vmware_nsx_tempest.tests.nsxv.api import base_provider as base
@ -63,7 +62,7 @@ class DnsSearchDomainTest(base.BaseAdminNetworkTest):
subnet = resp.get('subnet', resp)
return (network, subnet)
@test.idempotent_id('879d620c-535c-467f-9e62-f2bf3178b5b7')
@decorators.idempotent_id('879d620c-535c-467f-9e62-f2bf3178b5b7')
def test_dns_search_domain_crud_operations(self):
"""perform CRUD operation on subnet with dns_search_domain."""
network_name = data_utils.rand_name('crud-search-domain')
@ -86,13 +85,13 @@ class DnsSearchDomainTest(base.BaseAdminNetworkTest):
name=new_name)['subnets']
self.assertEqual(0, len(subnet_list))
@test.idempotent_id('40facdd9-40c0-48a1-bff1-57ba0ed0dc49')
@decorators.idempotent_id('40facdd9-40c0-48a1-bff1-57ba0ed0dc49')
def test_list_search_domain(self):
subnet_list = self.list_subnets(client=self.subnets_client,
subnet_id=self.tenant_subnet['id'])
self.assertEqual(1, len(subnet_list))
@test.idempotent_id('8d023934-b0c8-4588-b48b-17db047a4d8b')
@decorators.idempotent_id('8d023934-b0c8-4588-b48b-17db047a4d8b')
def test_show_search_domain(self):
resp = self.show_subnet(self.tenant_subnet['id'],
client=self.subnets_client)
@ -100,7 +99,7 @@ class DnsSearchDomainTest(base.BaseAdminNetworkTest):
self.assertEqual(self.dns_search_domain,
subnet['dns_search_domain'])
@test.idempotent_id('2b5990bf-d904-4e18-b197-93f3c061c260')
@decorators.idempotent_id('2b5990bf-d904-4e18-b197-93f3c061c260')
def test_update_subnet_search_domain_field(self):
"""attach 2nd subnet to network and update its dns_search_domain."""
subnet_name = data_utils.rand_name('upd-search-domain')

View File

@ -17,6 +17,7 @@ from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -50,7 +51,7 @@ class DnsSearchDoaminsNegativeTest(base.BaseAdminNetworkTest):
return (network, subnet)
@test.attr(type=['negative'])
@test.idempotent_id('11bdc214-10d7-4926-8f49-2da3d8719143')
@decorators.idempotent_id('11bdc214-10d7-4926-8f49-2da3d8719143')
def test_create_dns_search_domain_negative(self):
self.assertRaises(exceptions.BadRequest,
self.create_network_with_bad_dns_search_domain)

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from tempest import test
from oslo_log import log as logging
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
import test_subnets as SNET
LOG = logging.getLogger(__name__)
@ -48,7 +48,7 @@ class FlatNetworksTestJSON(SNET.SubnetTestJSON):
self.addCleanup(self._try_delete_network, network['id'])
return network
@test.idempotent_id('dc2f2f46-0577-4e2a-b35d-3c8c8bbce5bf')
@decorators.idempotent_id('dc2f2f46-0577-4e2a-b35d-3c8c8bbce5bf')
def test_create_network(self):
# Create a network as an admin user specifying the
# flat network type attribute
@ -57,7 +57,7 @@ class FlatNetworksTestJSON(SNET.SubnetTestJSON):
self.assertIsNotNone(network['id'])
self.assertEqual(network.get('provider:network_type'), 'flat')
@test.idempotent_id('777fc335-b26c-42ea-9759-c71dff2ce1c6')
@decorators.idempotent_id('777fc335-b26c-42ea-9759-c71dff2ce1c6')
def test_update_network(self):
# Update flat network as an admin user specifying the
# flat network attribute
@ -80,7 +80,7 @@ class FlatNetworksTestJSON(SNET.SubnetTestJSON):
self.assertEqual(updated_network['subnets'], network['subnets'])
self._delete_network(network['id'])
@test.idempotent_id('1dfc1c11-e838-464c-85b2-ed5e4c477c64')
@decorators.idempotent_id('1dfc1c11-e838-464c-85b2-ed5e4c477c64')
def test_list_networks(self):
# Create flat network
network = self._create_network(shared=True)
@ -95,7 +95,7 @@ class FlatNetworksTestJSON(SNET.SubnetTestJSON):
network_list = [net['id'] for net in body['networks']]
self.assertNotIn(network['id'], network_list)
@test.idempotent_id('b5649fe2-a214-4105-8053-1825a877c45b')
@decorators.idempotent_id('b5649fe2-a214-4105-8053-1825a877c45b')
def test_show_network_attributes(self):
# Create flat network
network = self._create_network(shared=True)

View File

@ -130,7 +130,7 @@ class L2GatewayTest(base.BaseAdminNetworkTest):
"l2gw name=%s, id=%s not deleted." %
(_name2, _res_new['id']))
@test.idempotent_id('8b45a9a5-468b-4317-983d-7cceda367074')
@decorators.idempotent_id('8b45a9a5-468b-4317-983d-7cceda367074')
def test_csuld_single_device_interface_without_vlan(self):
"""Single device/interface/vlan
@ -144,7 +144,7 @@ class L2GatewayTest(base.BaseAdminNetworkTest):
self.pop_segmentation_id(_devices, 0, 0)
self.do_csuld_single_device_interface_vlan(_name, _devices)
@test.idempotent_id('af57cf56-a169-4d88-b32e-7f49365ce407')
@decorators.idempotent_id('af57cf56-a169-4d88-b32e-7f49365ce407')
def test_csuld_single_device_interface_vlan(self):
"""Single device/interface/vlan
@ -157,7 +157,7 @@ class L2GatewayTest(base.BaseAdminNetworkTest):
_devices = base_l2gw.get_l2gw_body(dev_profile)
self.do_csuld_single_device_interface_vlan(_name, _devices)
@test.idempotent_id('cb59145e-3d2b-46b7-8f7b-f30f794a4d51')
@decorators.idempotent_id('cb59145e-3d2b-46b7-8f7b-f30f794a4d51')
@decorators.skip_because(bug="1559913")
def test_csuld_single_device_interface_mvlan(self):
dev_profile = self.getattr_or_skip_test("device_multiple_vlans")
@ -166,7 +166,7 @@ class L2GatewayTest(base.BaseAdminNetworkTest):
self.do_csuld_single_device_interface_vlan(_name, _devices)
@decorators.skip_because(bug="1559913")
@test.idempotent_id('5522bdfe-ebe8-4eea-81b4-f4075bb608cf')
@decorators.idempotent_id('5522bdfe-ebe8-4eea-81b4-f4075bb608cf')
def test_csuld_single_device_minterface_mvlan_type1(self):
# NSX-v does not support multiple interfaces
dev_profile = self.getattr_or_skip_test(
@ -176,7 +176,7 @@ class L2GatewayTest(base.BaseAdminNetworkTest):
self.do_csuld_single_device_interface_vlan(_name, _devices)
@decorators.skip_because(bug="1559913")
@test.idempotent_id('5bec26e0-855f-4537-b31b-31663a820ddb')
@decorators.idempotent_id('5bec26e0-855f-4537-b31b-31663a820ddb')
def test_csuld_single_device_minterface_mvlan_type2(self):
# NSX-v does not support multiple interfaces
dev_profile = self.getattr_or_skip_test(

View File

@ -186,7 +186,7 @@ class L2GatewayConnectionTest(base.BaseAdminNetworkTest):
self.assertEmpty(_res_lst,
"l2gwc id=%s not deleted." % (_res_new['id']))
@test.idempotent_id('6628c662-b997-46cd-8266-77f329bda062')
@decorators.idempotent_id('6628c662-b997-46cd-8266-77f329bda062')
def test_csuld_single_device_interface_without_vlan(self):
"""Single device/interface/vlan
@ -205,7 +205,7 @@ class L2GatewayConnectionTest(base.BaseAdminNetworkTest):
self.assertEqual(_seg_new, str(_seg_id))
self.do_suld_l2gw_connection(_res_new)
@test.idempotent_id('222104e3-1260-42c1-bdf6-536c1141387c')
@decorators.idempotent_id('222104e3-1260-42c1-bdf6-536c1141387c')
def test_csuld_single_device_interface_vlan(self):
"""Single device/interface/vlan
@ -224,7 +224,7 @@ class L2GatewayConnectionTest(base.BaseAdminNetworkTest):
self.do_suld_l2gw_connection(_res_new)
@decorators.skip_because(bug="1559913")
@test.idempotent_id('1875eca7-fde9-49ba-be21-47a8cc41f2e5')
@decorators.idempotent_id('1875eca7-fde9-49ba-be21-47a8cc41f2e5')
def test_csuld_single_device_interface_mvlan_type2(self):
dev_profile = self.getattr_or_skip_test("device_multiple_vlans")
_name = data_utils.rand_name('l2gwc-2v1')
@ -238,7 +238,7 @@ class L2GatewayConnectionTest(base.BaseAdminNetworkTest):
self.do_suld_l2gw_connection(_res_new)
@decorators.skip_because(bug="1559913")
@test.idempotent_id('53755cb0-fdca-4ee7-8e43-a9b8a9d6d90a')
@decorators.idempotent_id('53755cb0-fdca-4ee7-8e43-a9b8a9d6d90a')
def test_csuld_single_device_minterface_mvlan_type1(self):
# NSX-v does not support multiple interfaces
dev_profile = self.getattr_or_skip_test(
@ -250,7 +250,7 @@ class L2GatewayConnectionTest(base.BaseAdminNetworkTest):
self.do_suld_l2gw_connection(_res_new)
@decorators.skip_because(bug="1559913")
@test.idempotent_id('723b0b78-35d7-4774-89c1-ec73797a1fe3')
@decorators.idempotent_id('723b0b78-35d7-4774-89c1-ec73797a1fe3')
def test_csuld_single_device_minterface_mvlan_type2(self):
dev_profile = self.getattr_or_skip_test(
"multiple_interfaces_multiple_vlans")

View File

@ -210,13 +210,13 @@ class MultipleTransportZonesTest(base.BaseAdminNetworkTest):
router = self.create_router_and_add_interfaces(router_type, nets)
self.clear_router_gateway_and_interfaces(router, nets)
@test.idempotent_id('39bc7909-912c-4e16-8246-773ae6a40ba4')
@decorators.idempotent_id('39bc7909-912c-4e16-8246-773ae6a40ba4')
def test_mtz_network_crud_operations(self):
scope_id_list = self.get_all_scope_id_list(with_default_scope=False)
s_id = scope_id_list[0]
self.create_show_update_delete_mtz_network_subnet(s_id)
@test.idempotent_id('4e1717d6-df39-4539-99da-df23814cfe14')
@decorators.idempotent_id('4e1717d6-df39-4539-99da-df23814cfe14')
def test_mtz_overlay_network(self):
"""overlay subnets with the same TZ"""
scope_id_list = self.get_all_scope_id_list(with_default_scope=True)
@ -227,7 +227,7 @@ class MultipleTransportZonesTest(base.BaseAdminNetworkTest):
nets[net_id] = (s_id, network, subnet)
self.delete_networks(nets)
@test.idempotent_id('6ecf67fc-4396-41d9-9d84-9d8c936dcb8f')
@decorators.idempotent_id('6ecf67fc-4396-41d9-9d84-9d8c936dcb8f')
def test_multiple_mtz_overlay_network(self):
"""overlay subnets from multiple TZs."""
scope_id_list = self.get_all_scope_id_list(with_default_scope=True)
@ -243,7 +243,7 @@ class MultipleTransportZonesTest(base.BaseAdminNetworkTest):
break
self.delete_networks(nets)
@test.idempotent_id('e7e0fc6c-41fd-44bc-b9b1-4501ce618738')
@decorators.idempotent_id('e7e0fc6c-41fd-44bc-b9b1-4501ce618738')
def test_mtz_non_overlay_network(self):
"""non-overlay subnets from one TZ."""
scope_id_list = self.get_all_scope_id_list(with_default_scope=False)
@ -255,7 +255,7 @@ class MultipleTransportZonesTest(base.BaseAdminNetworkTest):
nets[net_id] = (s_id, network, subnet)
self.delete_networks(nets)
@test.idempotent_id('b1cb5815-6380-421f-beef-ae3cb148cef4')
@decorators.idempotent_id('b1cb5815-6380-421f-beef-ae3cb148cef4')
def test_multiple_mtz_non_overlay_network(self):
"""non-overlay subnets from multiple TZs."""
scope_id_list = self.get_all_scope_id_list(with_default_scope=True)
@ -267,39 +267,39 @@ class MultipleTransportZonesTest(base.BaseAdminNetworkTest):
nets[net_id] = (s_id, network, subnet)
self.delete_networks(nets)
@test.idempotent_id('006a1a4b-4b63-4663-8baa-affe5df62b11')
@decorators.idempotent_id('006a1a4b-4b63-4663-8baa-affe5df62b11')
def test_shared_router_with_multiple_mtz_networks(self):
"""shared router attached with multiple TZs."""
self._test_router_with_multiple_mtz_networks(
router_type='shared')
@test.idempotent_id('b160d1dc-0332-4d1a-b2a0-c11f57fe4dd9')
@decorators.idempotent_id('b160d1dc-0332-4d1a-b2a0-c11f57fe4dd9')
def test_exclusive_router_with_multiple_mtz_networks(self):
"""exclusive router attached with multiple TZs."""
self._test_router_with_multiple_mtz_networks(
router_type='exclusive')
@decorators.skip_because(bug="1592174")
@test.idempotent_id('2c46290c-8a08-4037-aada-f96fd34b3260')
@decorators.idempotent_id('2c46290c-8a08-4037-aada-f96fd34b3260')
def test_distributed_router_with_multiple_mtz_networks(self):
"""exclusive router attached with multiple TZs."""
self._test_router_with_multiple_mtz_networks(
router_type='distributed')
@test.idempotent_id('be8f7320-2246-43f3-a826-768f763c9bd0')
@decorators.idempotent_id('be8f7320-2246-43f3-a826-768f763c9bd0')
def test_shared_router_with_network_and_mtz_networks(self):
"""router attached with multiple TZs and one tenant network."""
self._test_router_with_network_and_mtz_networks(
router_type='shared')
@test.idempotent_id('3cb27410-67e2-4e82-95c7-3dbbe9a8c64b')
@decorators.idempotent_id('3cb27410-67e2-4e82-95c7-3dbbe9a8c64b')
def test_exclusive_router_with_network_and_mtz_networks(self):
"""router attached with multiple TZs and one tenant network."""
self._test_router_with_network_and_mtz_networks(
router_type='exclusive')
@decorators.skip_because(bug="1592174")
@test.idempotent_id('e7c066d5-c2f1-41e7-bc86-9b6295461903')
@decorators.idempotent_id('e7c066d5-c2f1-41e7-bc86-9b6295461903')
def test_distributed_router_with_network_and_mtz_networks(self):
"""router attached with multiple TZs and one tenant network."""
self._test_router_with_network_and_mtz_networks(

View File

@ -16,6 +16,7 @@
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest.api.network import base
@ -49,7 +50,7 @@ class MultipleTransportZonesNegativeTest(base.BaseAdminNetworkTest):
return network
@test.attr(type=['negative'])
@test.idempotent_id('8aff7abc-eacd-409c-8278-4cb7bde6da84')
@decorators.idempotent_id('8aff7abc-eacd-409c-8278-4cb7bde6da84')
def test_create_mtz_networks(self):
# Multiple Transport Zone use provier network to implement
# its TZ allocation.

View File

@ -19,6 +19,7 @@ import re
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -117,7 +118,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
return sg_list[0]
@test.attr(type='nsxv')
@test.idempotent_id('5480d96e-287b-4e59-9ee3-d1bcf451dfc9')
@decorators.idempotent_id('5480d96e-287b-4e59-9ee3-d1bcf451dfc9')
def test_provider_security_group_crud(self):
sg_desc = "crud provider-security-group"
sg_client = self.cmgr_adm.security_groups_client
@ -133,7 +134,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
self.assertEqual(len(sg_list), 0)
@test.attr(type='nsxv')
@test.idempotent_id('6e48a2ed-8035-4986-a5c6-903c49ae26a2')
@decorators.idempotent_id('6e48a2ed-8035-4986-a5c6-903c49ae26a2')
def test_admin_can_create_provider_security_group_for_tenant(self):
project_id = self.cmgr_alt.networks_client.tenant_id
sg = self.create_security_provider_group(self.cmgr_adm,
@ -142,14 +143,14 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
self.assertEqual(True, sg.get('provider'))
@test.attr(type='nsxv')
@test.idempotent_id('95ce76a4-a125-411b-95d7-7a66addf0efc')
@decorators.idempotent_id('95ce76a4-a125-411b-95d7-7a66addf0efc')
def test_tenant_provider_sec_group_with_no_rules(self):
sg = self.create_security_provider_group(self.cmgr_adm,
provider=True)
self.assertEqual([], sg.get('security_group_rules'))
@test.attr(type='nsxv')
@test.idempotent_id('5e6237ca-033a-4bee-b5fb-8f225ed00b0c')
@decorators.idempotent_id('5e6237ca-033a-4bee-b5fb-8f225ed00b0c')
def test_admin_can_create_security_group_rule(self):
sg_client = self.cmgr_adm.security_groups_client
sg = self.create_security_provider_group(self.cmgr_adm,
@ -168,7 +169,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
[0]['protocol'])
@test.attr(type='nsxv')
@test.idempotent_id('18737e13-4bca-4f62-b993-f021795a7dbf')
@decorators.idempotent_id('18737e13-4bca-4f62-b993-f021795a7dbf')
def test_provider_security_group_rule_at_beckend(self):
sg = self.create_security_provider_group(self.cmgr_adm, provider=True)
sg_id = sg.get('id')
@ -188,7 +189,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
"security Group applied")
@test.attr(type='nsxv')
@test.idempotent_id('b179a32b-e012-43ec-9d2d-f9e5801c97c6')
@decorators.idempotent_id('b179a32b-e012-43ec-9d2d-f9e5801c97c6')
def test_provider_security_group_predence_at_beckend(self):
sg = self.create_security_provider_group(self.cmgr_adm, provider=True)
sg_name = sg.get('name')
@ -207,7 +208,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
self.assertEqual(0, count)
@test.attr(type='nsxv')
@test.idempotent_id('38b21ea8-7822-4b1a-b923-cd00fa57ca4d')
@decorators.idempotent_id('38b21ea8-7822-4b1a-b923-cd00fa57ca4d')
def test_provider_security_group_at_port_level(self):
sg = self.create_security_provider_group(self.cmgr_adm,
provider=True)
@ -232,7 +233,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
net_client.delete_network(network['network']['id'])
@test.attr(type='nsxv')
@test.idempotent_id('b1e904fb-a70a-400e-a757-d772aab152eb')
@decorators.idempotent_id('b1e904fb-a70a-400e-a757-d772aab152eb')
def test_provider_sec_group_with_multiple_rules(self):
project_id = self.cmgr_adm.networks_client.tenant_id
sg = self.create_security_provider_group(self.cmgr_adm,
@ -250,7 +251,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
self.assertNotEqual(sg_rule1_id, sg_rule2_id)
@test.attr(type='nsxv')
@test.idempotent_id('edd94f8c-53b7-4286-9350-0ddc0af3213b')
@decorators.idempotent_id('edd94f8c-53b7-4286-9350-0ddc0af3213b')
def test_clear_provider_sec_group_from_port(self):
project_id = self.cmgr_adm.networks_client.tenant_id
self.create_security_provider_group(self.cmgr_adm,
@ -275,7 +276,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
net_client.delete_network(network['network']['id'])
@test.attr(type='nsxv')
@test.idempotent_id('6c1e6728-b84a-47f9-9021-ff3e3f88a933')
@decorators.idempotent_id('6c1e6728-b84a-47f9-9021-ff3e3f88a933')
def test_tenant_cannot_delete_admin_provider_security_group(self):
project_id = self.cmgr_adm.networks_client.tenant_id
sg = self.create_security_provider_group(self.cmgr_adm,
@ -291,7 +292,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
pass
@test.attr(type='nsxv')
@test.idempotent_id('94e06ee2-82ed-4203-ac9b-421a298bdba4')
@decorators.idempotent_id('94e06ee2-82ed-4203-ac9b-421a298bdba4')
def test_tenant_cannot_create_provider_sec_group(self):
project_id = self.cmgr_alt.networks_client.tenant_id
self.assertRaises(exceptions.Forbidden,
@ -301,7 +302,7 @@ class ProviderSecGroup(base.BaseAdminNetworkTest):
LOG.debug("Non-Admin Tenant cannot create provider sec group")
@test.attr(type='nsxv')
@test.idempotent_id('01f00a36-7576-40e0-a397-b43860a9c122')
@decorators.idempotent_id('01f00a36-7576-40e0-a397-b43860a9c122')
def test_update_port_with_psg(self):
net_client = self.cmgr_adm.networks_client
body = {'name': 'provider-network'}

View File

@ -21,6 +21,7 @@ from oslo_log import log as logging
from tempest.api.network import base_routers as base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib.services import network as net_clients
from tempest import test
from vmware_nsx_tempest.services import nsxv_client
@ -165,40 +166,40 @@ class RouterSizeBaseTest(base.BaseRouterTest):
class CompactRouterTest(RouterSizeBaseTest):
@test.attr(type='nsxv')
@test.idempotent_id('d75fbcd5-c8cb-49ea-a868-ada12fd8c87f')
@decorators.idempotent_id('d75fbcd5-c8cb-49ea-a868-ada12fd8c87f')
def test_create_update_delete_compact_router(self):
self.do_create_update_delete_router_with_size('compact')
class LargeRouterTest(RouterSizeBaseTest):
@test.attr(type='nsxv')
@test.idempotent_id('da00c74f-81e6-4ef9-8aca-8e0345b376e9')
@decorators.idempotent_id('da00c74f-81e6-4ef9-8aca-8e0345b376e9')
def test_create_update_delete_large_router(self):
self.do_create_update_delete_router_with_size('large', 20.0)
class XlargeRouterTest(RouterSizeBaseTest):
@test.attr(type='nsxv')
@test.idempotent_id('091dad07-6044-4ca3-b16c-54a3ef92254b')
@decorators.idempotent_id('091dad07-6044-4ca3-b16c-54a3ef92254b')
def test_create_update_delete_xlarge_router(self):
self.do_create_update_delete_router_with_size('xlarge', 20.0)
class QuadlargeRouterTest(RouterSizeBaseTest):
@test.attr(type='nsxv')
@test.idempotent_id('0f69bf8a-4b06-47ac-a3f7-eedba95fd395')
@decorators.idempotent_id('0f69bf8a-4b06-47ac-a3f7-eedba95fd395')
def test_create_update_delete_quadlarge_router(self):
self.do_create_update_delete_router_with_size('quadlarge', 30.0)
class RouterSizeChangeTest(RouterSizeBaseTest):
@test.idempotent_id('3201b0a9-702c-46cf-8512-f166a6ea5109')
@decorators.idempotent_id('3201b0a9-702c-46cf-8512-f166a6ea5109')
def test_router_size_1sizeup_change(self):
self.do_router_size_change_test(
'compact',
('large', 'xlarge', 'quadlarge'))
@test.idempotent_id('c7ee9f78-4938-4bdd-b39c-1d736d41a84b')
@decorators.idempotent_id('c7ee9f78-4938-4bdd-b39c-1d736d41a84b')
def test_router_size_outofseq_change(self):
self.do_router_size_change_test(
"large",

View File

@ -18,6 +18,7 @@ import re
from tempest.api.network import base_routers as base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv_client
@ -54,7 +55,7 @@ class ExcRouterTest(base.BaseRouterTest):
manager_ip, CONF.nsxv.user, CONF.nsxv.password)
@test.attr(type='nsxv')
@test.idempotent_id('ac1639a0-2a8d-4c68-bccd-54849fd45f86')
@decorators.idempotent_id('ac1639a0-2a8d-4c68-bccd-54849fd45f86')
def test_create_exc_router(self):
"""
Test create an exclusive router. After creation, check nsx_v
@ -74,7 +75,7 @@ class ExcRouterTest(base.BaseRouterTest):
self.assertEqual(exc_edge['edgeType'], 'gatewayServices')
@test.attr(type='nsxv')
@test.idempotent_id('c4b94988-0bc7-11e5-9203-0050568833db')
@decorators.idempotent_id('c4b94988-0bc7-11e5-9203-0050568833db')
def test_update_exc_router(self):
"""
Test update an exclusive router
@ -92,7 +93,7 @@ class ExcRouterTest(base.BaseRouterTest):
self.assertEqual(update_body['router']['name'], updated_name)
@test.attr(type='nsxv')
@test.idempotent_id('a0ff5afa-0bcc-11e5-9203-0050568833db')
@decorators.idempotent_id('a0ff5afa-0bcc-11e5-9203-0050568833db')
def test_list_show_exc_router(self):
"""
Test list and show exclusive router.
@ -114,7 +115,7 @@ class ExcRouterTest(base.BaseRouterTest):
self.assertIn(router['router']['id'], routers_list)
@test.attr(type='nsxv')
@test.idempotent_id('adef8d1e-0bce-11e5-9203-0050568833db')
@decorators.idempotent_id('adef8d1e-0bce-11e5-9203-0050568833db')
def test_delete_exc_router(self):
"""
Test create, update, and delete an exclusive router

View File

@ -16,7 +16,6 @@
import base_provider as base
from tempest.common import custom_matchers
from tempest import config
from tempest import test
import netaddr
from oslo_log import log as logging
@ -239,7 +238,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
self._compare_resource_attrs(subnet, compare_args)
self._delete_network(net_id)
@test.idempotent_id('2ecbc3ab-93dd-44bf-a827-95beeb008e9a')
@decorators.idempotent_id('2ecbc3ab-93dd-44bf-a827-95beeb008e9a')
def test_create_update_delete_network_subnet(self):
# Create a network
network = self._create_network(_auto_clean_up=True)
@ -260,7 +259,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
self.assertEqual(updated_subnet['name'], new_name)
self._delete_network(net_id)
@test.idempotent_id('a2cf6398-aece-4256-88a6-0dfe8aa44975')
@decorators.idempotent_id('a2cf6398-aece-4256-88a6-0dfe8aa44975')
def test_show_network(self):
# Verify the details of a network
body = self.show_network(self.network['id'])
@ -268,7 +267,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
for key in ['id', 'name']:
self.assertEqual(network[key], self.network[key])
@test.idempotent_id('5b42067d-4b9d-4f04-bb6a-adb9756ebe0c')
@decorators.idempotent_id('5b42067d-4b9d-4f04-bb6a-adb9756ebe0c')
def test_show_network_fields(self):
# Verify specific fields of a network
fields = ['id', 'name']
@ -278,7 +277,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
for field_name in fields:
self.assertEqual(network[field_name], self.network[field_name])
@test.idempotent_id('324be3c2-457d-4e21-b0b3-5106bbbf1a28')
@decorators.idempotent_id('324be3c2-457d-4e21-b0b3-5106bbbf1a28')
def test_list_networks(self):
# Verify the network exists in the list of all networks
body = self.list_networks()
@ -286,7 +285,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
if network['id'] == self.network['id']]
self.assertNotEmpty(networks, "Created network not found in the list")
@test.idempotent_id('3a934a8d-6b52-427e-af49-3dfdd224fdeb')
@decorators.idempotent_id('3a934a8d-6b52-427e-af49-3dfdd224fdeb')
def test_list_networks_fields(self):
# Verify specific fields of the networks
fields = ['id', 'name']
@ -296,7 +295,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
for network in networks:
self.assertEqual(sorted(network.keys()), sorted(fields))
@test.idempotent_id('5f6616c4-bfa7-4308-8eab-f45d75c94c6d')
@decorators.idempotent_id('5f6616c4-bfa7-4308-8eab-f45d75c94c6d')
def test_show_subnet(self):
# Verify the details of a subnet
body = self.show_subnet(self.subnet['id'])
@ -306,7 +305,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
self.assertIn(key, subnet)
self.assertEqual(subnet[key], self.subnet[key])
@test.idempotent_id('2f326955-551e-4e9e-a4f6-e5db77c34c8d')
@decorators.idempotent_id('2f326955-551e-4e9e-a4f6-e5db77c34c8d')
def test_show_subnet_fields(self):
# Verify specific fields of a subnet
fields = ['id', 'network_id']
@ -316,7 +315,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
for field_name in fields:
self.assertEqual(subnet[field_name], self.subnet[field_name])
@test.idempotent_id('66631557-2466-4827-bba6-d961b0242be3')
@decorators.idempotent_id('66631557-2466-4827-bba6-d961b0242be3')
def test_list_subnets(self):
# Verify the subnet exists in the list of all subnets
body = self.list_subnets()
@ -324,7 +323,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
if subnet['id'] == self.subnet['id']]
self.assertNotEmpty(subnets, "Created subnet not found in the list")
@test.idempotent_id('3d5ea69b-f122-43e7-b7f4-c78586629eb8')
@decorators.idempotent_id('3d5ea69b-f122-43e7-b7f4-c78586629eb8')
def test_list_subnets_fields(self):
# Verify specific fields of subnets
fields = ['id', 'network_id']
@ -334,7 +333,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
for subnet in subnets:
self.assertEqual(sorted(subnet.keys()), sorted(fields))
@test.idempotent_id('e966bb2f-402c-49b7-8147-b275cee584c4')
@decorators.idempotent_id('e966bb2f-402c-49b7-8147-b275cee584c4')
def test_delete_network_with_subnet(self):
# Creates a network
network = self._create_network(_auto_clean_up=True)
@ -351,42 +350,42 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
self.assertRaises(exceptions.NotFound,
self.show_subnet, subnet_id)
@test.idempotent_id('8aba0e1b-4b70-4181-a8a4-792c08db699d')
@decorators.idempotent_id('8aba0e1b-4b70-4181-a8a4-792c08db699d')
def test_create_delete_subnet_without_gateway(self):
self._create_verify_delete_subnet()
@test.idempotent_id('67364a4b-6725-4dbe-84cf-504bdb20ac06')
@decorators.idempotent_id('67364a4b-6725-4dbe-84cf-504bdb20ac06')
def test_create_delete_subnet_with_gw(self):
self._create_verify_delete_subnet(
**self.subnet_dict(['gateway']))
@test.idempotent_id('f8f43e65-5090-4902-b5d2-2b610505cca6')
@decorators.idempotent_id('f8f43e65-5090-4902-b5d2-2b610505cca6')
def test_create_delete_subnet_with_allocation_pools(self):
self._create_verify_delete_subnet(
**self.subnet_dict(['allocation_pools']))
@test.idempotent_id('5b085669-97e6-48e0-b99e-315a9b4d8482')
@decorators.idempotent_id('5b085669-97e6-48e0-b99e-315a9b4d8482')
def test_create_delete_subnet_with_gw_and_allocation_pools(self):
self._create_verify_delete_subnet(**self.subnet_dict(
['gateway', 'allocation_pools']))
@decorators.skip_because(bug="1501827")
@test.idempotent_id('3c4c36a1-684b-4e89-8e71-d528f19322a0')
@decorators.idempotent_id('3c4c36a1-684b-4e89-8e71-d528f19322a0')
def test_create_delete_subnet_with_host_routes_and_dns_nameservers(self):
self._create_verify_delete_subnet(
**self.subnet_dict(['host_routes', 'dns_nameservers']))
@test.idempotent_id('df518c87-b817-48b5-9365-bd1daaf68955')
@decorators.idempotent_id('df518c87-b817-48b5-9365-bd1daaf68955')
def test_create_delete_subnet_with_dns_nameservers(self):
self._create_verify_delete_subnet(
**self.subnet_dict(['dns_nameservers']))
@test.idempotent_id('b6822feb-6760-4052-b550-f0fe8bac7451')
@decorators.idempotent_id('b6822feb-6760-4052-b550-f0fe8bac7451')
def test_create_delete_subnet_with_dhcp_enabled(self):
self._create_verify_delete_subnet(enable_dhcp=True)
@decorators.skip_because(bug="1501827")
@test.idempotent_id('3c4c36a1-684a-4e89-8e71-d528f19324a0')
@decorators.idempotent_id('3c4c36a1-684a-4e89-8e71-d528f19324a0')
def test_update_subnet_gw_dns_host_routes_dhcp(self):
network = self._create_network(_auto_clean_up=True)
subnet_attrs = ['gateway', 'host_routes',
@ -417,7 +416,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
self._compare_resource_attrs(updated_subnet, kwargs)
self._delete_network(network['id'])
@test.idempotent_id('a5caa7d9-ab71-4278-a57c-d6631b7474f8')
@decorators.idempotent_id('a5caa7d9-ab71-4278-a57c-d6631b7474f8')
def test_update_subnet_gw_dns_dhcp(self):
network = self._create_network(_auto_clean_up=True)
subnet_attrs = ['gateway',
@ -445,7 +444,7 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
self._delete_network(network['id'])
@decorators.skip_because(bug="1501827")
@test.idempotent_id('a5caa7d5-ab71-4278-a57c-d6631b7474f8')
@decorators.idempotent_id('a5caa7d5-ab71-4278-a57c-d6631b7474f8')
def test_create_delete_subnet_all_attributes(self):
self._create_verify_delete_subnet(
enable_dhcp=True,
@ -453,21 +452,20 @@ class SubnetTestJSON(base.BaseAdminNetworkTest):
'host_routes',
'dns_nameservers']))
@test.idempotent_id('969f20b2-7eb5-44f5-98cd-381545b7c7e7')
@test.idempotent_id('a5caa7d9-ab71-4278-a57c-d6631b7474c8')
@decorators.idempotent_id('a5caa7d9-ab71-4278-a57c-d6631b7474c8')
def test_create_delete_subnet_with_gw_dns(self):
self._create_verify_delete_subnet(
enable_dhcp=True,
**self.subnet_dict(['gateway',
'dns_nameservers']))
@test.idempotent_id('3c4c36a1-684b-4e89-8e71-d518f19324a0')
@decorators.idempotent_id('3c4c36a1-684b-4e89-8e71-d518f19324a0')
def test_add_upd_del_multiple_overlapping_networks_subnet(self):
r0, R1 = 0, 3 # (todo) get from CONF
return self._add_upd_del_multiple_networks_subnet(
r0, R1, "ovla-netwk")
@test.idempotent_id('5267bf9d-de82-4af9-914a-8320e9f4c38c')
@decorators.idempotent_id('5267bf9d-de82-4af9-914a-8320e9f4c38c')
def test_add_upd_del_multiple_nonoverlapping_networks_subnet(self):
r0, R1 = 1, 4 # (todo) get from CONF
return self._add_upd_del_multiple_networks_subnet(

View File

@ -21,7 +21,7 @@ import subprocess
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest import test
from tempest.lib import decorators
import base_provider as base
@ -114,7 +114,7 @@ class ProjectDeleteTest(base.BaseAdminNetworkTest):
router['id'], subnet_id=subnet['id'])
return router
@test.idempotent_id('44e24f6b-9d9e-41a7-9d54-09d79b77dea5')
@decorators.idempotent_id('44e24f6b-9d9e-41a7-9d54-09d79b77dea5')
def test_project_delete_purge_using_non_admin(self):
nets = {}
net_id, network, subnet = self.create_network_subnet(cidr_offset=0)
@ -152,7 +152,7 @@ class ProjectDeleteTest(base.BaseAdminNetworkTest):
(local_tenant_id, admin_tenant_id)).read().strip()
self.assertIn('Purging resources: 100% complete', purge_output)
@test.idempotent_id('77ec7045-f8f0-4aa1-8e1d-68c0647fda89')
@decorators.idempotent_id('77ec7045-f8f0-4aa1-8e1d-68c0647fda89')
def test_project_delete_no_resource_for_deletion(self):
name = data_utils.rand_name('tenant-delete-')
network_client = self.admin_manager.networks_client
@ -180,7 +180,7 @@ class ProjectDeleteTest(base.BaseAdminNetworkTest):
self.assertIn(check_output, purge_output)
LOG.debug("Testcase run completed")
@test.idempotent_id('38bf4e22-c67a-42db-9e9d-a087369207d4')
@decorators.idempotent_id('38bf4e22-c67a-42db-9e9d-a087369207d4')
def test_project_delete_with_all_resorces_deleted(self):
name = data_utils.rand_name('tenant-delete-')
security_client = self.admin_manager.security_groups_client
@ -223,7 +223,7 @@ class ProjectDeleteTest(base.BaseAdminNetworkTest):
self.assertNotIn(floatingip['floatingip']['id'], list_of_floatingips)
LOG.debug("Testcase run completed")
@test.idempotent_id('d617d637-5b2d-4ac8-93ce-80060d495bb2')
@decorators.idempotent_id('d617d637-5b2d-4ac8-93ce-80060d495bb2')
def test_project_delete_with_some_resources_left(self):
network_name = data_utils.rand_name('tenant-delete-')
resp = self.create_network(network_name)

View File

@ -142,14 +142,14 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
objs = [v[key] for v in body[obj_name + 's']]
self.assertIn(value, objs)
@test.idempotent_id('1c959a37-feb3-4d58-b5fc-58ba653de065')
@decorators.idempotent_id('1c959a37-feb3-4d58-b5fc-58ba653de065')
def test_list_vips(self):
# Verify the vIP exists in the list of all vIPs
body = self.lbv1_client.list_vips()
vips = body['vips']
self.assertIn(self.vip['id'], [v['id'] for v in vips])
@test.idempotent_id('687b7fd1-fd15-4ffd-8166-f376407a6081')
@decorators.idempotent_id('687b7fd1-fd15-4ffd-8166-f376407a6081')
def test_list_vips_with_filter(self):
pool_name = data_utils.rand_name("pool-")
vip_name = data_utils.rand_name('vip-')
@ -167,7 +167,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
description=data_utils.rand_name('description-'),
admin_state_up=False)
@test.idempotent_id('73dfc119-b64b-4e56-90d2-df61d7181098')
@decorators.idempotent_id('73dfc119-b64b-4e56-90d2-df61d7181098')
def test_create_update_delete_pool_vip(self):
# Creates a vip
pool_name = data_utils.rand_name("pool-")
@ -224,7 +224,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
self.assertEqual('LEAST_CONNECTIONS', updated_pool['lb_method'])
self.lbv1_client.delete_pool(pool['id'])
@test.idempotent_id('277a99ce-4b3e-451d-a18a-d26c0376d176')
@decorators.idempotent_id('277a99ce-4b3e-451d-a18a-d26c0376d176')
def test_show_vip(self):
# Verifies the details of a vip
body = self.lbv1_client.show_vip(self.vip['id'])
@ -234,7 +234,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
if key != 'status':
self.assertEqual(self.vip[key], value)
@test.idempotent_id('432470dd-836b-4555-8388-af95a1c74d32')
@decorators.idempotent_id('432470dd-836b-4555-8388-af95a1c74d32')
def test_show_pool(self):
# Here we need to new pool without any dependence with vips
pool_name = data_utils.rand_name("pool-")
@ -252,14 +252,14 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
if key != 'status':
self.assertEqual(value, shown_pool[key])
@test.idempotent_id('c9951820-7b24-4e67-8c0c-41065ec66071')
@decorators.idempotent_id('c9951820-7b24-4e67-8c0c-41065ec66071')
def test_list_pools(self):
# Verify the pool exists in the list of all pools
body = self.lbv1_client.list_pools()
pools = body['pools']
self.assertIn(self.pool['id'], [p['id'] for p in pools])
@test.idempotent_id('55a1fb8e-e88e-4042-a46a-13a0282e4990')
@decorators.idempotent_id('55a1fb8e-e88e-4042-a46a-13a0282e4990')
def test_list_pools_with_filters(self):
attr_exceptions = ['status', 'vip_id', 'members', 'provider',
'status_description']
@ -270,14 +270,14 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
description=data_utils.rand_name('description-'),
admin_state_up=False)
@test.idempotent_id('dd441433-de8f-4992-a721-0755dec737ff')
@decorators.idempotent_id('dd441433-de8f-4992-a721-0755dec737ff')
def test_list_members(self):
# Verify the member exists in the list of all members
body = self.lbv1_client.list_members()
members = body['members']
self.assertIn(self.member['id'], [m['id'] for m in members])
@test.idempotent_id('ccebe68a-f096-478d-b495-f17d5c0eac7b')
@decorators.idempotent_id('ccebe68a-f096-478d-b495-f17d5c0eac7b')
def test_list_members_with_filters(self):
attr_exceptions = ['status', 'status_description']
self._check_list_with_filter('member', attr_exceptions,
@ -285,7 +285,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
protocol_port=80,
pool_id=self.pool['id'])
@test.idempotent_id('b4efe862-0439-4260-828c-cc09ff7e12a6')
@decorators.idempotent_id('b4efe862-0439-4260-828c-cc09ff7e12a6')
def test_create_update_delete_member(self):
# Creates a member
body = self.lbv1_client.create_member(address=self.member_address,
@ -300,7 +300,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
# Verification of member delete
self.lbv1_client.delete_member(member['id'])
@test.idempotent_id('4806ca47-b3a0-4280-9962-6631c6815e93')
@decorators.idempotent_id('4806ca47-b3a0-4280-9962-6631c6815e93')
def test_show_member(self):
# Verifies the details of a member
body = self.lbv1_client.show_member(self.member['id'])
@ -310,7 +310,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
if key != 'status':
self.assertEqual(self.member[key], value)
@test.idempotent_id('65c4d817-d8d2-44df-9c15-86fc7b910044')
@decorators.idempotent_id('65c4d817-d8d2-44df-9c15-86fc7b910044')
def test_list_health_monitors(self):
# Verify the health monitor exists in the list of all health monitors
body = self.lbv1_client.list_health_monitors()
@ -318,14 +318,14 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
self.assertIn(self.health_monitor['id'],
[h['id'] for h in health_monitors])
@test.idempotent_id('a2c749a0-4eac-4acc-b729-6b469c3c616a')
@decorators.idempotent_id('a2c749a0-4eac-4acc-b729-6b469c3c616a')
def test_list_health_monitors_with_filters(self):
attr_exceptions = ['status', 'status_description', 'pools']
self._check_list_with_filter('health_monitor', attr_exceptions,
delay=5, max_retries=4, type="TCP",
timeout=2)
@test.idempotent_id('94f1e066-de6e-4cd8-b352-533d216956b7')
@decorators.idempotent_id('94f1e066-de6e-4cd8-b352-533d216956b7')
def test_create_update_delete_health_monitor(self):
# Creates a health_monitor
body = self.lbv1_client.create_health_monitor(delay=4,
@ -342,7 +342,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
# Verification of health_monitor delete
body = self.lbv1_client.delete_health_monitor(health_monitor['id'])
@test.idempotent_id('82943dcf-d424-43f0-890f-4b796f5043dc')
@decorators.idempotent_id('82943dcf-d424-43f0-890f-4b796f5043dc')
def test_create_health_monitor_http_type(self):
hm_type = "HTTP"
body = self.lbv1_client.create_health_monitor(delay=4,
@ -354,7 +354,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
health_monitor['id'])
self.assertEqual(hm_type, health_monitor['type'])
@test.idempotent_id('b1279c46-822a-4406-bb16-6a6ce7bf4e4e')
@decorators.idempotent_id('b1279c46-822a-4406-bb16-6a6ce7bf4e4e')
def test_update_health_monitor_http_method(self):
body = self.lbv1_client.create_health_monitor(delay=4,
max_retries=3,
@ -373,7 +373,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
self.assertEqual("/home/user", updated_health_monitor['url_path'])
self.assertEqual("290", updated_health_monitor['expected_codes'])
@test.idempotent_id('7beabd44-0200-4cc4-b18d-5fb1f44cf36c')
@decorators.idempotent_id('7beabd44-0200-4cc4-b18d-5fb1f44cf36c')
def test_show_health_monitor(self):
# Verifies the details of a health_monitor
body = self.lbv1_client.show_health_monitor(self.health_monitor['id'])
@ -383,7 +383,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
if key != 'status':
self.assertEqual(self.health_monitor[key], value)
@test.idempotent_id('5386d600-1372-4f99-b0f2-316401718ac4')
@decorators.idempotent_id('5386d600-1372-4f99-b0f2-316401718ac4')
def test_associate_disassociate_health_monitor_with_pool(self):
# Verify that a health monitor can be associated with a pool
self.lbv1_client.associate_health_monitor_with_pool(
@ -408,7 +408,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
self.assertNotIn(pool['id'],
[p['pool_id'] for p in health_monitor['pools']])
@test.idempotent_id('17a6b730-0780-46c9-bca0-cec67387e469')
@decorators.idempotent_id('17a6b730-0780-46c9-bca0-cec67387e469')
def test_get_lb_pool_stats(self):
# Verify the details of pool stats
body = self.lbv1_client.list_lb_pool_stats(self.pool['id'])
@ -418,7 +418,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
self.assertIn("active_connections", stats)
self.assertIn("bytes_out", stats)
@test.idempotent_id('a113c740-6194-4622-a187-8343ad3e5208')
@decorators.idempotent_id('a113c740-6194-4622-a187-8343ad3e5208')
def test_update_list_of_health_monitors_associated_with_pool(self):
(self.lbv1_client.associate_health_monitor_with_pool
(self.health_monitor['id'], self.pool['id']))
@ -432,7 +432,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
(self.lbv1_client.disassociate_health_monitor_with_pool
(self.health_monitor['id'], self.pool['id']))
@test.idempotent_id('a2843ec6-80d8-4617-b985-8c8565daac8d')
@decorators.idempotent_id('a2843ec6-80d8-4617-b985-8c8565daac8d')
def test_update_admin_state_up_of_pool(self):
self.lbv1_client.update_pool(self.pool['id'],
admin_state_up=False)
@ -440,7 +440,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
pool = body['pool']
self.assertFalse(pool['admin_state_up'])
@test.idempotent_id('fd45c684-b847-472f-a7e8-a3f70e8e08e0')
@decorators.idempotent_id('fd45c684-b847-472f-a7e8-a3f70e8e08e0')
def test_show_vip_associated_with_pool(self):
body = self.lbv1_client.show_pool(self.pool['id'])
pool = body['pool']
@ -449,7 +449,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
self.assertEqual(self.vip['name'], vip['name'])
self.assertEqual(self.vip['id'], vip['id'])
@test.idempotent_id('1ac0ca5f-7d6a-4ac4-b286-d68c92a98405')
@decorators.idempotent_id('1ac0ca5f-7d6a-4ac4-b286-d68c92a98405')
def test_show_members_associated_with_pool(self):
body = self.lbv1_client.show_pool(self.pool['id'])
members = body['pool']['members']
@ -459,7 +459,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
self.assertEqual(member_id, body['member']['id'])
self.assertIsNotNone(body['member']['admin_state_up'])
@test.idempotent_id('4fa308fa-ac2b-4acf-87db-adfe2ee4739c')
@decorators.idempotent_id('4fa308fa-ac2b-4acf-87db-adfe2ee4739c')
def test_update_pool_related_to_member(self):
# Create new pool
pool_name = data_utils.rand_name("pool-")
@ -481,7 +481,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
body = self.lbv1_client.update_member(self.member['id'],
pool_id=self.pool['id'])
@test.idempotent_id('0af2ff6b-a896-433d-8107-3c76262a9dfa')
@decorators.idempotent_id('0af2ff6b-a896-433d-8107-3c76262a9dfa')
def test_update_member_weight(self):
self.lbv1_client.update_member(self.member['id'],
weight=2)

View File

@ -16,10 +16,10 @@
import random
from tempest import config
from tempest import test
from oslo_log import log as logging
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
import test_subnets as SNET
CONF = config.CONF
@ -84,7 +84,7 @@ class VlanNetworksTestJSON(SNET.SubnetTestJSON):
self.addCleanup(self._try_delete_network, network['id'])
return network
@test.idempotent_id('c5f98016-dee3-42f1-8c23-b9cd1e625561')
@decorators.idempotent_id('c5f98016-dee3-42f1-8c23-b9cd1e625561')
def test_create_network(self):
# Create a network as an admin user specifying the
# vlan network type attribute
@ -102,7 +102,7 @@ class VlanNetworksTestJSON(SNET.SubnetTestJSON):
self.assertEqual(network.get('provider:segmentation_id'), 1002)
self._delete_network(network['id'])
@test.idempotent_id('714e69eb-bb31-4cfc-9804-8e988f04ca65')
@decorators.idempotent_id('714e69eb-bb31-4cfc-9804-8e988f04ca65')
def test_update_network(self):
# Update flat network as an admin user specifying the
# flat network attribute
@ -127,7 +127,7 @@ class VlanNetworksTestJSON(SNET.SubnetTestJSON):
self.assertEqual(updated_network['subnets'], network['subnets'])
self._delete_network(network['id'])
@test.idempotent_id('8a8b9f2c-37f8-4c53-b8e3-0c9c0910380f')
@decorators.idempotent_id('8a8b9f2c-37f8-4c53-b8e3-0c9c0910380f')
def test_list_networks(self):
# Create flat network
net_profile = {'shared': True, '_auto_clean_up': False,
@ -145,7 +145,7 @@ class VlanNetworksTestJSON(SNET.SubnetTestJSON):
self.assertNotIn(network['id'], networks_list)
self._delete_network(network['id'])
@test.idempotent_id('5807958d-9ee2-48a5-937e-ddde092956a6')
@decorators.idempotent_id('5807958d-9ee2-48a5-937e-ddde092956a6')
def test_show_network_attributes(self):
# Create flat network
net_profile = {'shared': True, '_auto_clean_up': False,

View File

@ -20,6 +20,7 @@ from tempest import test
import manager_topo_deployment as dmgr
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
CONF = config.CONF
LOG = dmgr.manager.log.getLogger(__name__)
@ -83,7 +84,7 @@ class TestSimpleFlatNetwork(dmgr.TopoDeployScenarioManager):
# host_ver = serv_addr['version']
self.waitfor_host_connected(host_ip)
@test.idempotent_id('bc081b8d-49eb-4710-9442-c6b225ef16f0')
@decorators.idempotent_id('bc081b8d-49eb-4710-9442-c6b225ef16f0')
@test.services('compute', 'network')
def test_simple_flat_network(self):
# provider actions
@ -126,7 +127,7 @@ class TestTenantConnectivity(dmgr.TopoDeployScenarioManager):
# do mini teardown if test failed already
super(TestTenantConnectivity, self).tearDown()
@test.idempotent_id('3c6cd4fe-de25-47ef-b638-a6bbb312da09')
@decorators.idempotent_id('3c6cd4fe-de25-47ef-b638-a6bbb312da09')
@test.services('compute', 'network')
def test_tenant_connectivity(self):
LOG.debug(Z_DEPLOY_TOPO, "tenant connectivity")
@ -282,7 +283,7 @@ class TestMultiTenantsNetwork(dmgr.TopoDeployScenarioManager):
(t_id, str(node2), t_id, str(node1))))
return T
@test.idempotent_id('19d19cd0-9686-49c9-acea-a9db28f7458c')
@decorators.idempotent_id('19d19cd0-9686-49c9-acea-a9db28f7458c')
@test.services('compute', 'network')
def test_multi_tenants_network(self):
LOG.debug(Z_DEPLOY_TOPO, "multi tenant network")
@ -407,7 +408,7 @@ class TestProviderRouterTenantNetwork(dmgr.TopoDeployScenarioManager):
tenant.update(serv=t_serv, fip=t_fip)
return tenant
@test.idempotent_id('a31712de-33ad-4dc2-9755-1a0631a4f66a')
@decorators.idempotent_id('a31712de-33ad-4dc2-9755-1a0631a4f66a')
@test.services('compute', 'network')
def test_provider_router_project_network(self):
# provider router owned by admin_manager

View File

@ -24,6 +24,7 @@ import time
from tempest.common.utils.linux import remote_client
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -294,7 +295,7 @@ class TestDHCP121BasicOps(dmgr.TopoDeployScenarioManager):
class TestDhcpMetadata(TestDHCP121BasicOps):
@test.attr(type='nsxv')
@test.idempotent_id('95d06aba-895f-47f8-b47d-ae48c6853a85')
@decorators.idempotent_id('95d06aba-895f-47f8-b47d-ae48c6853a85')
def test_dhcp_121_metadata_check_on_vm_nsxv(self):
LOG.info(_LI("Testcase DHCP-121 option metadata check on vm and \
on nsx deploying"))
@ -307,7 +308,7 @@ class TestDhcpMetadata(TestDHCP121BasicOps):
class TestDhcpHostroutesClear(TestDHCP121BasicOps):
@test.attr(type='nsxv')
@test.idempotent_id('6bec6eb4-8632-493d-a895-a3ee87cb3002')
@decorators.idempotent_id('6bec6eb4-8632-493d-a895-a3ee87cb3002')
def test_dhcp_121_hostroutes_clear(self):
LOG.info(_LI("Testcase DHCP-121 option host routes clear deploying"))
self.vm_env = self.setup_vm_enviornment(self.manager, 'green', True)
@ -317,7 +318,7 @@ class TestDhcpHostroutesClear(TestDHCP121BasicOps):
class TestDhcpNegative(TestDHCP121BasicOps):
@test.attr(type='nsxv')
@test.idempotent_id('a58dc6c5-9f28-4184-baf7-37ded52593c4')
@decorators.idempotent_id('a58dc6c5-9f28-4184-baf7-37ded52593c4')
def test_dhcp121_negative_test(self):
LOG.info(_LI("Testcase DHCP-121 option negative test deploying"))
t_net_id, t_network, t_subnet =\
@ -385,7 +386,7 @@ class TestDhcpNegative(TestDHCP121BasicOps):
class TestDhcpMultiHostRoute(TestDHCP121BasicOps):
@test.attr(type='nsxv')
@test.idempotent_id('c3ca96d7-b704-4d94-b42d-e7bae94b82cd')
@decorators.idempotent_id('c3ca96d7-b704-4d94-b42d-e7bae94b82cd')
def test_dhcp121_multi_host_route(self):
LOG.info(_LI("Testcase DHCP-121 option multi host routes deploying"))
t_net_id, t_network, t_subnet =\
@ -453,7 +454,7 @@ class TestDhcpMultiHostRoute(TestDHCP121BasicOps):
class TestDhcpHostRoutesBetweenVms(TestDHCP121BasicOps):
@test.attr(type='nsxv')
@test.idempotent_id('34e6d23f-db00-446e-8299-57ff2c0911b2')
@decorators.idempotent_id('34e6d23f-db00-446e-8299-57ff2c0911b2')
def test_host_routes_between_vms(self):
client_mgr = self.manager
next_hop = CONF.network.project_network_cidr

View File

@ -16,8 +16,8 @@
from tempest.common import waiters
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
from vmware_nsx_tempest.tests.nsxv.scenario import (
manager_topo_deployment as dmgr)
@ -216,14 +216,14 @@ class TestDnsSearchDomainBasicOps(dmgr.TopoDeployScenarioManager):
class TestDnsSearchDomainOpsOverSharedRouter(TestDnsSearchDomainBasicOps):
@test.idempotent_id('5556cdce-075c-437a-9d9d-f1e4583e9f4c')
@decorators.idempotent_id('5556cdce-075c-437a-9d9d-f1e4583e9f4c')
def test_dns_search_domain_ops_over_shared_router(self):
return self.run_dns_search_domain_basic_ops('shared')
class TestDnsSearchDomainOpsOverExclusiveRouter(TestDnsSearchDomainBasicOps):
@test.idempotent_id('6878c3cf-88d2-46ef-b366-b2a49bfa1e0a')
@decorators.idempotent_id('6878c3cf-88d2-46ef-b366-b2a49bfa1e0a')
def test_dns_search_domain_ops_over_exclusive_router(self):
return self.run_dns_search_domain_basic_ops('exclusive')
@ -231,6 +231,6 @@ class TestDnsSearchDomainOpsOverExclusiveRouter(TestDnsSearchDomainBasicOps):
class TestDnsSearchDomainOpsOverDistributedeRouter(
TestDnsSearchDomainBasicOps):
@test.idempotent_id('ad24cb58-532a-4675-9bbc-98ec4c296716')
@decorators.idempotent_id('ad24cb58-532a-4675-9bbc-98ec4c296716')
def test_dns_search_domain_ops_over_distributed_router(self):
return self.run_dns_search_domain_basic_ops('distributed')

View File

@ -18,9 +18,9 @@ import re
import time
from oslo_log import log as logging
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -319,7 +319,7 @@ class TestDvrBasicOps(manager.NetworkScenarioTest):
src=floating_ip))
raise
@test.idempotent_id('62eb50a8-45f3-4eec-acc4-f01cee10a011')
@decorators.idempotent_id('62eb50a8-45f3-4eec-acc4-f01cee10a011')
@test.services('compute', 'network')
def test_dvr_network_basic_ops(self):
"""
@ -376,7 +376,7 @@ class TestDvrBasicOps(manager.NetworkScenarioTest):
msg="after re-associate "
"floating ip")
@test.idempotent_id('d99b62ec-28ce-44db-a195-edb74037a354')
@decorators.idempotent_id('d99b62ec-28ce-44db-a195-edb74037a354')
@test.services('compute', 'network')
def test_dvr_connectivity_between_vms_on_different_networks(self):
"""
@ -423,7 +423,7 @@ class TestDvrBasicOps(manager.NetworkScenarioTest):
self._check_network_internal_connectivity(network=self.new_net,
should_connect=True)
@test.idempotent_id('a73fd605-d55e-4151-b25e-41e7a7ff2258')
@decorators.idempotent_id('a73fd605-d55e-4151-b25e-41e7a7ff2258')
@test.services('compute', 'network')
def test_dvr_update_router_admin_state(self):
"""

View File

@ -11,6 +11,7 @@
# under the License.
import time
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services.lbaas import l7policies_client
@ -170,7 +171,7 @@ class TestL7SwitchingOps(lbaas_ops.LBaasRoundRobinBaseTest):
# URL /api/v1 should be rejected, status=403
self.check_l7_switching('api/v1', reject_name_list, 6)
@test.idempotent_id('f11e19e4-16b5-41c7-878d-59b9e943e3ce')
@decorators.idempotent_id('f11e19e4-16b5-41c7-878d-59b9e943e3ce')
@test.services('compute', 'network')
def test_lbaas_l7_switching_ops(self):
self.create_lbaas_networks()

View File

@ -17,6 +17,7 @@ from tempest.common import waiters
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services.lbaas import health_monitors_client
@ -383,7 +384,7 @@ class TestLBaasRoundRobinOps(LBaasRoundRobinBaseTest):
between the two servers.
"""
@test.idempotent_id('077d2a5c-4938-448f-a80f-8e65f5cc49d7')
@decorators.idempotent_id('077d2a5c-4938-448f-a80f-8e65f5cc49d7')
@test.services('compute', 'network')
def test_lbaas_round_robin_ops(self):
self.create_lbaas_networks()

View File

@ -20,6 +20,7 @@ from tempest.common import waiters
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv_client
@ -279,12 +280,12 @@ class TestMultipleTransportZonesBasicOps(dmgr.TopoDeployScenarioManager):
class TestMTZBasicOpsOverSharedRouter(TestMultipleTransportZonesBasicOps):
@test.idempotent_id('190790fe-4cc4-4bb3-ae3e-4fa2031ca4e2')
@decorators.idempotent_id('190790fe-4cc4-4bb3-ae3e-4fa2031ca4e2')
def test_mtz_basic_ops_over_shared_router(self):
self.run_mtz_basic_ops(router_type='shared')
class TestMTZBasicOpsOverExclusiveRouter(TestMultipleTransportZonesBasicOps):
@test.idempotent_id('caf2be55-ea49-4783-87bf-103fcc5783db')
@decorators.idempotent_id('caf2be55-ea49-4783-87bf-103fcc5783db')
def test_mtz_basic_ops_over_exclusive_router(self):
self.run_mtz_basic_ops(router_type='exclusive')

View File

@ -20,6 +20,7 @@ from tempest.common.utils.linux import remote_client
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest._i18n import _LI
@ -174,7 +175,7 @@ class TestSpoofGuardBasicOps(dmgr.TopoDeployScenarioManager):
class TestSpoofGuardFeature(TestSpoofGuardBasicOps):
@test.attr(type='nsxv')
@test.idempotent_id('2804f55d-3221-440a-9fa8-ab16a8932634')
@decorators.idempotent_id('2804f55d-3221-440a-9fa8-ab16a8932634')
def test_exclude_list_with_new_attach_port(self):
port_client = self.manager.ports_client
self.green = self.setup_vm_environment(self.manager, 'green', True)
@ -208,7 +209,7 @@ class TestSpoofGuardFeature(TestSpoofGuardBasicOps):
self.interface_client.delete_interface(vm_id, port_id)
@test.attr(type='nsxv')
@test.idempotent_id('a5420350-2658-47e4-9e2b-490b200e9f41')
@decorators.idempotent_id('a5420350-2658-47e4-9e2b-490b200e9f41')
def test_spoofguard_with_ping_between_servers_on_same_network(self):
username, password = self.get_image_userpass()
image = self.get_server_image()
@ -282,7 +283,7 @@ class TestSpoofGuardFeature(TestSpoofGuardBasicOps):
return net_network, net_subnet
@test.attr(type='nsxv')
@test.idempotent_id('38c213df-bfc2-4681-9c9c-3a31c05b0e6f')
@decorators.idempotent_id('38c213df-bfc2-4681-9c9c-3a31c05b0e6f')
def test_exclude_with_multiple_vm(self):
image = self.get_server_image()
flavor = self.get_server_flavor()
@ -349,7 +350,7 @@ class TestSpoofGuardFeature(TestSpoofGuardBasicOps):
LOG.info(_LI("Vm1 not in exclude list"))
@test.attr(type='nsxv')
@test.idempotent_id('f034d3e9-d717-4bcd-8e6e-18e9ada7b81a')
@decorators.idempotent_id('f034d3e9-d717-4bcd-8e6e-18e9ada7b81a')
def test_exclude_list_with_single_vm_port(self):
port_client = self.manager.ports_client
self.green = self.setup_vm_environment(self.manager, 'green', True)
@ -376,7 +377,7 @@ class TestSpoofGuardFeature(TestSpoofGuardBasicOps):
self.interface_client.delete_interface(vm_id, port_id)
@test.attr(type='nsxv')
@test.idempotent_id('3ad04e37-2a9f-4465-86e7-94993eecdfa1')
@decorators.idempotent_id('3ad04e37-2a9f-4465-86e7-94993eecdfa1')
def test_disabled_network_port_security(self):
network_client = self.manager.networks_client
port_client = self.manager.ports_client
@ -406,7 +407,7 @@ class TestSpoofGuardFeature(TestSpoofGuardBasicOps):
LOG.info(_LI("Port security of port is enabled"))
@test.attr(type='nsxv')
@test.idempotent_id('c8683cb7-4be5-4670-95c6-344a0aea3667')
@decorators.idempotent_id('c8683cb7-4be5-4670-95c6-344a0aea3667')
def test_exclude_list_with_multiple_ports(self):
port_client = self.manager.ports_client
self.green = self.setup_vm_environment(self.manager, 'green', True)

View File

@ -24,6 +24,7 @@ from tempest import config
from tempest import exceptions
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -410,7 +411,7 @@ class TestLBaaSBasicOps(manager.NetworkScenarioTest):
for member, counter in six.iteritems(counters):
self.assertGreater(counter, 0, 'Member %s never balanced' % member)
@test.idempotent_id('e81b5af1-d854-4e16-9d2d-16187bdf1334')
@decorators.idempotent_id('e81b5af1-d854-4e16-9d2d-16187bdf1334')
@test.services('compute', 'network')
def test_load_balancer_basic(self):
self._create_server('server1')

View File

@ -18,7 +18,7 @@ import time
from tempest.common import waiters
from tempest import config
from tempest.lib.common.utils import test_utils
from tempest import test
from tempest.lib import decorators
from vmware_nsx_tempest.tests.nsxv.scenario import (
manager_topo_deployment as dmgr)
@ -279,7 +279,7 @@ class TestXnetMultiSubnetsOps(dmgr.TopoDeployScenarioManager):
class TestXnetMultiSubnetsOpsOnSharedRouter(TestXnetMultiSubnetsOps):
@test.idempotent_id('e25d030f-7fdf-4500-bd55-4ed6f62c0a5c')
@decorators.idempotent_id('e25d030f-7fdf-4500-bd55-4ed6f62c0a5c')
def test_xnet_multiple_subnets_basic_ops_on_shared_router(self):
return self._test_xnet_multiple_subnets_basic_ops(
'shared', 'xnet-shared', False)
@ -287,7 +287,7 @@ class TestXnetMultiSubnetsOpsOnSharedRouter(TestXnetMultiSubnetsOps):
class TestXnetMultiSubnetsOpsOnExclusiveRouter(TestXnetMultiSubnetsOps):
@test.idempotent_id('5b09351a-0560-4555-99f0-a1f80d54d435')
@decorators.idempotent_id('5b09351a-0560-4555-99f0-a1f80d54d435')
def test_xnet_multiple_subnets_basic_ops_on_exclusive_router(self):
return self._test_xnet_multiple_subnets_basic_ops(
'exclusive', 'xnet-exclusive', False)
@ -295,7 +295,7 @@ class TestXnetMultiSubnetsOpsOnExclusiveRouter(TestXnetMultiSubnetsOps):
class TestXnetMultiSubnetsOpsOnDistributedRouter(TestXnetMultiSubnetsOps):
@test.idempotent_id('9652d36b-8816-4212-a6e1-3a8b2580deee')
@decorators.idempotent_id('9652d36b-8816-4212-a6e1-3a8b2580deee')
def test_xnet_multiple_subnets_basic_ops_on_distributed_router(self):
return self._test_xnet_multiple_subnets_basic_ops(
'', 'xnet-distributed', True)

View File

@ -17,6 +17,7 @@
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest._i18n import _LI
@ -34,7 +35,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
"""
@test.attr(type="nsxv3")
@test.idempotent_id("e5e3a089-602c-496e-8c17-4ef613266924")
@decorators.idempotent_id("e5e3a089-602c-496e-8c17-4ef613266924")
def test_l2_gateway_create_without_vlan(self):
"""
Create l2gw based on UUID and bridge cluster name. It creates l2gw.
@ -59,7 +60,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
self.resource_cleanup()
@test.attr(type="nsxv3")
@test.idempotent_id("9968a529-e785-472f-8705-9b394a912e43")
@decorators.idempotent_id("9968a529-e785-472f-8705-9b394a912e43")
def test_l2_gateway_with_single_vlan(self):
"""
Create l2gw based on UUID and bridge cluster name. It creates l2gw.
@ -96,7 +97,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
self.resource_cleanup()
@test.attr(type="nsxv3")
@test.idempotent_id("3861aab0-4f76-4472-ad0e-a255e6e42193")
@decorators.idempotent_id("3861aab0-4f76-4472-ad0e-a255e6e42193")
def test_l2_gateway_with_multiple_vlans(self):
"""
Create l2gw based on UUID and bridge cluster name. It creates l2gw.
@ -133,7 +134,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
self.resource_cleanup()
@test.attr(type="nsxv3")
@test.idempotent_id("670cbcb5-134e-467d-ba41-0d7cdbcf3903")
@decorators.idempotent_id("670cbcb5-134e-467d-ba41-0d7cdbcf3903")
def test_l2_gateway_delete(self):
"""
Delete l2gw will create l2gw and delete recently created l2gw. To
@ -164,7 +165,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
self.resource_cleanup()
@test.attr(type="nsxv3")
@test.idempotent_id("fa76f6e6-8aa7-46d8-9af4-2206d0773dc3")
@decorators.idempotent_id("fa76f6e6-8aa7-46d8-9af4-2206d0773dc3")
def test_l2_gateway_update_l2gw_name(self):
"""
Update l2gw will update info in already created l2gw. To
@ -206,7 +207,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
self.resource_cleanup()
@test.attr(type="nsxv3")
@test.idempotent_id("c4977df8-8e3a-4b7e-a8d2-5aa757117658")
@decorators.idempotent_id("c4977df8-8e3a-4b7e-a8d2-5aa757117658")
def test_l2_gateway_update_interface(self):
"""
Update l2gw will update info in already created l2gw. To
@ -252,7 +253,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
self.resource_cleanup()
@test.attr(type="nsxv3")
@test.idempotent_id("5a3cef97-c91c-4e03-92c8-d180f9269f27")
@decorators.idempotent_id("5a3cef97-c91c-4e03-92c8-d180f9269f27")
def test_l2_gateway_show(self):
"""
show l2gw based on UUID. To see l2gw info we need l2gw id.
@ -295,7 +296,7 @@ class L2GatewayTest(base_l2gw.BaseL2GatewayTest):
self.resource_cleanup()
@test.attr(type="nsxv3")
@test.idempotent_id("d4a7d3af-e637-45c5-a967-d179153a6e58")
@decorators.idempotent_id("d4a7d3af-e637-45c5-a967-d179153a6e58")
def test_l2_gateway_list(self):
"""
list created l2gw.

View File

@ -19,6 +19,7 @@ import netaddr
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest._i18n import _LI
@ -76,7 +77,7 @@ class L2GatewayConnectionTest(base_l2gw.BaseL2GatewayTest):
cls.l2gw_created.pop(l2gw_id)
@test.attr(type="nsxv3")
@test.idempotent_id("81edfb9e-4722-4565-939c-6593b8405ff4")
@decorators.idempotent_id("81edfb9e-4722-4565-939c-6593b8405ff4")
def test_l2_gateway_connection_create(self):
"""
Create l2 gateway connection using one vlan. Vlan parameter is
@ -109,7 +110,7 @@ class L2GatewayConnectionTest(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("7db4f6c9-18c5-4a99-93c1-68bc2ecb48a7")
@decorators.idempotent_id("7db4f6c9-18c5-4a99-93c1-68bc2ecb48a7")
def test_l2_gateway_connection_create_with_multiple_vlans(self):
"""
Create l2 gateway connection using multiple vlans. Vlan parameter is
@ -142,7 +143,7 @@ class L2GatewayConnectionTest(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("de70d6a2-d454-4a09-b06b-8f39be67b635")
@decorators.idempotent_id("de70d6a2-d454-4a09-b06b-8f39be67b635")
def test_l2_gateway_connection_with_seg_id_create(self):
"""
Create l2 gateway connection using one vlan. Vlan parameter is
@ -179,7 +180,7 @@ class L2GatewayConnectionTest(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("819d9b50-9159-48d0-be2a-493ec686534c")
@decorators.idempotent_id("819d9b50-9159-48d0-be2a-493ec686534c")
def test_l2_gateway_connection_show(self):
"""
Create l2 gateway connection using one vlan and tes l2 gateway
@ -224,7 +225,7 @@ class L2GatewayConnectionTest(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("4188f8e7-cd65-427e-92b8-2a9e0492ab21")
@decorators.idempotent_id("4188f8e7-cd65-427e-92b8-2a9e0492ab21")
def test_l2_gateway_connection_list(self):
"""
Create l2 gateway connection using one vlan and test l2 gateway
@ -278,7 +279,7 @@ class L2GatewayConnectionTest(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("4d71111f-3d2b-4557-97c7-2e149a6f41fb")
@decorators.idempotent_id("4d71111f-3d2b-4557-97c7-2e149a6f41fb")
def test_l2_gateway_connection_recreate(self):
"""
Recreate l2 gateway connection.
@ -346,7 +347,7 @@ class L2GatewayConnectionTest(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("671cacb5-134e-467d-ba41-0d7cdbcf3903")
@decorators.idempotent_id("671cacb5-134e-467d-ba41-0d7cdbcf3903")
def test_l2_gateway_connection_delete(self):
"""
Delete l2gw will create l2gw and delete recently created l2gw. To

View File

@ -80,7 +80,7 @@ class L2GatewayConnectionNegative(base_l2gw.BaseL2GatewayTest):
cls.l2gw_created.pop(l2gw_id)
@test.attr(type="nsxv3")
@test.idempotent_id("e86bd8e9-b32b-425d-86fa-cd866138d028")
@decorators.idempotent_id("e86bd8e9-b32b-425d-86fa-cd866138d028")
def test_active_l2_gateway_delete(self):
"""
Delete l2 gateway with active mapping.
@ -107,7 +107,7 @@ class L2GatewayConnectionNegative(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("488faaae-180a-4c48-8b7a-44c3a243369f")
@decorators.idempotent_id("488faaae-180a-4c48-8b7a-44c3a243369f")
def test_recreate_l2_gateway_connection(self):
"""
Recreate l2 gateway connection using same parameters.
@ -133,7 +133,7 @@ class L2GatewayConnectionNegative(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("14606e74-4f65-402e-ae50-a0adcd877a83")
@decorators.idempotent_id("14606e74-4f65-402e-ae50-a0adcd877a83")
def test_create_l2gwc_with_nonexist_l2gw(self):
"""
Create l2 gateway connection using non exist l2gw uuid.
@ -155,7 +155,7 @@ class L2GatewayConnectionNegative(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("e6cb8973-fcbc-443e-a3cb-c6a82ae58b63")
@decorators.idempotent_id("e6cb8973-fcbc-443e-a3cb-c6a82ae58b63")
def test_create_l2gwc_with_nonexist_network(self):
"""
Create l2 gateway connection using non exist l2gw uuid.
@ -177,7 +177,7 @@ class L2GatewayConnectionNegative(base_l2gw.BaseL2GatewayTest):
self.addCleanup(self.l2gw_cleanup)
@test.attr(type="nsxv3")
@test.idempotent_id("27c7c64f-511f-421e-8b62-dfed143fc00b")
@decorators.idempotent_id("27c7c64f-511f-421e-8b62-dfed143fc00b")
def test_create_l2gw_with_invalid_seg_id(self):
"""
Create l2 gateway connection using invalid seg id.
@ -196,7 +196,7 @@ class L2GatewayConnectionNegative(base_l2gw.BaseL2GatewayTest):
@decorators.skip_because(bug="1640033")
@test.attr(type="nsxv3")
@test.idempotent_id("000cc597-bcea-4539-af07-bd70357e8d82")
@decorators.idempotent_id("000cc597-bcea-4539-af07-bd70357e8d82")
def test_create_l2gw_with_non_int_seg_id(self):
"""
Create l2 gateway connection using invalid seg id.

View File

@ -17,6 +17,7 @@ from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv3_client
@ -97,7 +98,7 @@ class NSXv3NativeDHCPTest(base.BaseNetworkTest):
self.assertIn(route, host_routes)
@test.attr(type='nsxv3')
@test.idempotent_id('698f5503-a17a-43c2-b83b-353d3e28588b')
@decorators.idempotent_id('698f5503-a17a-43c2-b83b-353d3e28588b')
def test_create_dhcp_enabled_subnet(self):
name = data_utils.rand_name("network-")
network = self.create_network(network_name=name)
@ -114,7 +115,7 @@ class NSXv3NativeDHCPTest(base.BaseNetworkTest):
self.assertIsNotNone(dhcp_server)
@test.attr(type='nsxv3')
@test.idempotent_id('cc970d9b-786a-49c3-8bfb-2f8bc5580ead')
@decorators.idempotent_id('cc970d9b-786a-49c3-8bfb-2f8bc5580ead')
def test_overlapping_dhcp_enabled_subnet(self):
"""Create two overlapping subnets"""
for i in range(2):
@ -138,25 +139,25 @@ class NSXv3NativeDHCPTest(base.BaseNetworkTest):
self._subnet_data['gateway'])
@test.attr(type='nsxv3')
@test.idempotent_id('acee6ccb-92bb-48d8-ae6b-b10783b3791a')
@decorators.idempotent_id('acee6ccb-92bb-48d8-ae6b-b10783b3791a')
def test_create_subnet_with_allocation_pool(self):
self._test_create_subnet_with_kwargs(
allocation_pools=self._subnet_data['allocation_pools'])
@test.attr(type='nsxv3')
@test.idempotent_id('1b7d38c1-0674-43a7-8df1-0b9da531ad77')
@decorators.idempotent_id('1b7d38c1-0674-43a7-8df1-0b9da531ad77')
def test_create_subnet_with_dns_nameservers(self):
self._test_create_subnet_with_kwargs(
dns_nameservers=self._subnet_data['dns_nameservers'])
@test.attr(type='nsxv3')
@test.idempotent_id('3159111b-e332-4a41-a713-164a0ccfc2ad')
@decorators.idempotent_id('3159111b-e332-4a41-a713-164a0ccfc2ad')
def test_create_subnet_with_host_routes(self):
self._test_create_subnet_with_kwargs(
host_routes=self._subnet_data['host_routes'])
@test.attr(type='nsxv3')
@test.idempotent_id('addb0f46-3fa7-421b-aae7-820e798c096e')
@decorators.idempotent_id('addb0f46-3fa7-421b-aae7-820e798c096e')
def test_create_subnet_with_gateway_ip(self):
self._test_create_subnet_with_kwargs(
gateway_ip=self._subnet_data['gateway'])

View File

@ -17,6 +17,7 @@ from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv3_client
@ -49,7 +50,7 @@ class NSXv3NativeDHCPNegative(base.BaseNetworkTest):
@test.attr(type='nsxv3')
@test.attr(type=['negative'])
@test.idempotent_id('d1fb24b9-6ee8-4fb3-b6fe-169fed3cfa7e')
@decorators.idempotent_id('d1fb24b9-6ee8-4fb3-b6fe-169fed3cfa7e')
def test_create_network_without_subnet(self):
name = data_utils.rand_name('network-')
network = self.create_network(network_name=name)
@ -66,7 +67,7 @@ class NSXv3NativeDHCPNegative(base.BaseNetworkTest):
@test.attr(type='nsxv3')
@test.attr(type=['negative'])
@test.idempotent_id('caab60b9-b78c-4127-983f-cfb515b555fe')
@decorators.idempotent_id('caab60b9-b78c-4127-983f-cfb515b555fe')
def test_create_dhcp_disabled_subnet(self):
name = data_utils.rand_name('network-')
network = self.create_network(network_name=name)
@ -84,7 +85,7 @@ class NSXv3NativeDHCPNegative(base.BaseNetworkTest):
@test.attr(type='nsxv3')
@test.attr(type=['negative'])
@test.idempotent_id('bcfd9e1c-456f-43cc-a22a-baceb2188b53')
@decorators.idempotent_id('bcfd9e1c-456f-43cc-a22a-baceb2188b53')
def test_update_dhcp_disabled_subnet(self):
name = data_utils.rand_name('network-')
network = self.create_network(network_name=name)

View File

@ -18,6 +18,7 @@ from oslo_log import log as logging
from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv3_client
@ -56,7 +57,7 @@ class NSXv3FloatingIPTest(base.BaseNetworkTest):
CONF.nsxv3.nsx_password)
@test.attr(type='nsxv3')
@test.idempotent_id('593e4e51-9ea2-445b-b789-eff2b0b7a503')
@decorators.idempotent_id('593e4e51-9ea2-445b-b789-eff2b0b7a503')
def test_create_floating_ip(self):
# Create a floating ip
create_body = self.floating_ips_client.create_floatingip(
@ -87,7 +88,7 @@ class NSXv3FloatingIPTest(base.BaseNetworkTest):
self.assertIn((port_ip, fip['floating_ip_address']), dnat_rules)
@test.attr(type='nsxv3')
@test.idempotent_id('48d8cda8-dfc3-4d84-8f91-4bad6cc7d452')
@decorators.idempotent_id('48d8cda8-dfc3-4d84-8f91-4bad6cc7d452')
def test_update_floating_ip(self):
# Create a floating ip
create_body = self.floating_ips_client.create_floatingip(
@ -128,7 +129,7 @@ class NSXv3FloatingIPTest(base.BaseNetworkTest):
dnat_rules)
@test.attr(type='nsxv3')
@test.idempotent_id('6e5a87fe-b40e-4c62-94b8-07431493cc3d')
@decorators.idempotent_id('6e5a87fe-b40e-4c62-94b8-07431493cc3d')
def test_delete_floating_ip(self):
# Create a floating ip
create_body = self.floating_ips_client.create_floatingip(

View File

@ -14,6 +14,7 @@ from tempest.api.network import base
from tempest.common import custom_matchers
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.common import constants
@ -135,7 +136,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
"OS and NSX mac learn states don't match")
@test.attr(type='nsxv3')
@test.idempotent_id('d4c533d4-194e-4d72-931d-a120cd3dd3b2')
@decorators.idempotent_id('d4c533d4-194e-4d72-931d-a120cd3dd3b2')
def test_create_mac_learning_port(self):
"""
Test creation of MAC Learning enabled port
@ -144,7 +145,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
self._check_mac_learning(port, mac_learn_state=True)
@test.attr(type='nsxv3')
@test.idempotent_id('d5067c7e-127b-4676-8b33-c421dcc8d6ae')
@decorators.idempotent_id('d5067c7e-127b-4676-8b33-c421dcc8d6ae')
def test_list_mac_learning_port(self):
"""
Create port with MAC learning enabled. Create vanilla port.
@ -169,7 +170,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
'List ports does not match num of created ports')
@test.attr(type='nsxv3')
@test.idempotent_id('d2eaadb2-52e3-42c1-8225-7380cd70a82c')
@decorators.idempotent_id('d2eaadb2-52e3-42c1-8225-7380cd70a82c')
def test_show_mac_learning_port(self):
"""
Create port with MAC learning enabled with OS. Test port show api
@ -195,7 +196,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
'updated_at']))
@test.attr(type='nsxv3')
@test.idempotent_id('4d5844bb-88d4-4cdc-b545-6cd9160ae351')
@decorators.idempotent_id('4d5844bb-88d4-4cdc-b545-6cd9160ae351')
def test_update_mac_learning_port(self):
"""
Create a MAC learning-enabled port on network. Update the port's
@ -219,7 +220,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
% updated_nsx_port['display_name'])
@test.attr(type='nsxv3')
@test.idempotent_id('e2295017-b3c4-4cdd-b8e2-daa51aaf7590')
@decorators.idempotent_id('e2295017-b3c4-4cdd-b8e2-daa51aaf7590')
def test_delete_mac_learning_port(self):
"""
Create MAC learning-enabled port on network. Verify port on
@ -237,7 +238,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
"Port %s is not None" % test_port['name'])
@test.attr(type='nsxv3')
@test.idempotent_id('5105d8b5-5136-4789-9991-7e419d980169')
@decorators.idempotent_id('5105d8b5-5136-4789-9991-7e419d980169')
def test_create_enable_mac_learning_port_delete(self):
"""
CRUD Workflow 1
@ -256,7 +257,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
"Port %s is not None" % updated_os_port['name'])
@test.attr(type='nsxv3')
@test.idempotent_id('b7ecc93d-6c9b-4958-9a08-bc85d2946c03')
@decorators.idempotent_id('b7ecc93d-6c9b-4958-9a08-bc85d2946c03')
def test_create_toggle_mac_learning_port_delete(self):
"""
CRUD Workflow 2
@ -277,7 +278,7 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
"Port %s is not None" % ml_on_port['name'])
@test.attr(type='nsxv3')
@test.idempotent_id('262e844f-a033-4fcd-b5d0-4641d9efeccd')
@decorators.idempotent_id('262e844f-a033-4fcd-b5d0-4641d9efeccd')
def test_create_update_delete_mac_learning_port(self):
"""
CRUD Workflow 3

View File

@ -13,6 +13,7 @@
from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv3_client
@ -37,7 +38,7 @@ class NSXv3NetworksTest(base.BaseNetworkTest):
CONF.nsxv3.nsx_password)
@test.attr(type='nsxv3')
@test.idempotent_id('63085723-23ae-4109-ac86-69f895097957')
@decorators.idempotent_id('63085723-23ae-4109-ac86-69f895097957')
def test_create_update_delete_nsx_network(self):
# Create a network
name = data_utils.rand_name('network-')

View File

@ -15,6 +15,7 @@
from tempest.api.network import base_routers as base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv3_client
@ -48,7 +49,7 @@ class NSXv3RoutersTest(base.BaseRouterTest):
CONF.nsxv3.nsx_password)
@test.attr(type='nsxv3')
@test.idempotent_id('0e9938bc-d2a3-4a9a-a4f9-7a93ee8bb344')
@decorators.idempotent_id('0e9938bc-d2a3-4a9a-a4f9-7a93ee8bb344')
def test_create_update_nsx_router(self):
# Create a router
router_name = data_utils.rand_name('router-')
@ -71,7 +72,7 @@ class NSXv3RoutersTest(base.BaseRouterTest):
self.assertIsNotNone(nsx_router)
@test.attr(type='nsxv3')
@test.idempotent_id('6f49b69c-0800-4c83-b1f8-595ae5bfeea7')
@decorators.idempotent_id('6f49b69c-0800-4c83-b1f8-595ae5bfeea7')
def test_delete_nsx_router(self):
# Create a router
router_name = data_utils.rand_name('router-')

View File

@ -21,6 +21,7 @@ import time
from tempest.api.network import base_security_groups as base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest._i18n import _LI
@ -86,7 +87,7 @@ class NSXv3SecGroupTest(base.BaseSecGroupTest):
(key, value))
@test.attr(type='nsxv3')
@test.idempotent_id('904ca2c1-a14d-448b-b723-a7366e613bf1')
@decorators.idempotent_id('904ca2c1-a14d-448b-b723-a7366e613bf1')
def test_create_update_nsx_security_group(self):
# Create a security group
group_create_body, name = self._create_security_group()
@ -125,7 +126,7 @@ class NSXv3SecGroupTest(base.BaseSecGroupTest):
"Firewall section %s is not updated!")
@test.attr(type='nsxv3')
@test.idempotent_id('e637cc59-c5e6-49b5-a539-e517e780656e')
@decorators.idempotent_id('e637cc59-c5e6-49b5-a539-e517e780656e')
def test_delete_nsx_security_group(self):
# Create a security group
name = data_utils.rand_name('secgroup-')
@ -146,7 +147,7 @@ class NSXv3SecGroupTest(base.BaseSecGroupTest):
self.assertIsNone(nsx_dfw_section)
@test.attr(type='nsxv3')
@test.idempotent_id('91c298c0-fbbd-4597-b4c6-1a7ecfb8a2de')
@decorators.idempotent_id('91c298c0-fbbd-4597-b4c6-1a7ecfb8a2de')
def test_create_nsx_security_group_rule(self):
# Create a security group
create_body, _ = self._create_security_group()
@ -206,7 +207,7 @@ class NSXv3SecGroupTest(base.BaseSecGroupTest):
"%s does not match." % key)
@test.attr(type='nsxv3')
@test.idempotent_id('b6c424e5-3553-4b7d-bd95-8b1f0a860fb4')
@decorators.idempotent_id('b6c424e5-3553-4b7d-bd95-8b1f0a860fb4')
def test_delete_nsx_security_group_rule(self):
# Create a security group
create_body, _ = self._create_security_group()

View File

@ -18,6 +18,7 @@ from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions
from tempest import test
@ -109,7 +110,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
return sg.get('security_group', sg)
@test.attr(type='nsxv3')
@test.idempotent_id('4fc39f02-4fb1-4e5c-bf64-b98dd7f514f7')
@decorators.idempotent_id('4fc39f02-4fb1-4e5c-bf64-b98dd7f514f7')
def test_provider_security_group_at_beckend(self):
sg = self.create_security_provider_group(self.cmgr_adm, provider=True)
sg_id = sg.get('id')
@ -120,7 +121,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
self.assertNotEqual([], self.nsx.get_firewall_section(sg_name, sg_id))
@test.attr(type='nsxv3')
@test.idempotent_id('2c8d013d-4c0b-4d2b-b77c-779351a789ce')
@decorators.idempotent_id('2c8d013d-4c0b-4d2b-b77c-779351a789ce')
def test_provider_security_group_crud(self):
sg_desc = "crud provider-security-group"
sg_client = self.cmgr_adm.security_groups_client
@ -137,7 +138,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
self.assertEqual(len(sg_list), 0)
@test.attr(type='nsxv3')
@test.idempotent_id('2bc5452f-5673-4dbe-afb3-fb40bf0916a5')
@decorators.idempotent_id('2bc5452f-5673-4dbe-afb3-fb40bf0916a5')
def test_admin_can_create_provider_security_group_for_tenant(self):
project_id = self.cmgr_alt.networks_client.tenant_id
sg = self.create_security_provider_group(self.cmgr_adm,
@ -146,14 +147,14 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
self.assertEqual(True, sg.get('provider'))
@test.attr(type='nsxv3')
@test.idempotent_id('6ff79516-1e94-4463-9b8c-a524aa806040')
@decorators.idempotent_id('6ff79516-1e94-4463-9b8c-a524aa806040')
def test_tenant_provider_sec_group_with_no_rules(self):
sg = self.create_security_provider_group(self.cmgr_adm,
provider=True)
self.assertEqual([], sg.get('security_group_rules'))
@test.attr(type='nsxv3')
@test.idempotent_id('a92c8e1e-ce2c-40be-8449-d326690e078e')
@decorators.idempotent_id('a92c8e1e-ce2c-40be-8449-d326690e078e')
def test_admin_can_create_security_group_rule(self):
sg_client = self.cmgr_adm.security_groups_client
sg = self.create_security_provider_group(self.cmgr_adm,
@ -172,7 +173,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
[0]['protocol'])
@test.attr(type='nsxv3')
@test.idempotent_id('8e43bd57-e478-490c-8064-4211f2c3eb6c')
@decorators.idempotent_id('8e43bd57-e478-490c-8064-4211f2c3eb6c')
def test_provider_security_group_rule_at_beckend(self):
sg = self.create_security_provider_group(self.cmgr_adm, provider=True)
sg_id = sg.get('id')
@ -186,7 +187,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
self.assertEqual('DROP', output[0]['action'])
@test.attr(type='nsxv3')
@test.idempotent_id('cf754eba-304f-441c-8402-0dba706fcf62')
@decorators.idempotent_id('cf754eba-304f-441c-8402-0dba706fcf62')
def test_provider_security_group_at_port_level(self):
sg = self.create_security_provider_group(self.cmgr_adm,
provider=True)
@ -216,7 +217,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
port_client.update_port(port_id['port']['id'], **kwargs)
@test.attr(type='nsxv3')
@test.idempotent_id('2c44a134-f013-46b7-a2ec-14c7c38a4d8c')
@decorators.idempotent_id('2c44a134-f013-46b7-a2ec-14c7c38a4d8c')
def test_multiple_provider_security_group(self):
sg = self.create_security_provider_group(self.cmgr_adm, provider=True)
sg_id = sg.get('id')
@ -229,7 +230,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
self.assertNotEqual(sg1.get('id'), sg2.get('id'))
@test.attr(type='nsxv3')
@test.idempotent_id('275abe9f-4f01-46e5-bde0-0b6840290d3b')
@decorators.idempotent_id('275abe9f-4f01-46e5-bde0-0b6840290d3b')
def test_provider_sec_group_with_multiple_rules(self):
project_id = self.cmgr_adm.networks_client.tenant_id
sg = self.create_security_provider_group(self.cmgr_adm,
@ -247,7 +248,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
self.assertNotEqual(sg_rule1_id, sg_rule2_id)
@test.attr(type='nsxv3')
@test.idempotent_id('5d25370e-da6a-44a7-8565-7b1c2fc39fdc')
@decorators.idempotent_id('5d25370e-da6a-44a7-8565-7b1c2fc39fdc')
def test_clear_provider_sec_group_from_port(self):
project_id = self.cmgr_adm.networks_client.tenant_id
self.create_security_provider_group(self.cmgr_adm,
@ -278,7 +279,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
port_client.update_port(port_id['port']['id'], **kwargs)
@test.attr(type='nsxv3')
@test.idempotent_id('dfc6bb8e-ba7b-4ce5-b6ee-0d0830d7e152')
@decorators.idempotent_id('dfc6bb8e-ba7b-4ce5-b6ee-0d0830d7e152')
def test_check_security_group_precedence_at_beckend(self):
count = 0
project_id = self.cmgr_adm.networks_client.tenant_id
@ -304,7 +305,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
self.assertIn(provider_sg_name, sec_name['display_name'])
@test.attr(type='nsxv3')
@test.idempotent_id('37d8fbfc-eb3f-40c8-a146-70f5df937a2e')
@decorators.idempotent_id('37d8fbfc-eb3f-40c8-a146-70f5df937a2e')
def test_tenant_cannot_delete_admin_provider_security_group(self):
project_id = self.cmgr_adm.networks_client.tenant_id
sg = self.create_security_provider_group(self.cmgr_adm,
@ -320,7 +321,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
pass
@test.attr(type='nsxv3')
@test.idempotent_id('1bbebba3-780c-4e95-a95a-e52f577a6c1d')
@decorators.idempotent_id('1bbebba3-780c-4e95-a95a-e52f577a6c1d')
def test_tenant_cannot_create_provider_sec_group(self):
project_id = self.cmgr_alt.networks_client.tenant_id
self.assertRaises(exceptions.Forbidden,
@ -330,7 +331,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
LOG.info(_LI("Non-Admin Tenant cannot create provider sec group"))
@test.attr(type='nsxv3')
@test.idempotent_id('0d021bb2-9e21-422c-a509-6ac27803b2a2')
@decorators.idempotent_id('0d021bb2-9e21-422c-a509-6ac27803b2a2')
def test_update_port_with_psg(self):
net_client = self.cmgr_adm.networks_client
body = {'name': 'provider-network'}
@ -368,7 +369,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
port_client.update_port(port_id['port']['id'], **kwargs)
@test.attr(type='nsxv3')
@test.idempotent_id('2922a7fb-75fb-4d9f-9fdb-4b017c191aba')
@decorators.idempotent_id('2922a7fb-75fb-4d9f-9fdb-4b017c191aba')
def test_update_port_with_psg_using_different_tenant(self):
net_client = self.cmgr_alt.networks_client
body = {'name': 'provider-network'}
@ -405,7 +406,7 @@ class ProviderSecurityGroupTest(base.BaseAdminNetworkTest):
port_client.update_port(port_id['port']['id'], **kwargs)
@test.attr(type='nsxv3')
@test.idempotent_id('cef8d816-e5fa-45a5-a5a5-f1f2ed8fb49f')
@decorators.idempotent_id('cef8d816-e5fa-45a5-a5a5-f1f2ed8fb49f')
def test_tenant_cannot_create_provider_sec_group_for_other_tenant(self):
tenant_cmgr = self.cmgr_alt
project_id = tenant_cmgr.networks_client.tenant_id

View File

@ -18,6 +18,7 @@ from oslo_log import log as logging
from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest._i18n import _LI
@ -123,7 +124,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
self.tclient.delete_tap_service(tapservice_id)
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c1ec6-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c1ec6-8c18-11e6-ae22-56b6b6499611')
def test_create_tap_service(self):
"""
Tap service create api is tested , Tap Service is created with
@ -145,7 +146,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
self._resource_cleanup(fip, rsp['tap_service']['id'], 'null')
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c21f0-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c21f0-8c18-11e6-ae22-56b6b6499611')
def test_list_tap_service(self):
"""
Tap Service List api is tested
@ -170,7 +171,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
self._resource_cleanup(fip, rsp_create['tap_service']['id'], 'null')
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c2394-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c2394-8c18-11e6-ae22-56b6b6499611')
def test_show_tap_service(self):
"""
Tap Service Show api is tested
@ -196,7 +197,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
self._resource_cleanup(fip, rsp_create['tap_service']['id'], 'null')
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c2538-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c2538-8c18-11e6-ae22-56b6b6499611')
def test_delete_tap_service(self):
"""
Tap Service Delete api is tested
@ -224,7 +225,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
self._resource_cleanup(fip, 'null', 'null')
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c2a7e-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c2a7e-8c18-11e6-ae22-56b6b6499611')
def test_create_tap_flow(self):
"""
Tap flow create api is tested , Tap Service is created with
@ -275,7 +276,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
'id'], rsp_tap_flow['tap_flow']['id'])
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c2c5e-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c2c5e-8c18-11e6-ae22-56b6b6499611')
def test_create_tap_flow_multiple(self):
"""
Multiple Tap flow's are created in with 'IN' and 'OUT' , Tap Service
@ -338,7 +339,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
'id'], rsp_tap_flow2['tap_flow']['id'])
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c2dda-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c2dda-8c18-11e6-ae22-56b6b6499611')
def test_list_tap_flow(self):
"""
Tap flow list api is tested , Tap Service is created with
@ -391,7 +392,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
'id'], rsp_tap_flow['tap_flow']['id'])
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c2f6a-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c2f6a-8c18-11e6-ae22-56b6b6499611')
def test_show_tap_flow(self):
"""
Tap flow show api is tested , Tap Service is created with
@ -431,7 +432,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
'id'], rsp_tap_flow['tap_flow']['id'])
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c310e-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c310e-8c18-11e6-ae22-56b6b6499611')
def test_delete_tap_flow(self):
"""
Tap flow delete api is tested , Tap Service is created with
@ -482,7 +483,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
'tap_service']['id'], 'null')
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c328a-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c328a-8c18-11e6-ae22-56b6b6499611')
def test_create_tap_flow_negative_nofloatingip(self):
"""
Tap flow create api is tested , Tap Service is created with
@ -520,7 +521,7 @@ class TaaSJsonTest(base.BaseNetworkTest):
'tap_service']['id'], 'null')
@test.attr(type='nsxv3')
@test.idempotent_id('dc5c3802-8c18-11e6-ae22-56b6b6499611')
@decorators.idempotent_id('dc5c3802-8c18-11e6-ae22-56b6b6499611')
def test_create_tap_flow_negative_nosrcport(self):
"""
Tap flow create api is tested with non existent src port

View File

@ -18,6 +18,7 @@ from oslo_log import log as logging
from tempest.api.network import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest import test
from vmware_nsx_tempest.services import nsxv3_client
@ -120,41 +121,41 @@ class NSXv3DHCPUniScaleTest(base.BaseNetworkTest):
self.assertEqual(len(dhcp_bindings), scale)
@test.attr(type='nsxv3')
@test.idempotent_id('c5fa8d5d-3973-4d77-a0d4-f28b2ae92a2c')
@decorators.idempotent_id('c5fa8d5d-3973-4d77-a0d4-f28b2ae92a2c')
def test_create_100_logical_dhcp_server(self):
self._create_scale_logical_dhcp_server(100)
@test.attr(type='nsxv3')
@test.idempotent_id('c2b264a2-daab-451f-ad3b-f0713a390f47')
@decorators.idempotent_id('c2b264a2-daab-451f-ad3b-f0713a390f47')
def test_create_500_logical_dhcp_server(self):
self._create_scale_logical_dhcp_server(500)
@test.attr(type='nsxv3')
@test.idempotent_id('5ba22b0f-4593-4509-8998-a3002ce63406')
@decorators.idempotent_id('5ba22b0f-4593-4509-8998-a3002ce63406')
def test_create_1k_logical_dhcp_server(self):
self._create_scale_logical_dhcp_server(1000)
@test.attr(type='nsxv3')
@test.idempotent_id('ddf3d789-838a-428a-b4fe-8fe214f0e956')
@decorators.idempotent_id('ddf3d789-838a-428a-b4fe-8fe214f0e956')
def test_create_2k_logical_dhcp_server(self):
self._create_scale_logical_dhcp_server(2000)
@test.attr(type='nsxv3')
@test.idempotent_id('ed5441be-a700-45fa-bec1-b1d100acbb73')
@decorators.idempotent_id('ed5441be-a700-45fa-bec1-b1d100acbb73')
def test_create_4k_logical_dhcp_server(self):
self._create_scale_logical_dhcp_server(4000)
@test.attr(type='nsxv3')
@test.idempotent_id('4a5484e3-f9b8-4562-8a4c-d8974a703767')
@decorators.idempotent_id('4a5484e3-f9b8-4562-8a4c-d8974a703767')
def test_create_100_dhcp_bindings(self):
self._create_scale_dhcp_bindings(100)
@test.attr(type='nsxv3')
@test.idempotent_id('cbb8af8c-db3a-4ad2-8954-c41670956c52')
@decorators.idempotent_id('cbb8af8c-db3a-4ad2-8954-c41670956c52')
def test_create_256_dhcp_bindings(self):
self._create_scale_dhcp_bindings(256)
@test.attr(type='nsxv3')
@test.idempotent_id('ffa5db0b-5922-494d-bcd3-9d5b0b10b684')
@decorators.idempotent_id('ffa5db0b-5922-494d-bcd3-9d5b0b10b684')
def test_create_512_dhcp_bindings(self):
self._create_scale_dhcp_bindings(512)

View File

@ -20,9 +20,10 @@ import time
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
from vmware_nsx_tempest.services import nsxv3_client
CONF = config.CONF
@ -465,35 +466,35 @@ class TestAllowedAddressPair(manager.NetworkScenarioTest):
self.assertIn(ip_address_vm1, cmd_out)
@test.attr(type='nsxv3')
@test.idempotent_id('c0f0f446-65f5-40fa-8b05-b5798e8dd676')
@decorators.idempotent_id('c0f0f446-65f5-40fa-8b05-b5798e8dd676')
def test_allowed_adddress_pair_on_vms_with_single_ip(self):
self.network_topo = self.create_network_topo()
self._test_connectivity_between_allowed_adddress_pair_ports(
self.network_topo)
@test.attr(type='nsxv3')
@test.idempotent_id('92bba9d2-c7d1-42f8-a8a2-63b1c842112d')
@decorators.idempotent_id('92bba9d2-c7d1-42f8-a8a2-63b1c842112d')
def test_allowed_adddress_pair_ports_attach_as_interface_on_vms(self):
self.network_topo = self.create_network_topo()
self._test_allowed_adddress_pair_ports_attach_as_interface_on_vms(
self.network_topo)
@test.attr(type='nsxv3')
@test.idempotent_id('ceb8a0db-8b5a-46de-a328-bf6093ea2102')
@decorators.idempotent_id('ceb8a0db-8b5a-46de-a328-bf6093ea2102')
def test_allowed_adddress_with_ip_mac_attach_as_interface_on_vms(self):
self.network_topo = self.create_network_topo()
self._test_allowed_adddress_with_ip_mac_attach_as_interface_on_vms(
self.network_topo)
@test.attr(type='nsxv3')
@test.idempotent_id('735b9afb-2cb8-4e37-9603-2b918906a4df')
@decorators.idempotent_id('735b9afb-2cb8-4e37-9603-2b918906a4df')
def test_allowed_address_pair_on_vms_with_multiple_ips(self):
self.network_topo = self.create_network_topo()
self._test_allowed_address_pair_on_vms_with_multiple_ips(
self.network_topo)
@test.attr(type='nsxv3')
@test.idempotent_id('4a0fb0e0-c801-4aed-94fe-6c57ff41c6f6')
@decorators.idempotent_id('4a0fb0e0-c801-4aed-94fe-6c57ff41c6f6')
def test_vm_accessible_using_allowed_adddress_pair_port_fip(self):
self.network_topo = self.create_network_topo()
self._test_vm_accessible_using_allowed_adddress_pair_port_fip(

View File

@ -18,6 +18,7 @@ from tempest import config
from tempest import exceptions
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -206,7 +207,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
self.assertNotEqual(0, md_counter, "No logical port found for MD "
"proxy!!!")
@test.idempotent_id("e9a93161-d852-414d-aa55-36d465ea45df")
@decorators.idempotent_id("e9a93161-d852-414d-aa55-36d465ea45df")
@test.services("compute", "network")
def test_mdproxy_ping(self):
router = self._create_router(
@ -222,7 +223,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
"latest/meta-data/public-ipv4"
self._verify_md(md_url=md_url_pubic_ipv4, expected_value=self.fip)
@test.idempotent_id("743f34a6-58b8-4288-a07f-7bee21c55051")
@decorators.idempotent_id("743f34a6-58b8-4288-a07f-7bee21c55051")
@test.services("compute", "network")
def test_mdproxy_verify_backend(self):
router = self._create_router(
@ -237,7 +238,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
self.verify_metadata_in_detail(instance=instance)
self.verify_md_proxy_logical_ports_on_backend()
@test.idempotent_id("fce2acc8-b850-40fe-bf02-958dd3cd4343")
@decorators.idempotent_id("fce2acc8-b850-40fe-bf02-958dd3cd4343")
@test.services("compute", "network")
def test_mdproxy_with_server_on_two_ls(self):
router = self._create_router(
@ -254,7 +255,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
self.verify_ssh(keypair=keypair, instance=instance, port_id=port_id)
self.verify_metadata_in_detail(instance=instance)
@test.idempotent_id("67332752-1295-42cb-a8c3-99210fb6b00b")
@decorators.idempotent_id("67332752-1295-42cb-a8c3-99210fb6b00b")
@test.services("compute", "network")
def test_mdproxy_isolated_network(self):
(network_id, _) = self._create_net_subnet_router_interface()
@ -262,7 +263,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
self._create_server_on_networks([networks_ids])
self.verify_md_proxy_logical_ports_on_backend()
@test.idempotent_id("cc8d2ab8-0bea-4e32-bf80-c9c46a7612b7")
@decorators.idempotent_id("cc8d2ab8-0bea-4e32-bf80-c9c46a7612b7")
@test.attr(type=["negative"])
@test.services("compute", "network")
def test_mdproxy_delete_when_ls_bounded(self):
@ -274,7 +275,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
self.assertEqual(str(result["error_code"]),
constants.MD_ERROR_CODE_WHEN_LS_BOUNDED)
@test.idempotent_id("501fc3ea-696b-4e9e-b383-293ab94e2545")
@decorators.idempotent_id("501fc3ea-696b-4e9e-b383-293ab94e2545")
@test.services("compute", "network")
def test_mdproxy_with_multiple_ports_on_network(self):
router = self._create_router(
@ -294,7 +295,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
self.verify_ssh(keypair=keypair2, instance=instance2, port_id=port_id2)
self.verify_metadata_in_detail(instance=instance2)
@test.idempotent_id("eae21afc-50ea-42e5-9c49-2ee38cee9f06")
@decorators.idempotent_id("eae21afc-50ea-42e5-9c49-2ee38cee9f06")
@test.services("compute", "network")
def test_mdproxy_with_multiple_metadata_ports(self):
router = self._create_router(
@ -315,7 +316,7 @@ class TestMDProxy(manager.NetworkScenarioTest):
self.verify_ssh(keypair=keypair2, instance=instance2, port_id=port_id2)
self.verify_metadata_in_detail(instance=instance2)
@test.idempotent_id("29d44d7c-6ea1-4b30-a6c3-a2695c2486fe")
@decorators.idempotent_id("29d44d7c-6ea1-4b30-a6c3-a2695c2486fe")
@test.attr(type=["negative"])
@test.services("compute", "network")
def test_mdproxy_with_incorrect_password(self):

View File

@ -18,6 +18,7 @@ from oslo_log import log as logging
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -152,7 +153,7 @@ class TestMultiHVNetworkOps(manager.NetworkScenarioTest):
raise
@test.attr(type='nsxv3')
@test.idempotent_id('42373fef-cb05-47c9-bb67-32b7a3b48168')
@decorators.idempotent_id('42373fef-cb05-47c9-bb67-32b7a3b48168')
def test_multi_hv_network_l2_ops(self):
"""Test connectivity between ESX VM and KVM VM on same network

View File

@ -20,6 +20,7 @@ from oslo_log import log as logging
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -193,7 +194,7 @@ class TestMultiNetworksOps(manager.NetworkScenarioTest):
raise
@test.attr(type='nsxv3')
@test.idempotent_id('d35d1301-bfa4-49ea-acdf-f67ba97b1937')
@decorators.idempotent_id('d35d1301-bfa4-49ea-acdf-f67ba97b1937')
def test_multi_networks_ops(self):
"""Test connectivity between VMs on same and cross network

View File

@ -20,6 +20,7 @@ from oslo_log import log as logging
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -398,13 +399,13 @@ class TestProviderSecurityGroup(manager.NetworkScenarioTest):
private_key_default_vm_1)
@test.attr(type='nsxv3')
@test.idempotent_id('9d4192e9-b1b7-48c9-af04-67a82637c715')
@decorators.idempotent_id('9d4192e9-b1b7-48c9-af04-67a82637c715')
def test_connectivity_between_default_psg_server(self):
self.network_topo = self.create_network_topo()
self._test_connectivity_between_default_psg_server(self.network_topo)
@test.attr(type='nsxv3')
@test.idempotent_id('a14b5c25-39ce-4641-bd51-f28c25e69440')
@decorators.idempotent_id('a14b5c25-39ce-4641-bd51-f28c25e69440')
def test_vm_connectivity_port_update_with_psg(self):
self.network_topo = self.create_network_topo()
self.servers = self._create_vms_without_psg(self.network_topo)
@ -412,19 +413,19 @@ class TestProviderSecurityGroup(manager.NetworkScenarioTest):
self.network_topo, self.servers)
@test.attr(type='nsxv3')
@test.idempotent_id('4a8eac6a-68ff-4392-bab9-70ea08132acb')
@decorators.idempotent_id('4a8eac6a-68ff-4392-bab9-70ea08132acb')
def test_connectivity_between_default_psg_servers(self):
self.network_topo = self.create_network_topo()
self._test_build_up_topology_and_check_connectivity(self.network_topo)
@test.attr(type='nsxv3')
@test.idempotent_id('8bae2101-4f74-4d61-a7a5-42420611cf86')
@decorators.idempotent_id('8bae2101-4f74-4d61-a7a5-42420611cf86')
def test_connectivity_between_default_psg_server_with_multi_networks(self):
self.network_topo = self.create_multi_network_topo()
self._test_build_up_topology_and_check_connectivity(self.network_topo)
@test.attr(type='nsxv3')
@test.idempotent_id('998789ce-8db7-4295-bce0-390fbbf0e489')
@decorators.idempotent_id('998789ce-8db7-4295-bce0-390fbbf0e489')
def test_ping_when_psg_enabled_disbaled_on_port(self):
self.network_topo = self.create_multi_network_topo()
self._test_ping_when_psg_enabled_disbaled_on_port(self.network_topo)

View File

@ -20,6 +20,7 @@ from oslo_log import log as logging
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -254,13 +255,13 @@ class TestRouterNoNATOps(manager.NetworkScenarioTest):
self._check_nonat_network_connectivity()
@test.attr(type='nsxv3')
@test.idempotent_id('5e5bfdd4-0962-47d3-a89b-7ce64322b53e')
@decorators.idempotent_id('5e5bfdd4-0962-47d3-a89b-7ce64322b53e')
def test_router_nat_to_nonat_ops(self):
"""Test update router from NATed to NoNAT scenario"""
self._test_router_nat_update(snat=True)
@test.attr(type='nsxv3')
@test.idempotent_id('a0274738-d3e7-49db-bf10-a5563610940d')
@decorators.idempotent_id('a0274738-d3e7-49db-bf10-a5563610940d')
def test_router_nonat_to_nat_ops(self):
"""Test update router from NoNAT to NATed scenario"""
self._test_router_nat_update(snat=False)

View File

@ -19,6 +19,7 @@ from oslo_log import log as logging
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.scenario import manager
from tempest import test
@ -264,7 +265,7 @@ class TestMicroSegmentationOps(manager.NetworkScenarioTest):
should_connect)
@test.attr(type='common')
@test.idempotent_id('91e1ee1f-10d9-4b19-8350-804aea7e57b4')
@decorators.idempotent_id('91e1ee1f-10d9-4b19-8350-804aea7e57b4')
def test_micro_segmentation_ops(self):
"""Test micro-segmentation use case

View File

@ -19,12 +19,12 @@ test_vmware_nsx_tempest
Tests for `vmware_nsx_tempest` module.
"""
from tempest import test
from tempest.lib import decorators
from vmware_nsx_tempest.tests import base
class TestVmware_nsx_tempest(base.TestCase):
@test.idempotent_id('3c4c36a1-684b-4e89-8e71-a328f19324a0')
@decorators.idempotent_id('3c4c36a1-684b-4e89-8e71-a328f19324a0')
def test_something(self):
pass