Skip to content

Commit a33f14e

Browse files
committed
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
1 parent 9400eff commit a33f14e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎doc/source/command-objects/server.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,16 +423,16 @@ Scale server to a new flavor
423423
<server>
424424
425425
os server resize
426-
--verify | --revert
426+
--confirm | --revert
427427
<server>
428428
429429
.. option:: --flavor <flavor>
430430

431431
Resize server to specified flavor
432432

433-
.. option:: --verify
433+
.. option:: --confirm
434434

435-
Verify server resize is complete
435+
Confirm server resize is complete
436436

437437
.. option:: --revert
438438

‎openstackclient/compute/v2/server.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,9 +1069,9 @@ def get_parser(self, prog_name):
10691069
help=_('Resize server to specified flavor'),
10701070
)
10711071
phase_group.add_argument(
1072-
'--verify',
1072+
'--confirm',
10731073
action="store_true",
1074-
help=_('Verify server resize is complete'),
1074+
help=_('Confirm server resize is complete'),
10751075
)
10761076
phase_group.add_argument(
10771077
'--revert',
@@ -1110,7 +1110,7 @@ def take_action(self, parsed_args):
11101110
else:
11111111
sys.stdout.write(_('\nError resizing server'))
11121112
raise SystemExit
1113-
elif parsed_args.verify:
1113+
elif parsed_args.confirm:
11141114
compute_client.servers.confirm_resize(server)
11151115
elif parsed_args.revert:
11161116
compute_client.servers.revert_resize(server)

‎openstackclient/tests/compute/v2/test_server.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def test_server_resize_no_options(self):
437437
compute_fakes.server_id,
438438
]
439439
verifylist = [
440-
('verify', False),
440+
('confirm', False),
441441
('revert', False),
442442
('server', compute_fakes.server_id),
443443
]
@@ -461,7 +461,7 @@ def test_server_resize(self):
461461
]
462462
verifylist = [
463463
('flavor', compute_fakes.flavor_id),
464-
('verify', False),
464+
('confirm', False),
465465
('revert', False),
466466
('server', compute_fakes.server_id),
467467
]
@@ -486,11 +486,11 @@ def test_server_resize(self):
486486

487487
def test_server_resize_confirm(self):
488488
arglist = [
489-
'--verify',
489+
'--confirm',
490490
compute_fakes.server_id,
491491
]
492492
verifylist = [
493-
('verify', True),
493+
('confirm', True),
494494
('revert', False),
495495
('server', compute_fakes.server_id),
496496
]
@@ -515,7 +515,7 @@ def test_server_resize_revert(self):
515515
compute_fakes.server_id,
516516
]
517517
verifylist = [
518-
('verify', False),
518+
('confirm', False),
519519
('revert', True),
520520
('server', compute_fakes.server_id),
521521
]

0 commit comments

Comments
 (0)