Option to run cord-tester setup in foreground.
Delete relay configuration instead of restarting onos after tests.
Make sure prerequisites can be run on other ubuntu distros
Change-Id: Ic04a5dab41b013088cda651afe32abae8030c8d8
diff --git a/src/test/dhcprelay/dhcprelayTest.py b/src/test/dhcprelay/dhcprelayTest.py
index ea0ff47..9b8e7c4 100644
--- a/src/test/dhcprelay/dhcprelayTest.py
+++ b/src/test/dhcprelay/dhcprelayTest.py
@@ -68,6 +68,7 @@
total_failure = 0
#just in case we want to reset ONOS to default network cfg after relay tests
onos_restartable = bool(int(os.getenv('ONOS_RESTART', 0)))
+ configs = {}
@classmethod
def setUpClass(cls):
@@ -131,9 +132,11 @@
@classmethod
def dhcp_relay_cleanup(cls):
##reset the ONOS port configuration back to default
- if cls.onos_restartable is True:
- log.info('Cleaning up dhcp relay config by restarting ONOS with default network cfg')
- return cord_test_onos_restart(config = {})
+ for config in cls.configs.items():
+ OnosCtrl.delete(config)
+ # if cls.onos_restartable is True:
+ # log.info('Cleaning up dhcp relay config by restarting ONOS with default network cfg')
+ # return cord_test_onos_restart(config = {})
@classmethod
def onos_load_config(cls, config):
@@ -158,6 +161,7 @@
interface_list.append(interface_map)
cls.onos_load_config(interface_dict)
+ cls.configs['interface_config'] = interface_dict
@classmethod
def onos_dhcp_relay_load(cls, server_ip, server_mac):
@@ -171,6 +175,7 @@
}
}
cls.onos_load_config(dhcp_dict)
+ cls.configs['relay_config'] = dhcp_dict
@classmethod
def get_host_ip(cls, port):