]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
QoS SR-IOV: allow to reset vf rate when VF is assigend to VM
authorMoshe Levi <moshele@mellanox.com>
Thu, 8 Oct 2015 19:41:06 +0000 (22:41 +0300)
committerMoshe Levi <moshele@mellanox.com>
Fri, 9 Oct 2015 04:52:19 +0000 (07:52 +0300)
commit2e0ead8e043a47db214f4f52c9bfe71b6079b5fd
tree816397aeb276cee5f74dcbe29cf9ef1a8ec64e6c
parent7aed40f89154e9f21e20c249e5ae102f7ade38db
QoS SR-IOV: allow to reset vf rate when VF is assigend to VM

delete_bandwidth_limit method is called in 2 scenarios:
1. when deleting a port
2. when removing a policy from a port

self.eswitch_mgr.clear_max_rate is valdating if VF is not assigned to VM
which is good for case 1, but prevent reseting the max rate for case 2.
for case 2 the delete_bandwidth_limit should  call _set_vf_max_rate with max_kbps=0
to reset VF max rate for assigned VM.

Closes-Bug: #1504165

Change-Id: Ief708531708b8faa918603298d49d39ef5ba2df5
neutron/plugins/ml2/drivers/mech_sriov/agent/extension_drivers/qos_driver.py
neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/extension_drivers/test_qos_driver.py