diff options
| author | Sławek Kapłoński <slawek@kaplonski.pl> | 2018-05-11 13:04:23 +0200 |
|---|---|---|
| committer | Slawek Kaplonski <skaplons@redhat.com> | 2018-05-25 12:54:41 -0700 |
| commit | 9b6d02d5f958e5b2ea6155879fd0514a15ce2231 (patch) | |
| tree | a5e8938e591f43f2d651332d29c9fdcc145b8a0e /openstackclient/network | |
| parent | f7e4d31820e797e0d374e7dfde1142373245ea87 (diff) | |
| download | python-openstackclient-9b6d02d5f958e5b2ea6155879fd0514a15ce2231.tar.gz | |
Make max_burst_kbps option as optional for bw limit QoS rule
Attribute max_burst_kbps of QoS bandwidth limit rule in Neutron's
is optional in API so it should be also optional on client's side.
Change-Id: Ie085b73fa885ff12f9ac080666cf3ca6a09b632a
Related-Bug:#1770622
Task: 19658
Story: 2002017
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/v2/network_qos_rule.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openstackclient/network/v2/network_qos_rule.py b/openstackclient/network/v2/network_qos_rule.py index f50e58b3..9c4275a8 100644 --- a/openstackclient/network/v2/network_qos_rule.py +++ b/openstackclient/network/v2/network_qos_rule.py @@ -29,11 +29,11 @@ RULE_TYPE_MINIMUM_BANDWIDTH = 'minimum-bandwidth' MANDATORY_PARAMETERS = { RULE_TYPE_MINIMUM_BANDWIDTH: {'min_kbps', 'direction'}, RULE_TYPE_DSCP_MARKING: {'dscp_mark'}, - RULE_TYPE_BANDWIDTH_LIMIT: {'max_kbps', 'max_burst_kbps'}} + RULE_TYPE_BANDWIDTH_LIMIT: {'max_kbps'}} OPTIONAL_PARAMETERS = { RULE_TYPE_MINIMUM_BANDWIDTH: set(), RULE_TYPE_DSCP_MARKING: set(), - RULE_TYPE_BANDWIDTH_LIMIT: {'direction'}} + RULE_TYPE_BANDWIDTH_LIMIT: {'direction', 'max_burst_kbps'}} DIRECTION_EGRESS = 'egress' DIRECTION_INGRESS = 'ingress' DSCP_VALID_MARKS = [0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, @@ -62,11 +62,11 @@ def _check_type_parameters(attrs, type, is_create): notreq_params -= type_params if is_create and None in map(attrs.get, req_params): msg = (_('"Create" rule command for type "%(rule_type)s" requires ' - 'arguments %(args)s') % + 'arguments: %(args)s') % {'rule_type': type, 'args': ", ".join(sorted(req_params))}) raise exceptions.CommandError(msg) if set(attrs.keys()) & notreq_params: - msg = (_('Rule type "%(rule_type)s" only requires arguments %(args)s') + msg = (_('Rule type "%(rule_type)s" only requires arguments: %(args)s') % {'rule_type': type, 'args': ", ".join(sorted(type_params))}) raise exceptions.CommandError(msg) |
