Changes to make cord-tester work with latest ciab/cord
Change-Id: If3b52d0a8a3dfbaa4115af086c84fd348f7648d5
diff --git a/src/test/setup/cord-test.py b/src/test/setup/cord-test.py
index 773d155..6f8ffe7 100755
--- a/src/test/setup/cord-test.py
+++ b/src/test/setup/cord-test.py
@@ -469,6 +469,8 @@
def openstack_setup(test_cnt_env):
admin_rc = os.path.join(os.getenv('HOME'), 'admin-openrc.sh')
+ if not os.access(admin_rc, os.F_OK):
+ admin_rc = os.path.join('/opt/cord_profile', 'admin-openrc.sh')
if os.access(admin_rc, os.F_OK):
dest = os.path.join(CordTester.tester_base, 'admin-openrc.sh')
shutil.copy(admin_rc, dest)
diff --git a/src/test/setup/manifest-cord.json b/src/test/setup/manifest-cord.json
index 28ec418..537791d 100644
--- a/src/test/setup/manifest-cord.json
+++ b/src/test/setup/manifest-cord.json
@@ -4,7 +4,7 @@
"start_switch": true,
"onos_image": "onosproject/onos:latest",
"onos" : "172.19.0.2",
- "onos_cord" : "/home/vagrant/onos-cord",
+ "onos_cord" : "/home/vagrant/onos_cord",
"service_profile" : "rcord",
"synchronizer" : "vtn",
"docker_network" : "onoscord_default",
diff --git a/src/test/setup/manifest-fabric.json b/src/test/setup/manifest-fabric.json
index 56c2559..129f479 100644
--- a/src/test/setup/manifest-fabric.json
+++ b/src/test/setup/manifest-fabric.json
@@ -4,7 +4,7 @@
"start_switch": true,
"onos_image": "onosproject/onos:latest",
"onos" : "172.20.0.2",
- "onos_cord" : "/home/vagrant/onos-fabric",
+ "onos_cord" : "/home/vagrant/onos_fabric",
"service_profile" : "rcord",
"synchronizer" : "fabric",
"docker_network" : "onosfabric_default",
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index 4f65fda..4458869 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -352,7 +352,7 @@
with open(self.docker_yaml, 'r') as f:
yaml_config = yaml.load(f)
image = yaml_config['services'].keys()[0]
- cord_conf_dir_basename = os.path.basename(self.onos_cord_dir.replace('-', ''))
+ cord_conf_dir_basename = os.path.basename(self.onos_cord_dir.replace('-', '').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'] = []