Merge "use service type constants from neutron_lib plugins"
diff --git a/neutron/tests/tempest/api/admin/test_routers_dvr.py b/neutron/tests/tempest/api/admin/test_routers_dvr.py
index 5fa22cc..8f03cc6 100644
--- a/neutron/tests/tempest/api/admin/test_routers_dvr.py
+++ b/neutron/tests/tempest/api/admin/test_routers_dvr.py
@@ -90,10 +90,12 @@
name = data_utils.rand_name('router')
# router needs to be in admin state down in order to be upgraded to DVR
router = self.admin_client.create_router(name, distributed=False,
+ ha=False,
admin_state_up=False)
self.addCleanup(self.admin_client.delete_router,
router['router']['id'])
self.assertFalse(router['router']['distributed'])
+ self.assertFalse(router['router']['ha'])
router = self.admin_client.update_router(router['router']['id'],
distributed=True)
self.assertTrue(router['router']['distributed'])
diff --git a/neutron/tests/tempest/api/test_qos.py b/neutron/tests/tempest/api/test_qos.py
index 93f96b7..0a9bcda 100644
--- a/neutron/tests/tempest/api/test_qos.py
+++ b/neutron/tests/tempest/api/test_qos.py
@@ -156,29 +156,21 @@
def _test_list_rule_types(self, client):
# List supported rule types
- # TODO(QoS): since in gate we run both ovs and linuxbridge ml2 drivers,
- # and since Linux Bridge ml2 driver does not have QoS support yet, ml2
- # plugin reports no rule types are supported. Once linuxbridge will
- # receive support for QoS, the list of expected rule types will change.
+ # Since returned rule types depends on loaded backend drivers this test
+ # is checking only if returned keys are same as expected keys
#
# In theory, we could make the test conditional on which ml2 drivers
# are enabled in gate (or more specifically, on which supported qos
# rules are claimed by core plugin), but that option doesn't seem to be
# available through tempest.lib framework
- expected_rule_types = []
- expected_rule_details = ['type']
+ expected_rule_keys = ['type']
rule_types = client.list_qos_rule_types()
actual_list_rule_types = rule_types['rule_types']
- actual_rule_types = [rule['type'] for rule in actual_list_rule_types]
# Verify that only required fields present in rule details
for rule in actual_list_rule_types:
- self.assertEqual(tuple(rule.keys()), tuple(expected_rule_details))
-
- # Verify if expected rules are present in the actual rules list
- for rule in expected_rule_types:
- self.assertIn(rule, actual_rule_types)
+ self.assertEqual(tuple(expected_rule_keys), tuple(rule.keys()))
def _disassociate_network(self, client, network_id):
updated_network = client.update_network(network_id,
diff --git a/neutron/tests/tempest/api/test_routers.py b/neutron/tests/tempest/api/test_routers.py
index 4275729..8572196 100644
--- a/neutron/tests/tempest/api/test_routers.py
+++ b/neutron/tests/tempest/api/test_routers.py
@@ -242,8 +242,15 @@
@decorators.idempotent_id('644d7a4a-01a1-4b68-bb8d-0c0042cb1729')
def test_convert_centralized_router(self):
- router = self._create_router(data_utils.rand_name('router'))
- self.assertNotIn('distributed', router)
+ router_args = {'tenant_id': self.client.tenant_id,
+ 'distributed': False, 'ha': False}
+ router = self.admin_client.create_router(
+ data_utils.rand_name('router'), admin_state_up=False,
+ **router_args)['router']
+ self.addCleanup(self.admin_client.delete_router,
+ router['id'])
+ self.assertFalse(router['distributed'])
+ self.assertFalse(router['ha'])
update_body = self.admin_client.update_router(router['id'],
distributed=True)
self.assertTrue(update_body['router']['distributed'])
@@ -251,6 +258,7 @@
self.assertTrue(show_body['router']['distributed'])
show_body = self.client.show_router(router['id'])
self.assertNotIn('distributed', show_body['router'])
+ self.assertNotIn('ha', show_body['router'])
class HaRoutersTest(base_routers.BaseRouterTest):