summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dovetail/conf/cmd_config.yml6
-rw-r--r--dovetail/conf/dovetail_config.yml4
-rw-r--r--dovetail/conf/functest_config.yml1
-rw-r--r--dovetail/conf/yardstick_config.yml1
-rw-r--r--dovetail/container.py6
5 files changed, 16 insertions, 2 deletions
diff --git a/dovetail/conf/cmd_config.yml b/dovetail/conf/cmd_config.yml
index e2159ca7..1c6418cb 100644
--- a/dovetail/conf/cmd_config.yml
+++ b/dovetail/conf/cmd_config.yml
@@ -52,6 +52,12 @@ cli:
path:
- 'functest/docker_tag'
help: 'Overwrite tag for functest docker container (e.g. stable or latest)'
+ creds:
+ flags:
+ - '--creds'
+ path:
+ - 'creds'
+ help: 'Openstack Credential file location'
control:
testsuite:
flags:
diff --git a/dovetail/conf/dovetail_config.yml b/dovetail/conf/dovetail_config.yml
index c01394ed..837f8840 100644
--- a/dovetail/conf/dovetail_config.yml
+++ b/dovetail/conf/dovetail_config.yml
@@ -3,6 +3,10 @@ work_dir: /home/opnfv/dovetail
result_dir: /home/opnfv/dovetail/results
report_file: 'dovetail_report.txt'
cli_file_name: 'cmd_config.yml'
+
+# OPENSTACK Credential file
+creds: '/home/opnfv/dovetail/openstack.creds'
+
# TO DO: once version scheme settled, adjust accordingly
repo: 'https://github.com/opnfv/dovetail/tree/master/'
COMPLIANCE_PATH: ./compliance/
diff --git a/dovetail/conf/functest_config.yml b/dovetail/conf/functest_config.yml
index 682d19bf..ceb894b3 100644
--- a/dovetail/conf/functest_config.yml
+++ b/dovetail/conf/functest_config.yml
@@ -17,3 +17,4 @@ functest:
store_type: 'file'
file_path: 'tempest/tempest.log'
db_url: 'http://testresults.opnfv.org/test/api/v1/results?case=%s&last=1'
+ creds: '/home/opnfv/functest/conf/openstack.creds'
diff --git a/dovetail/conf/yardstick_config.yml b/dovetail/conf/yardstick_config.yml
index d13cf2c6..d971c104 100644
--- a/dovetail/conf/yardstick_config.yml
+++ b/dovetail/conf/yardstick_config.yml
@@ -24,3 +24,4 @@ yardstick:
store_type: 'file'
file_path: 'yardstick.log'
db_url: 'http://testresults.opnfv.org/test/api/v1/results?case=%s&last=1'
+ creds: '/home/opnfv/yardstick/openstack.creds'
diff --git a/dovetail/container.py b/dovetail/container.py
index 87174727..3b960c07 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -46,10 +46,12 @@ class Container:
docker_image = cls.get_docker_image(type)
envs = dovetail_config[type]['envs']
opts = dovetail_config[type]['opts']
+ creds = ' -v %s:%s ' % (dovetail_config['creds'],
+ dovetail_config[type]['creds'])
result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'],
dovetail_config[type]['result']['dir'])
- cmd = 'sudo docker run %s %s %s %s %s /bin/bash' % \
- (opts, envs, sshkey, result_volume, docker_image)
+ cmd = 'sudo docker run %s %s %s %s %s %s /bin/bash' % \
+ (opts, envs, sshkey, creds, result_volume, docker_image)
dt_utils.exec_cmd(cmd, cls.logger)
ret, container_id = \
dt_utils.exec_cmd("sudo docker ps | grep " + docker_image +