Rename --verify for server resize to avoid conflict

Currently server resize command has a verify argument for user to
confirm resize operation. But this argument is also registered by
openstack client shell which is used to enable server certificate
verification. So verify argument can not be correctly passed to
server resize command.

This patch renames --verify to --confirm (nova client has a
resize-confirm command) to solve this problem.

Change-Id: I751aa3df16c3b637b82944dd350afc5cbab62120
Closes-Bug: #1416542
This commit is contained in:
zhiyuan_cai 2015-02-16 11:00:50 +08:00
parent 9400effd4b
commit a33f14e298
3 changed files with 11 additions and 11 deletions

View File

@ -423,16 +423,16 @@ Scale server to a new flavor
<server>
os server resize
--verify | --revert
--confirm | --revert
<server>
.. option:: --flavor <flavor>
Resize server to specified flavor
.. option:: --verify
.. option:: --confirm
Verify server resize is complete
Confirm server resize is complete
.. option:: --revert

View File

@ -1069,9 +1069,9 @@ class ResizeServer(command.Command):
help=_('Resize server to specified flavor'),
)
phase_group.add_argument(
'--verify',
'--confirm',
action="store_true",
help=_('Verify server resize is complete'),
help=_('Confirm server resize is complete'),
)
phase_group.add_argument(
'--revert',
@ -1110,7 +1110,7 @@ class ResizeServer(command.Command):
else:
sys.stdout.write(_('\nError resizing server'))
raise SystemExit
elif parsed_args.verify:
elif parsed_args.confirm:
compute_client.servers.confirm_resize(server)
elif parsed_args.revert:
compute_client.servers.revert_resize(server)

View File

@ -437,7 +437,7 @@ class TestServerResize(TestServer):
compute_fakes.server_id,
]
verifylist = [
('verify', False),
('confirm', False),
('revert', False),
('server', compute_fakes.server_id),
]
@ -461,7 +461,7 @@ class TestServerResize(TestServer):
]
verifylist = [
('flavor', compute_fakes.flavor_id),
('verify', False),
('confirm', False),
('revert', False),
('server', compute_fakes.server_id),
]
@ -486,11 +486,11 @@ class TestServerResize(TestServer):
def test_server_resize_confirm(self):
arglist = [
'--verify',
'--confirm',
compute_fakes.server_id,
]
verifylist = [
('verify', True),
('confirm', True),
('revert', False),
('server', compute_fakes.server_id),
]
@ -515,7 +515,7 @@ class TestServerResize(TestServer):
compute_fakes.server_id,
]
verifylist = [
('verify', False),
('confirm', False),
('revert', True),
('server', compute_fakes.server_id),
]