diff options
-rw-r--r-- | functest/opnfv_tests/openstack/vmtp/vmtp.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/vmtp/vmtp.py b/functest/opnfv_tests/openstack/vmtp/vmtp.py index edff99cb2..1686489b8 100644 --- a/functest/opnfv_tests/openstack/vmtp/vmtp.py +++ b/functest/opnfv_tests/openstack/vmtp/vmtp.py @@ -149,15 +149,14 @@ class Vmtp(singlevm.VmReady2): del new_env['OS_TENANT_ID'] except Exception: # pylint: disable=broad-except pass - extra_args = "" + cmd = ['vmtp', '-d', '--json', '{}/vmtp.json'.format(self.res_dir), + '-c', self.config] if env.get("VMTP_HYPERVISORS"): hypervisors = functest_utils.convert_ini_to_list( env.get("VMTP_HYPERVISORS")) for hypervisor in hypervisors: - extra_args = "{} --hypervisor {} ".format( - extra_args, hypervisor) - cmd = ['vmtp', '-d', '--json', '{}/vmtp.json'.format(self.res_dir), - '-c', self.config, extra_args] + cmd.extend(["--hypervisor", hypervisor]) + self.__logger.debug("cmd: %s", cmd) output = subprocess.check_output( cmd, stderr=subprocess.STDOUT, env=new_env).decode("utf-8") self.__logger.info("%s\n%s", " ".join(cmd), output) |