summaryrefslogtreecommitdiffstats
path: root/dovetail/container.py
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2017-03-22 05:25:54 -0400
committerMatthewLi <matthew.lijun@huawei.com>2017-04-01 00:02:50 -0400
commitfc04c41594a8f30e2e79b1e452b87844ee077f30 (patch)
tree57d81d88bc288505a8b0eae722209972553ea546 /dovetail/container.py
parentaa8654d4f3f727f99016aaa540c8d5aa3f79edcb (diff)
refstack result parse
JIRA: DOVETAIL-375 1, together with other testsuite from functest, such as tempest etc. this should merge after https://gerrit.opnfv.org/gerrit/#/c/31313/ 2, delete some unnecessary definition 3, bugfix of docker cp inside container, see https://build.opnfv.org/ci/view/dovetail/job/dovetail-compass-baremetal-debug-master/361/console 4, disable tempest testcaes since changed to refstack_defcore Change-Id: I67503e348af4a3f697f1b4106bfe81c05add8aa0 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'dovetail/container.py')
-rw-r--r--dovetail/container.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/dovetail/container.py b/dovetail/container.py
index 583f2e0c..4dd3b8f3 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -217,9 +217,9 @@ class Container(object):
return dt_utils.exec_cmd(cmd, cls.logger, exit_on_error)
@classmethod
- def pre_copy(cls, container_id, src_path, dest_path, exit_on_error=False):
- if src_path == "" or dest_path == "":
+ def pre_copy(cls, container_id, src_path, dest_path,
+ exit_on_error=False):
+ if not src_path or not dest_path:
return (1, 'src_path or dest_path is empty')
- cmd = 'sudo docker cp %s %s:%s' % (src_path, container_id, dest_path)
- cls.logger.debug('execute cmd %s', cmd)
- return dt_utils.exec_cmd(cmd, cls.logger, exit_on_error)
+ cmd = 'cp %s %s' % (src_path, dest_path)
+ return cls.exec_cmd(container_id, cmd, exit_on_error)