Handle qos_policy on network/port create/update

Added handling for qos_policy_id field in the network and port
entities via ML2 extension driver.
The QoS profile will be associated to the network/port when requested as
part of the entity creation or update.

Allow ML2 extension manager to not register for any api extension
(new use case).

===

Extend the resources using the QoS extension class

Since the QoS extension for plugins is handles by this class, it makes
sense for it to handle also property extension of resources.

For ML2 this means that that extend_{network,port}_dict functions will
handle the extension of resources by calling QosExtensionHandler.
This logic can easily be reused by other plugins.

Note: we should make sure that resource extension does not require db
access, otherwise we see DBDeadLock errors and random tempest failures.
To achieve this, we define a new SQLAlchemy joined relationship on
policy bindings to make networks and ports receive those bindings on
their fetch from database. After that, the only work to do left for
resource extension handler is to copy the fetched policy into resource
dictionary.

===

Also enable new qos ml2 extension until we configure it in gate via
project-config and devstack-gate to make sure it's enabled and tested.

Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com>
Partially-implements: blueprint quantum-qos-api
Change-Id: I1b7d4611215a471d5c24eb3d7208dcddb7e015f4
This commit is contained in:
Mike Kolesnik 2015-07-15 10:44:15 +03:00 committed by Ihar Hrachyshka
parent 3fda6195b2
commit e0c142d439
1 changed files with 1 additions and 0 deletions

View File

@ -197,6 +197,7 @@ neutron.ml2.extension_drivers =
testdb = neutron.tests.unit.plugins.ml2.drivers.ext_test:TestDBExtensionDriver
port_security = neutron.plugins.ml2.extensions.port_security:PortSecurityExtensionDriver
cisco_n1kv_ext = neutron.plugins.ml2.drivers.cisco.n1kv.n1kv_ext_driver:CiscoN1kvExtensionDriver
qos = neutron.plugins.ml2.extensions.qos:QosExtensionDriver
neutron.openstack.common.cache.backends =
memory = neutron.openstack.common.cache._backends.memory:MemoryBackend
neutron.ipam_drivers =