If the docker yaml for the onos cord instance being wrapped does not have a volume to be patched against,
create a new one with our config volume.
Change-Id: I764aef35611665bfb74643737d69258660d35ed5
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index 2f34675..309e085 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -323,6 +323,8 @@
image = yaml_config['services'].keys()[0]
cord_conf_dir_basename = os.path.basename(self.onos_cord_dir.replace('-', ''))
xos_onos_name = '{}_{}_1'.format(cord_conf_dir_basename, image)
+ if not yaml_config['services'][image].has_key('volumes'):
+ yaml_config['services'][image]['volumes'] = []
volumes = yaml_config['services'][image]['volumes']
config_volumes = filter(lambda e: e.find(self.onos_config_dir_guest) >= 0, volumes)
if not config_volumes: