Merge "Use os.path.join to form the cli command"
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 8e0061f..0af8e9b 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -336,8 +336,8 @@
# ssh username for the image file
ssh_user = cirros
-[CLI]
+[cli]
# Enable cli tests
enabled = True
# directory where python client binaries are located
-cli_dir = /usr/local/bin/
+cli_dir = /usr/local/bin
diff --git a/tempest/cli/__init__.py b/tempest/cli/__init__.py
index 353607b..5bbedfd 100644
--- a/tempest/cli/__init__.py
+++ b/tempest/cli/__init__.py
@@ -16,6 +16,7 @@
# under the License.
import logging
+import os
import shlex
import subprocess
@@ -99,7 +100,7 @@
def cmd(self, cmd, action, flags='', params='', fail_ok=False,
merge_stderr=False):
"""Executes specified command for the given action."""
- cmd = ' '.join([CONF.cli.cli_dir + cmd,
+ cmd = ' '.join([os.path.join(CONF.cli.cli_dir, cmd),
flags, action, params])
LOG.info("running: '%s'" % cmd)
cmd = shlex.split(cmd)