diff --git a/neutron/services/qos/constants.py b/neutron/services/qos/constants.py index 576c3f54412..2f3afea6c0b 100644 --- a/neutron/services/qos/constants.py +++ b/neutron/services/qos/constants.py @@ -19,4 +19,12 @@ from neutron_lib.services.qos import constants as qos_consts # to neutron-lib after neutron has the new rule. # Add qos rule packet rate limit RULE_TYPE_PACKET_RATE_LIMIT = 'packet_rate_limit' -VALID_RULE_TYPES = qos_consts.VALID_RULE_TYPES + [RULE_TYPE_PACKET_RATE_LIMIT] +# NOTE(przszc): Ensure that there are no duplicates in the list. Order of the +# items in the list must be stable, as QosRuleType OVO hash value depends on +# it. +# TODO(przszc): When a rule type is moved to neutron-lib, it can be removed +# from the list below. +VALID_RULE_TYPES = (qos_consts.VALID_RULE_TYPES + + ([RULE_TYPE_PACKET_RATE_LIMIT] if RULE_TYPE_PACKET_RATE_LIMIT not in + qos_consts.VALID_RULE_TYPES else []) +)