From fc04c41594a8f30e2e79b1e452b87844ee077f30 Mon Sep 17 00:00:00 2001 From: MatthewLi Date: Wed, 22 Mar 2017 05:25:54 -0400 Subject: 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 --- dovetail/container.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dovetail/container.py') 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) -- cgit 1.2.3-korg