diff options
Diffstat (limited to 'yardstick/cmd')
-rw-r--r-- | yardstick/cmd/__init__.py | 5 | ||||
-rw-r--r-- | yardstick/cmd/cli.py | 1 | ||||
-rw-r--r-- | yardstick/cmd/commands/__init__.py | 1 | ||||
-rw-r--r-- | yardstick/cmd/commands/env.py | 11 | ||||
-rw-r--r-- | yardstick/cmd/commands/plugin.py | 3 | ||||
-rw-r--r-- | yardstick/cmd/commands/runner.py | 3 | ||||
-rw-r--r-- | yardstick/cmd/commands/scenario.py | 2 | ||||
-rw-r--r-- | yardstick/cmd/commands/task.py | 4 | ||||
-rw-r--r-- | yardstick/cmd/commands/testcase.py | 3 |
9 files changed, 27 insertions, 6 deletions
diff --git a/yardstick/cmd/__init__.py b/yardstick/cmd/__init__.py index df891e304..6b7d65792 100644 --- a/yardstick/cmd/__init__.py +++ b/yardstick/cmd/__init__.py @@ -6,10 +6,11 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +from __future__ import print_function def print_hbar(barlen): '''print to stdout a horizontal bar''' - print("+"), - print("-" * barlen), + print(("+"), end=' ') + print(("-" * barlen), end=' ') print("+") diff --git a/yardstick/cmd/cli.py b/yardstick/cmd/cli.py index beaa187aa..05bf8f06f 100644 --- a/yardstick/cmd/cli.py +++ b/yardstick/cmd/cli.py @@ -11,6 +11,7 @@ Command-line interface to yardstick ''' +from __future__ import absolute_import import logging import os import sys diff --git a/yardstick/cmd/commands/__init__.py b/yardstick/cmd/commands/__init__.py index ba229d481..5c5356736 100644 --- a/yardstick/cmd/commands/__init__.py +++ b/yardstick/cmd/commands/__init__.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from yardstick.benchmark.core import Param diff --git a/yardstick/cmd/commands/env.py b/yardstick/cmd/commands/env.py index d0fc75dd3..dfcb63727 100644 --- a/yardstick/cmd/commands/env.py +++ b/yardstick/cmd/commands/env.py @@ -6,13 +6,17 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +from __future__ import absolute_import from __future__ import print_function -import time + import os import sys +import time + +from six.moves import range -from yardstick.common.httpClient import HttpClient from yardstick.common import constants as consts +from yardstick.common.httpClient import HttpClient class EnvCommand(object): @@ -20,6 +24,7 @@ class EnvCommand(object): Set of commands to prepare environment ''' + def do_influxdb(self, args): data = {'action': 'createInfluxDBContainer'} task_id = self._start_async_task(data) @@ -52,7 +57,7 @@ class EnvCommand(object): CHECK_STATUS_RETRY = 20 CHECK_STATUS_DELAY = 5 - for retry in xrange(CHECK_STATUS_RETRY): + for retry in range(CHECK_STATUS_RETRY): response = HttpClient().get(url) status = response['status'] diff --git a/yardstick/cmd/commands/plugin.py b/yardstick/cmd/commands/plugin.py index 94095665a..c3e951e8c 100644 --- a/yardstick/cmd/commands/plugin.py +++ b/yardstick/cmd/commands/plugin.py @@ -9,6 +9,9 @@ """ Handler for yardstick command 'plugin' """ +from __future__ import print_function + +from __future__ import absolute_import from yardstick.benchmark.core.plugin import Plugin from yardstick.common.utils import cliargs from yardstick.cmd.commands import change_osloobj_to_paras diff --git a/yardstick/cmd/commands/runner.py b/yardstick/cmd/commands/runner.py index 62a2082c4..02176aba3 100644 --- a/yardstick/cmd/commands/runner.py +++ b/yardstick/cmd/commands/runner.py @@ -9,6 +9,9 @@ """ Handler for yardstick command 'runner' """ +from __future__ import print_function + +from __future__ import absolute_import from yardstick.benchmark.core.runner import Runners from yardstick.common.utils import cliargs from yardstick.cmd.commands import change_osloobj_to_paras diff --git a/yardstick/cmd/commands/scenario.py b/yardstick/cmd/commands/scenario.py index 6aa3a451a..5a6d04f55 100644 --- a/yardstick/cmd/commands/scenario.py +++ b/yardstick/cmd/commands/scenario.py @@ -9,6 +9,8 @@ """ Handler for yardstick command 'scenario' """ +from __future__ import print_function +from __future__ import absolute_import from yardstick.benchmark.core.scenario import Scenarios from yardstick.common.utils import cliargs from yardstick.cmd.commands import change_osloobj_to_paras diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py index bd018bcab..fa82f078f 100644 --- a/yardstick/cmd/commands/task.py +++ b/yardstick/cmd/commands/task.py @@ -8,11 +8,13 @@ ############################################################################## """ Handler for yardstick command 'task' """ +from __future__ import print_function + +from __future__ import absolute_import from yardstick.benchmark.core.task import Task from yardstick.common.utils import cliargs from yardstick.cmd.commands import change_osloobj_to_paras - output_file_default = "/tmp/yardstick.out" diff --git a/yardstick/cmd/commands/testcase.py b/yardstick/cmd/commands/testcase.py index 6ff796238..92831ad2f 100644 --- a/yardstick/cmd/commands/testcase.py +++ b/yardstick/cmd/commands/testcase.py @@ -8,6 +8,9 @@ ############################################################################## """ Handler for yardstick command 'testcase' """ +from __future__ import print_function + +from __future__ import absolute_import from yardstick.benchmark.core.testcase import Testcase from yardstick.common.utils import cliargs from yardstick.cmd.commands import change_osloobj_to_paras |