summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-01 21:00:22 +0000
committerGerrit Code Review <review@openstack.org>2018-06-01 21:00:22 +0000
commit8781d7e94ba0edaaad8119061ac8334058213e30 (patch)
tree1efe778b4e4a723b8dd7ce87a34c0c984ca90af2 /openstackclient/network
parent47d0d0e0c02529cf6516532758e1dc565ef7cc1a (diff)
parent9b6d02d5f958e5b2ea6155879fd0514a15ce2231 (diff)
downloadpython-openstackclient-8781d7e94ba0edaaad8119061ac8334058213e30.tar.gz
Merge "Make max_burst_kbps option as optional for bw limit QoS rule"
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/v2/network_qos_rule.py8
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)