Merge "Fix handling no qos_queues while removing min bw limit rule"
This commit is contained in:
commit
590002728d
neutron
@ -981,6 +981,8 @@ class OVSBridge(BaseOVS):
|
||||
queue_num = int(queue['external_ids']['queue-num'])
|
||||
self._unset_queue_for_minimum_bandwidth(queue_num)
|
||||
qos_id, qos_queues = self._find_qos()
|
||||
if not qos_queues:
|
||||
return
|
||||
if queue_num in qos_queues.keys():
|
||||
qos_queues.pop(queue_num)
|
||||
self._update_qos(
|
||||
|
@ -387,6 +387,19 @@ class BaseOVSTestCase(base.BaseSudoTestCase):
|
||||
qos = self._list_qos(qos_id)
|
||||
self.assertEqual(0, len(qos['queues']))
|
||||
|
||||
def test_delete_minimum_bandwidth_queue_no_qos_found(self):
|
||||
queue_id, neutron_port_id = self._create_queue(queue_num=1)
|
||||
self.addCleanup(self.ovs._delete_queue, queue_id)
|
||||
|
||||
# Check that it will not raise any exception even if there is no
|
||||
# qos with associated queues
|
||||
self.ovs.delete_minimum_bandwidth_queue(neutron_port_id)
|
||||
|
||||
# And verify that this queue wasn't in fact deleted as there was no
|
||||
# qos found
|
||||
queue = self._list_queues(queue_id)
|
||||
self.assertEqual(queue_id, queue['_uuid'])
|
||||
|
||||
def test_clear_minimum_bandwidth_qos(self):
|
||||
queue_id_1, _ = self._create_queue(queue_num=1)
|
||||
queue_id_2, _ = self._create_queue(queue_num=2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user