From 8f97af85ddd623026025b4b63f89ea7500629fc6 Mon Sep 17 00:00:00 2001 From: Feng Shengqin Date: Wed, 29 Mar 2017 13:40:37 +0800 Subject: [PATCH] Fix the description of functions Change-Id: I06c7da722c2a295361e7b7b65be6980b23a372d0 --- zunclient/osc/v1/containers.py | 15 +++++++-------- zunclient/v1/containers_shell.py | 12 ++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/zunclient/osc/v1/containers.py b/zunclient/osc/v1/containers.py index 95841ea3..0817a1c0 100644 --- a/zunclient/osc/v1/containers.py +++ b/zunclient/osc/v1/containers.py @@ -359,7 +359,7 @@ class UnpauseContainer(command.Command): class ExecContainer(command.Command): - """Execute specified container""" + """Execute command in a running container""" log = logging.getLogger(__name__ + ".ExecContainer") def get_parser(self, prog_name): @@ -438,8 +438,7 @@ class LogsContainer(command.Command): class KillContainer(command.Command): - """Kill specified containers""" - + """Kill one or more running container(s)""" log = logging.getLogger(__name__ + ".KillContainers") def get_parser(self, prog_name): @@ -505,7 +504,7 @@ class StopContainer(command.Command): class RunContainer(command.ShowOne): - """Creates and run a new container""" + """Create and run a new container""" log = logging.getLogger(__name__ + ".RunContainer") @@ -636,7 +635,7 @@ class RunContainer(command.ShowOne): class RenameContainer(command.Command): - """rename specified container""" + """Rename specified container""" log = logging.getLogger(__name__ + ".RenameContainer") def get_parser(self, prog_name): @@ -665,7 +664,7 @@ class RenameContainer(command.Command): class TopContainer(command.Command): - """display the running processes inside the container""" + """Display the running processes inside the container""" log = logging.getLogger(__name__ + ".TopContainer") def get_parser(self, prog_name): @@ -695,7 +694,7 @@ class TopContainer(command.Command): class UpdateContainer(command.Command): - """Updates one or more container attributes""" + """Update one or more attributes of the container""" log = logging.getLogger(__name__ + ".UpdateContainer") def get_parser(self, prog_name): @@ -733,7 +732,7 @@ class UpdateContainer(command.Command): class AttachContainer(command.Command): - """Attach to a specified containers""" + """Attach to a running container""" log = logging.getLogger(__name__ + ".AttachContainer") diff --git a/zunclient/v1/containers_shell.py b/zunclient/v1/containers_shell.py index 6a72eae9..c4affaa5 100644 --- a/zunclient/v1/containers_shell.py +++ b/zunclient/v1/containers_shell.py @@ -345,7 +345,7 @@ def do_logs(cs, args): nargs=argparse.REMAINDER, help='The command to execute in a container') def do_exec(cs, args): - """Execute command in a container.""" + """Execute command in a running container.""" response = cs.containers.execute(args.container, ' '.join(args.command)) output = response['output'] exit_code = response['exit_code'] @@ -362,7 +362,7 @@ def do_exec(cs, args): default=None, help='The signal to kill') def do_kill(cs, args): - """kill signal to containers.""" + """Kill one or more running container(s).""" for container in args.containers: opts = {} opts['id'] = container @@ -437,7 +437,7 @@ def do_kill(cs, args): nargs=argparse.REMAINDER, help='Send command to the container') def do_run(cs, args): - """Run a command in a new container""" + """Run a command in a new container.""" opts = {} opts['name'] = args.name opts['image'] = args.image @@ -499,7 +499,7 @@ def do_rename(cs, args): metavar='', help='The container memory size in MiB') def do_update(cs, args): - """Updates one or more container attributes""" + """Update one or more attributes of the container.""" opts = {} opts['memory'] = args.memory opts['cpu'] = args.cpu @@ -514,7 +514,7 @@ def do_update(cs, args): metavar='', help='ID or name of the container to be attahed to.') def do_attach(cs, args): - """Attach to a container.""" + """Attach to a running container.""" response = cs.containers.attach(args.container) websocketclient.do_attach(response, args.container, "~", 0.5) @@ -527,7 +527,7 @@ def do_attach(cs, args): nargs=argparse.REMAINDER, help='The args of the ps command.') def do_top(cs, args): - """Displays the running processes inside the container.""" + """Display the running processes inside the container.""" output = cs.containers.top(args.container, ' '.join(args.ps_args)) for titles in output['Titles']: print("%-20s") % titles,