Fix for no-not router cases

Change-Id: Ibba522669ae8e57c6e38d7e38a3291afbaac1531
This commit is contained in:
Shubham Kadam 2020-12-03 12:50:22 +00:00
parent f90ca8fdce
commit 6ddbfdd5e7
3 changed files with 6 additions and 5 deletions

View File

@ -42,9 +42,9 @@ MD_BASE_URL = "http://169.254.169.254/"
# NSXV3 Port Security constants.
NSX_BACKEND_TIME_INTERVAL = 40
NSX_BACKEND_SMALL_TIME_INTERVAL = 15
NSX_BACKEND_VERY_SMALL_TIME_INTERVAL = 10
NSXP_BACKEND_SMALL_TIME_INTERVAL = 25
NSX_BACKEND_SMALL_TIME_INTERVAL = 25
NSX_BACKEND_VERY_SMALL_TIME_INTERVAL = 20
NSXP_BACKEND_SMALL_TIME_INTERVAL = 30
NSX_NETWORK_REALISE_TIMEOUT = 3
# DFW

View File

@ -130,6 +130,7 @@ class NSXv3RoutersTest(base.BaseAdminNetworkTest):
router_name=router_name, admin_state_up=True,
external_network_id=CONF.network.public_network_id)
if CONF.network.backend == 'nsxp':
time.sleep(constants.NSXP_BACKEND_SMALL_TIME_INTERVAL)
nsx_router = self.nsxp.get_logical_router(body['name'], body['id'])
self.assertEqual(body['name'], router_name)
self.assertIsNotNone(nsx_router)

View File

@ -353,12 +353,12 @@ class TestRouterNoNATOps(manager.NetworkScenarioTest):
if CONF.network.backend == 'nsxp':
route_adv_type_nat = 'TIER1_NAT' in nsx_router_policy[
'route_advertisement_types']
self.assertTrue(
self.assertFalse(
route_adv_type_nat,
nat_msg)
route_adv_type_conn = 'TIER1_CONNECTED' in nsx_router_policy[
'route_advertisement_types']
self.assertFalse(route_adv_type_conn, adv_msg)
self.assertTrue(route_adv_type_conn, adv_msg)
else:
self.assertFalse(router_adv['advertise_nat_routes'], nat_msg)
self.assertTrue(