Merge "Trivial clean up: do not use plural form in command arguments."

This commit is contained in:
Jenkins 2015-11-02 10:57:02 +00:00 committed by Gerrit Code Review
commit d4fb5cefda
2 changed files with 5 additions and 5 deletions

View File

@ -607,7 +607,7 @@ class DeleteServer(command.Command):
def get_parser(self, prog_name):
parser = super(DeleteServer, self).get_parser(prog_name)
parser.add_argument(
'servers',
'server',
metavar='<server>',
nargs="+",
help=_('Server(s) to delete (name or ID)'),
@ -622,7 +622,7 @@ class DeleteServer(command.Command):
@utils.log_method(log)
def take_action(self, parsed_args):
compute_client = self.app.client_manager.compute
for server in parsed_args.servers:
for server in parsed_args.server:
server_obj = utils.find_resource(
compute_client.servers, server)
compute_client.servers.delete(server_obj.id)

View File

@ -311,7 +311,7 @@ class TestServerDelete(TestServer):
compute_fakes.server_id,
]
verifylist = [
('servers', [compute_fakes.server_id]),
('server', [compute_fakes.server_id]),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
@ -328,7 +328,7 @@ class TestServerDelete(TestServer):
compute_fakes.server_id, '--wait'
]
verifylist = [
('servers', [compute_fakes.server_id]),
('server', [compute_fakes.server_id]),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
@ -351,7 +351,7 @@ class TestServerDelete(TestServer):
compute_fakes.server_id, '--wait'
]
verifylist = [
('servers', [compute_fakes.server_id]),
('server', [compute_fakes.server_id]),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)