Fix the tests for filtering with qos_policy_id
Some QoS tests tried to list ports by attribute qos_policy_id but this attribute is not a valid filter. In before, the tests passed because neutron ignored the invalid filter and returned all the ports which happened to be the correct set. However, using qos_policy_id as filter is incorrect and this patch fixes it. Change-Id: Ic3ab5b3ffdc378d570678b9c967cb42b0c7a8a9b Related-Bug: #1749820
This commit is contained in:
parent
9f3a41c2c7
commit
6f5946d34b
@ -156,12 +156,12 @@ class ClientFixture(fixtures.Fixture):
|
||||
|
||||
def detach_and_delete_policy():
|
||||
qos_policy_id = policy['policy']['id']
|
||||
ports_with_policy = self.client.list_ports(
|
||||
qos_policy_id=qos_policy_id)['ports']
|
||||
ports_with_policy = self.client.list_ports()['ports']
|
||||
for port in ports_with_policy:
|
||||
self.client.update_port(
|
||||
port['id'],
|
||||
body={'port': {'qos_policy_id': None}})
|
||||
if qos_policy_id == port['qos_policy_id']:
|
||||
self.client.update_port(
|
||||
port['id'],
|
||||
body={'port': {'qos_policy_id': None}})
|
||||
self.client.delete_qos_policy(qos_policy_id)
|
||||
|
||||
# NOTE: We'll need to add support for detaching from network once
|
||||
|
Loading…
x
Reference in New Issue
Block a user