0395f14203
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
0 lines
Python
0 lines
Python