]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Update OVS driver to work with objects
authorMoshe Levi <moshele@mellanox.com>
Tue, 28 Jul 2015 12:46:10 +0000 (15:46 +0300)
committerIhar Hrachyshka <ihrachys@redhat.com>
Tue, 4 Aug 2015 12:58:56 +0000 (14:58 +0200)
commit1753187d490758238a09827f867a2d6542ee941b
tree54c3c9cd095d8647d82487e539a230755d38b739
parentcb8929e4c8f074e37c0436efcbc9d756dcf64f59
Update OVS driver to work with objects

This patch updates the QoS OVS driver to work with policy NeutronObjects
that are passed by the agent extension manager, instead of lists of rule
dicts, as we originally expected.  It also adds validation that the
rules that are sent by the neutron-server are actually supported by the
backend.

Finally, port dict was not really enough to determine the name of the
port in ovsdb. 'name' field is not really present in all port dicts, and
does not reflect what is known to ovs anyway. So instead, we should
rely on vif_port object to determine the ovs port name. Since ovs agent
only added the vif_port value to details dict when binding was desired,
I made adding the vif_port object unconditional, and covered that fact
with unit tests.

With this patch in place, I was able to get policy rules applied to a
port in devstack installation. Functional tests will belong to a
follow-up.

Partially-Implements: blueprint quantum-qos-api
Change-Id: I8926adb0a30728e4f82e55d71ad7e76676a22086
neutron/agent/l2/extensions/qos_agent.py
neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/extension_drivers/test_qos_driver.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py