summaryrefslogtreecommitdiffstats
path: root/dovetail/container.py
diff options
context:
space:
mode:
authorLeo Wang <grakiss.wanglei@huawei.com>2016-12-16 02:19:28 -0500
committerLeo Wang <grakiss.wanglei@huawei.com>2016-12-18 19:54:20 -0500
commit976a73d10622aff8e3b26fb01b43be7a72318856 (patch)
tree6758c336d3c6386901b76d134969ffcf2dd02bca /dovetail/container.py
parent18ed566c5e1a379d5b87d3838dea82a9481ba61b (diff)
[dovetail tool] fetch openstack rc files without installer info
JIRA: DOVETAIL-157 dovetail tool must not depend on any installers or any SUT, so openstack rc files need to be provided to eliminate this dependency. 1. input parameters "SUT_IP"/"SUT_TYPE" must be optional, may be finally will be removed 2. new parameter "creds" to specify the file used to get access to openstack of SUT Change-Id: I877efb2a6abc198c32ed6d52b9418a35597d5867 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
Diffstat (limited to 'dovetail/container.py')
-rw-r--r--dovetail/container.py6
1 files changed, 4 insertions, 2 deletions
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 +