Limit the operation type for scheduledoperation
Now karbor only support two types of scheduledoperation, but the client do not show and limit the values. So the end users can type any string to execute the command of 'scheduledoperation create', but the server returns error , this will make users confused, and they still not know the right value. This patch will limit the operation type in 'protect' and 'retention_protect'. Change-Id: Ic1110124472ac455f988bb25254feeb4417caf1a
This commit is contained in:
parent
b0011487e2
commit
2fe9422e04
|
@ -1106,7 +1106,9 @@ def do_scheduledoperation_list(cs, args):
|
|||
help='Trigger name.')
|
||||
@utils.arg('operation_type',
|
||||
metavar='<operation_type>',
|
||||
help='Operation Type of scheduled operation.')
|
||||
choices=['protect', 'retention_protect'],
|
||||
help='Operation Type of scheduled operation. Valid values are '
|
||||
'"protect" or "retention_protect."')
|
||||
@utils.arg('trigger_id',
|
||||
metavar='<trigger_id>',
|
||||
help='Trigger id of scheduled operation.')
|
||||
|
|
Loading…
Reference in New Issue