Fix the smoke test error

1. What is the problem?

the smoke test can not pass, because the new

neutron qos code forbid duplicate rule create.

2. What is the solution to the problem?

adds additional check of such duplicated rules.

3. What the features to be implemented in the Tricircle to realize the solution?

No new features.

Change-Id: I7d208aeb6926877b944e114e2c714986ea46c683
This commit is contained in:
songbaisen 2018-02-27 18:57:36 +08:00
parent 147a38f573
commit 9230c98ee7
1 changed files with 4 additions and 7 deletions

View File

@ -140,20 +140,17 @@ class TricircleQosTestMixin(object):
pod_id, project_id, constants.RT_QOS)
rule_data = {
"bandwidth_limit_rule": {
"max_kbps": "10000",
"max_burst_kbps": "20000"
"minimum_bandwidth_rule": {
"min_kbps": "1000"
}
}
t_rule = plugin.create_policy_rule(
q_ctx, rule.QosBandwidthLimitRule, res['id'], rule_data)
q_ctx, rule.QosMinimumBandwidthRule, res['id'], rule_data)
self.assertEqual(2, len(bottom_policy[0]['rules']))
self.assertEqual(1, len(bottom_policy[0]['rules']))
b_rule = bottom_policy[0]['rules'][0]
self.assertEqual(b_policy_id, b_rule['qos_policy_id'])
b_rule = bottom_policy[0]['rules'][1]
self.assertEqual(b_policy_id, b_rule['qos_policy_id'])
def _test_delete_policy_rule(self, plugin, q_ctx,
t_ctx, pod_id, bottom_policy):