Bug:2333129

Adding policy migration update to Mac API CRUD tests

Change-Id: I5aa49f7b278f1c3cb8e82458549e69d310952fe6
This commit is contained in:
Deepthi Kandavara Jayarama 2019-04-25 21:28:32 +00:00
parent 1cde95eb3c
commit 9439952bf1

View File

@ -146,6 +146,8 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
port = self._create_mac_learn_enabled_port(self.network)
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
self._delete_port, port)
if CONF.network.backend == 'nsxp':
time.sleep(constants.NSXP_BACKEND_SMALL_TIME_INTERVAL)
self._check_mac_learning(port, mac_learn_state=True)
@decorators.attr(type='nsxv3')
@ -185,6 +187,8 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
on the MAC enabled port.
"""
port = self._create_mac_learn_enabled_port(self.network)
if CONF.network.backend == 'nsxp':
time.sleep(constants.NSXP_BACKEND_SMALL_TIME_INTERVAL)
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
self._delete_port, port)
nsx_port = self.nsx.get_logical_port(port['name'])
@ -213,6 +217,8 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
name. Check name and MAC learning configuration.
"""
test_port = self._create_mac_learn_enabled_port(self.network)
if CONF.network.backend == 'nsxp':
time.sleep(constants.NSXP_BACKEND_SMALL_TIME_INTERVAL)
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
self._delete_port, test_port)
update_port_name = data_utils.rand_name('updated_port-')
@ -239,6 +245,8 @@ class NSXv3MacLearningTest(base.BaseNetworkTest):
NSX and OS. Delete port.
"""
test_port = self._create_mac_learn_enabled_port(self.network)
if CONF.network.backend == 'nsxp':
time.sleep(constants.NSXP_BACKEND_SMALL_TIME_INTERVAL)
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
self._delete_port, test_port)
nsx_port = self.nsx.get_logical_port(test_port['name'])