Test:Provide a setup phase for cord-tester which just starts/provisions required containers for testing.
It also starts a container management rpc server for remote container restarts with configuration from tests.
Use simple xmlrpc server for container management over our own in cord-test server.
Add dependencies pertaining to the new change in tester for the dockerfile.
This way, we now can setup the cord-tester in one node and launch the test from a test container in another node in the podd.
Change-Id: Ie99540e5455f46ee515c7c5341af7ec94892e438
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index dcc5de4..f22dbfd 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -231,7 +231,7 @@
for _,g in self.host_guest_map:
volumes.append(g)
if network_cfg is not None:
- json_data = json.dumps(network_cfg)
+ json_data = json.dumps(network_cfg, indent=4)
with open('{}/network-cfg.json'.format(self.host_config_dir), 'w') as f:
f.write(json_data)
print('Starting ONOS container %s' %self.name)
@@ -358,3 +358,7 @@
'''.format(onos_quagga_ip)
super(Quagga, cls).build_image(dockerfile, image)
print('Done building image %s' %image)
+
+def reinitContainerClients():
+ docker_netns.dckr = Client()
+ Container.dckr = Client()