aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/cmd
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-01-16 09:17:48 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-01-16 09:18:44 +0000
commitfa3afbcac13e1aa3ae9cc2977dcb4cd882112f6f (patch)
treeb9884b84f976f5d75d22b447d38f3c49e4a947fd /yardstick/cmd
parentf036e9898a69f5041f9cde02e3652c29e2de1643 (diff)
Use """ to replace ''' in docstring
JIRA: YARDSTICK-525 For consistency, we always use """triple double quotes""" around docstrings. Change-Id: I47a20bbd8b55bc544b4841ea4006929af0a044ac Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'yardstick/cmd')
-rw-r--r--yardstick/cmd/__init__.py2
-rw-r--r--yardstick/cmd/cli.py14
-rw-r--r--yardstick/cmd/commands/env.py4
-rw-r--r--yardstick/cmd/commands/plugin.py8
-rw-r--r--yardstick/cmd/commands/runner.py8
-rw-r--r--yardstick/cmd/commands/scenario.py8
-rw-r--r--yardstick/cmd/commands/task.py4
-rw-r--r--yardstick/cmd/commands/testcase.py8
8 files changed, 28 insertions, 28 deletions
diff --git a/yardstick/cmd/__init__.py b/yardstick/cmd/__init__.py
index 6b7d65792..3756d9ebb 100644
--- a/yardstick/cmd/__init__.py
+++ b/yardstick/cmd/__init__.py
@@ -10,7 +10,7 @@ from __future__ import print_function
def print_hbar(barlen):
- '''print to stdout a horizontal bar'''
+ """print to stdout a horizontal bar"""
print(("+"), end=' ')
print(("-" * barlen), end=' ')
print("+")
diff --git a/yardstick/cmd/cli.py b/yardstick/cmd/cli.py
index 05bf8f06f..6281bb813 100644
--- a/yardstick/cmd/cli.py
+++ b/yardstick/cmd/cli.py
@@ -7,9 +7,9 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-'''
+"""
Command-line interface to yardstick
-'''
+"""
from __future__ import absolute_import
import logging
@@ -57,7 +57,7 @@ def find_config_files(path_list):
class YardstickCLI():
- '''Command-line interface to yardstick'''
+ """Command-line interface to yardstick"""
# Command categories
categories = {
@@ -75,7 +75,7 @@ class YardstickCLI():
get_distribution('yardstick').version
def _find_actions(self, subparsers, actions_module):
- '''find action methods'''
+ """find action methods"""
# Find action methods inside actions_module and
# add them to the command parser.
# The 'actions_module' argument may be a class
@@ -94,7 +94,7 @@ class YardstickCLI():
subparser.set_defaults(func=callback)
def _add_command_parsers(self, categories, subparsers):
- '''add commands to command-line parser'''
+ """add commands to command-line parser"""
for category in categories:
command_object = categories[category]()
desc = command_object.__doc__ or ''
@@ -156,7 +156,7 @@ class YardstickCLI():
CONF.unregister_opts(self.opts)
def main(self, argv): # pragma: no cover
- '''run the command line interface'''
+ """run the command line interface"""
try:
self._register_cli_opt()
@@ -169,7 +169,7 @@ class YardstickCLI():
self._clear_config_opts()
def api(self, argv, task_id): # pragma: no cover
- '''run the api interface'''
+ """run the api interface"""
try:
self._register_cli_opt()
diff --git a/yardstick/cmd/commands/env.py b/yardstick/cmd/commands/env.py
index dfcb63727..d5aef7faf 100644
--- a/yardstick/cmd/commands/env.py
+++ b/yardstick/cmd/commands/env.py
@@ -20,10 +20,10 @@ from yardstick.common.httpClient import HttpClient
class EnvCommand(object):
- '''
+ """
Set of commands to prepare environment
- '''
+ """
def do_influxdb(self, args):
data = {'action': 'createInfluxDBContainer'}
diff --git a/yardstick/cmd/commands/plugin.py b/yardstick/cmd/commands/plugin.py
index c3e951e8c..f97c490b7 100644
--- a/yardstick/cmd/commands/plugin.py
+++ b/yardstick/cmd/commands/plugin.py
@@ -18,21 +18,21 @@ from yardstick.cmd.commands import change_osloobj_to_paras
class PluginCommands(object):
- '''Plugin commands.
+ """Plugin commands.
Set of commands to manage plugins.
- '''
+ """
@cliargs("input_file", type=str, help="path to plugin configuration file",
nargs=1)
def do_install(self, args):
- '''Install a plugin.'''
+ """Install a plugin."""
param = change_osloobj_to_paras(args)
Plugin().install(param)
@cliargs("input_file", type=str, help="path to plugin configuration file",
nargs=1)
def do_remove(self, args):
- '''Remove a plugin.'''
+ """Remove a plugin."""
param = change_osloobj_to_paras(args)
Plugin().remove(param)
diff --git a/yardstick/cmd/commands/runner.py b/yardstick/cmd/commands/runner.py
index 02176aba3..b99ae789b 100644
--- a/yardstick/cmd/commands/runner.py
+++ b/yardstick/cmd/commands/runner.py
@@ -18,18 +18,18 @@ from yardstick.cmd.commands import change_osloobj_to_paras
class RunnerCommands(object):
- '''Runner commands.
+ """Runner commands.
Set of commands to discover and display runner types.
- '''
+ """
def do_list(self, args):
- '''List existing runner types'''
+ """List existing runner types"""
param = change_osloobj_to_paras(args)
Runners().list_all(param)
@cliargs("type", type=str, help="runner type", nargs=1)
def do_show(self, args):
- '''Show details of a specific runner type'''
+ """Show details of a specific runner type"""
param = change_osloobj_to_paras(args)
Runners().show(param)
diff --git a/yardstick/cmd/commands/scenario.py b/yardstick/cmd/commands/scenario.py
index 5a6d04f55..618ed2915 100644
--- a/yardstick/cmd/commands/scenario.py
+++ b/yardstick/cmd/commands/scenario.py
@@ -17,18 +17,18 @@ from yardstick.cmd.commands import change_osloobj_to_paras
class ScenarioCommands(object):
- '''Scenario commands.
+ """Scenario commands.
Set of commands to discover and display scenario types.
- '''
+ """
def do_list(self, args):
- '''List existing scenario types'''
+ """List existing scenario types"""
param = change_osloobj_to_paras(args)
Scenarios().list_all(param)
@cliargs("type", type=str, help="runner type", nargs=1)
def do_show(self, args):
- '''Show details of a specific scenario type'''
+ """Show details of a specific scenario type"""
param = change_osloobj_to_paras(args)
Scenarios().show(param)
diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py
index fa82f078f..1c5db1f46 100644
--- a/yardstick/cmd/commands/task.py
+++ b/yardstick/cmd/commands/task.py
@@ -19,10 +19,10 @@ output_file_default = "/tmp/yardstick.out"
class TaskCommands(object):
- '''Task commands.
+ """Task commands.
Set of commands to manage benchmark tasks.
- '''
+ """
@cliargs("inputfile", type=str, help="path to task or suite file", nargs=1)
@cliargs("--task-args", dest="task_args",
diff --git a/yardstick/cmd/commands/testcase.py b/yardstick/cmd/commands/testcase.py
index 92831ad2f..bd17b1aa5 100644
--- a/yardstick/cmd/commands/testcase.py
+++ b/yardstick/cmd/commands/testcase.py
@@ -17,18 +17,18 @@ from yardstick.cmd.commands import change_osloobj_to_paras
class TestcaseCommands(object):
- '''Testcase commands.
+ """Testcase commands.
Set of commands to discover and display test cases.
- '''
+ """
def do_list(self, args):
- '''List existing test cases'''
+ """List existing test cases"""
param = change_osloobj_to_paras(args)
Testcase().list_all(param)
@cliargs("casename", type=str, help="test case name", nargs=1)
def do_show(self, args):
- '''Show details of a specific test case'''
+ """Show details of a specific test case"""
param = change_osloobj_to_paras(args)
Testcase().show(param)