Skip to content

Commit b527ec1

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "network: Make 'network qos rule create --type' option required"
2 parents 7c6b689 + c58f027 commit b527ec1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

openstackclient/network/v2/network_qos_rule.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ def _get_attrs(network_client, parsed_args, is_create=False):
8484
{'rule_id': parsed_args.id})
8585
raise exceptions.CommandError(msg)
8686
else:
87-
if not parsed_args.type:
88-
msg = _('"Create" rule command requires argument "type"')
89-
raise exceptions.CommandError(msg)
9087
rule_type = parsed_args.type
9188
if parsed_args.max_kbps is not None:
9289
attrs['max_kbps'] = parsed_args.max_kbps
@@ -188,6 +185,7 @@ def get_parser(self, prog_name):
188185
parser.add_argument(
189186
'--type',
190187
metavar='<type>',
188+
required=True,
191189
choices=[RULE_TYPE_MINIMUM_BANDWIDTH,
192190
RULE_TYPE_DSCP_MARKING,
193191
RULE_TYPE_BANDWIDTH_LIMIT],

0 commit comments

Comments
 (0)