Test: Changes to cordSubscriber to delete ovs groups before the test.
This is done through a remote rpc or local as appropriate.
This also seems to make the single channel N subscriber tests receive packets after join as OVS seems flaky otherwise.
Support for cord-test.py run to execute tests with container name setup with:
cord-test.py setup --olt --start-switch
option.
Change-Id: Ifca43e9b7e76bb231ed8ad84b6971d985b66b9e1
diff --git a/src/test/utils/CordTestServer.py b/src/test/utils/CordTestServer.py
index d946acb..3b97814 100644
--- a/src/test/utils/CordTestServer.py
+++ b/src/test/utils/CordTestServer.py
@@ -89,9 +89,18 @@
ret = os.system(exec_cmd)
return ret
+ def __run_shell(self, cmd = None):
+ ret = 0
+ if cmd is not None:
+ ret = os.system(cmd)
+ return ret
+
def run_shell_quagga(self, kwargs):
return self.__run_shell_quagga(**kwargs)
+ def run_shell(self, kwargs):
+ return self.__run_shell(**kwargs)
+
def restart_radius(self):
print('Restarting RADIUS Server')
Radius(restart = True)
@@ -167,6 +176,15 @@
return __cord_test_quagga_shell(cmd = cmd)
@nottest
+def __cord_test_shell(**kwargs):
+ return rpc_server_instance().run_shell(kwargs)
+
+@nottest
+def cord_test_shell(cmd = None):
+ '''Send shell cmd to run remotely'''
+ return __cord_test_shell(cmd = cmd)
+
+@nottest
def cord_test_quagga_stop():
data = rpc_server_instance().stop_quagga()
if data == 'DONE':