Add warning message for --state option of set command in volume
There are some set commands can set object state, it maybe a danger behavor for users, so add explanation and warning in the help message of the "--state" option to talk users be caution when using (cinderclient have done this too) Change-Id: I6a902887ea98879999c9972f36b1b7ef332173c3
This commit is contained in:
parent
559215d59d
commit
3ebc7520a6
@ -123,8 +123,9 @@ Set snapshot properties
|
|||||||
.. option:: --state <state>
|
.. option:: --state <state>
|
||||||
|
|
||||||
New snapshot state.
|
New snapshot state.
|
||||||
Valid values are "available", "error", "creating",
|
("available", "error", "creating", "deleting", or "error_deleting") (admin only)
|
||||||
"deleting", and "error_deleting".
|
(This option simply changes the state of the snapshot in the database with
|
||||||
|
no regard to actual status, exercise caution when using)
|
||||||
|
|
||||||
*Volume version 2 only*
|
*Volume version 2 only*
|
||||||
|
|
||||||
|
@ -140,6 +140,8 @@ Set volume backup properties
|
|||||||
.. option:: --state <state>
|
.. option:: --state <state>
|
||||||
|
|
||||||
New backup state ("available" or "error") (admin only)
|
New backup state ("available" or "error") (admin only)
|
||||||
|
(This option simply changes the state of the backup in the database with
|
||||||
|
no regard to actual status, exercise caution when using)
|
||||||
|
|
||||||
.. _backup_set-volume-backup:
|
.. _backup_set-volume-backup:
|
||||||
.. describe:: <backup>
|
.. describe:: <backup>
|
||||||
|
@ -235,7 +235,9 @@ Set volume properties
|
|||||||
|
|
||||||
New volume state
|
New volume state
|
||||||
("available", "error", "creating", "deleting", "in-use",
|
("available", "error", "creating", "deleting", "in-use",
|
||||||
"attaching", "detaching", "error_deleting" or "maintenance")
|
"attaching", "detaching", "error_deleting" or "maintenance") (admin only)
|
||||||
|
(This option simply changes the state of the volume in the database with
|
||||||
|
no regard to actual status, exercise caution when using)
|
||||||
|
|
||||||
*Volume version 2 only*
|
*Volume version 2 only*
|
||||||
|
|
||||||
|
@ -305,7 +305,10 @@ class SetVolumeBackup(command.Command):
|
|||||||
'--state',
|
'--state',
|
||||||
metavar='<state>',
|
metavar='<state>',
|
||||||
choices=['available', 'error'],
|
choices=['available', 'error'],
|
||||||
help=_('New backup state ("available" or "error") (admin only)'),
|
help=_('New backup state ("available" or "error") (admin only) '
|
||||||
|
'(This option simply changes the state of the backup '
|
||||||
|
'in the database with no regard to actual status, '
|
||||||
|
'exercise caution when using)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
@ -230,8 +230,11 @@ class SetSnapshot(command.Command):
|
|||||||
metavar='<state>',
|
metavar='<state>',
|
||||||
choices=['available', 'error', 'creating', 'deleting',
|
choices=['available', 'error', 'creating', 'deleting',
|
||||||
'error-deleting'],
|
'error-deleting'],
|
||||||
help=_('New snapshot state. Valid values are available, '
|
help=_('New snapshot state. ("available", "error", "creating", '
|
||||||
'error, creating, deleting, and error-deleting.'),
|
'"deleting", or "error_deleting") (admin only) '
|
||||||
|
'(This option simply changes the state of the snapshot '
|
||||||
|
'in the database with no regard to actual status, '
|
||||||
|
'exercise caution when using)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
@ -402,7 +402,10 @@ class SetVolume(command.Command):
|
|||||||
'maintenance'],
|
'maintenance'],
|
||||||
help=_('New volume state ("available", "error", "creating", '
|
help=_('New volume state ("available", "error", "creating", '
|
||||||
'"deleting", "in-use", "attaching", "detaching", '
|
'"deleting", "in-use", "attaching", "detaching", '
|
||||||
'"error_deleting" or "maintenance")'),
|
'"error_deleting" or "maintenance") (admin only) '
|
||||||
|
'(This option simply changes the state of the volume '
|
||||||
|
'in the database with no regard to actual status, '
|
||||||
|
'exercise caution when using)'),
|
||||||
)
|
)
|
||||||
bootable_group = parser.add_mutually_exclusive_group()
|
bootable_group = parser.add_mutually_exclusive_group()
|
||||||
bootable_group.add_argument(
|
bootable_group.add_argument(
|
||||||
|
Loading…
Reference in New Issue
Block a user