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:
xiewj 2016-07-04 00:49:37 -04:00 committed by Akihiro Motoki
parent 3c5b2839bf
commit 79034dda29

View File

@ -27,18 +27,18 @@ BANDWIDTH_LIMIT_RULE_RESOURCE = 'bandwidth_limit_rule'
def add_bandwidth_limit_arguments(parser):
parser.add_argument(
'--max-kbps',
help=_('max bandwidth in kbps.'))
help=_('Maximum bandwidth in kbps.'))
parser.add_argument(
'--max-burst-kbps',
help=_('max burst bandwidth in kbps.'))
help=_('Maximum burst bandwidth in kbps.'))
def update_bandwidth_limit_args2body(parsed_args, body):
max_kbps = parsed_args.max_kbps
max_burst_kbps = parsed_args.max_burst_kbps
if not (max_kbps or max_burst_kbps):
raise exceptions.CommandError(_("Must provide max_kbps"
" or max_burst_kbps option."))
raise exceptions.CommandError(_("Must provide max-kbps"
" or max-burst-kbps option."))
neutronv20.update_dict(parsed_args, body,
['max_kbps', 'max_burst_kbps', 'tenant_id'])