Fix prompt message for qos-bandwidth-limit-rule-create
The option names in the error message should match the actual option names (--max-kbps and --max-burst-kbps). Change-Id: I97f57fb56030d032274270d73bdb66fddf0f58f9 Closes-Bug: #1597635
This commit is contained in:
parent
3c5b2839bf
commit
79034dda29
@ -27,18 +27,18 @@ BANDWIDTH_LIMIT_RULE_RESOURCE = 'bandwidth_limit_rule'
|
|||||||
def add_bandwidth_limit_arguments(parser):
|
def add_bandwidth_limit_arguments(parser):
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--max-kbps',
|
'--max-kbps',
|
||||||
help=_('max bandwidth in kbps.'))
|
help=_('Maximum bandwidth in kbps.'))
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--max-burst-kbps',
|
'--max-burst-kbps',
|
||||||
help=_('max burst bandwidth in kbps.'))
|
help=_('Maximum burst bandwidth in kbps.'))
|
||||||
|
|
||||||
|
|
||||||
def update_bandwidth_limit_args2body(parsed_args, body):
|
def update_bandwidth_limit_args2body(parsed_args, body):
|
||||||
max_kbps = parsed_args.max_kbps
|
max_kbps = parsed_args.max_kbps
|
||||||
max_burst_kbps = parsed_args.max_burst_kbps
|
max_burst_kbps = parsed_args.max_burst_kbps
|
||||||
if not (max_kbps or max_burst_kbps):
|
if not (max_kbps or max_burst_kbps):
|
||||||
raise exceptions.CommandError(_("Must provide max_kbps"
|
raise exceptions.CommandError(_("Must provide max-kbps"
|
||||||
" or max_burst_kbps option."))
|
" or max-burst-kbps option."))
|
||||||
neutronv20.update_dict(parsed_args, body,
|
neutronv20.update_dict(parsed_args, body,
|
||||||
['max_kbps', 'max_burst_kbps', 'tenant_id'])
|
['max_kbps', 'max_burst_kbps', 'tenant_id'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user