Move RULE_TYPE_MINIMUM_PACKET_RATE under setup method
On Wallaby, We have pinned tempest[1] to particular commit[2]
to fix lp#1963907.
https://review.rdoproject.org/r/c/rdoinfo/+/40273 pinned
neutron-tempest-plugin at master commit to fix neutron tempest
tests in wallaby.
But the tempest tests are throwing
```
AttributeError: module 'neutron_lib.services.qos.constants'
has no attribute 'RULE_TYPE_MINIMUM_PACKET_RATE'
```
On wallaby, neutron-lib=2.10.2 is used in the RDO/Tripleo
Deployment.
https://review.opendev.org/c/openstack/neutron-lib/+/816447
Moves RULE_TYPE_MINIMUM_PACKET_RATE to neutron-lib which is available
in Yoga release and not available in wallaby neutron-lib
leading to above failure.
Moving the RULE_TYPE_MINIMUM_PACKET_RATE variable to the setup
method fixes the issue.
[1]. https://review.opendev.org/c/openstack/tempest/+/822560
[2]. https://review.rdoproject.org/r/c/rdoinfo/+/40228
Related-Bug: #1963907
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: If2badd6cbac13ddaf86fe81b48ebd69d2857f1b0
diff --git a/neutron_tempest_plugin/api/test_qos.py b/neutron_tempest_plugin/api/test_qos.py
index 59a0eb6..2929542 100644
--- a/neutron_tempest_plugin/api/test_qos.py
+++ b/neutron_tempest_plugin/api/test_qos.py
@@ -1399,8 +1399,6 @@
class QosMinimumPpsRuleTestJSON(base.BaseAdminNetworkTest):
- RULE_NAME = qos_consts.RULE_TYPE_MINIMUM_PACKET_RATE + "_rule"
- RULES_NAME = RULE_NAME + "s"
required_extensions = [qos_apidef.ALIAS]
@classmethod
@@ -1419,6 +1417,8 @@
def setUp(self):
super(QosMinimumPpsRuleTestJSON, self).setUp()
self.policy_name = data_utils.rand_name(name='test', prefix='policy')
+ self.RULE_NAME = qos_consts.RULE_TYPE_MINIMUM_PACKET_RATE + "_rule"
+ self.RULES_NAME = self.RULE_NAME + "s"
def _create_qos_min_pps_rule(self, policy_id, rule_data):
rule = self.min_pps_client.create_minimum_packet_rate_rule(