Merge "NSX-V3| Fix qos switching profile project name"
This commit is contained in:
commit
ca33b1bfcf
@ -15,7 +15,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from neutron.api.rpc.callbacks import events as callbacks_events
|
from neutron.api.rpc.callbacks import events as callbacks_events
|
||||||
from neutron import context as n_context
|
|
||||||
from neutron.objects.qos import policy as qos_policy
|
from neutron.objects.qos import policy as qos_policy
|
||||||
from neutron.services.qos import qos_consts
|
from neutron.services.qos import qos_consts
|
||||||
from neutron_lib.api import validators
|
from neutron_lib.api import validators
|
||||||
@ -38,16 +37,16 @@ MAX_BURST_MAX_VALUE = int((2 ** 31 - 1) / 128)
|
|||||||
def handle_qos_notification(context, resource_type, policies_list,
|
def handle_qos_notification(context, resource_type, policies_list,
|
||||||
event_type):
|
event_type):
|
||||||
for policy_obj in policies_list:
|
for policy_obj in policies_list:
|
||||||
handle_qos_policy_notification(policy_obj, event_type)
|
handle_qos_policy_notification(context, policy_obj, event_type)
|
||||||
|
|
||||||
|
|
||||||
def handle_qos_policy_notification(policy_obj, event_type):
|
def handle_qos_policy_notification(context, policy_obj, event_type):
|
||||||
handler = QosNotificationsHandler()
|
handler = QosNotificationsHandler()
|
||||||
context = n_context.get_admin_context()
|
|
||||||
|
|
||||||
# Reload the policy as admin so we will have a context
|
# Reload the policy as admin so we will have a context
|
||||||
if (event_type != callbacks_events.DELETED):
|
if (event_type != callbacks_events.DELETED):
|
||||||
policy = qos_policy.QosPolicy.get_object(context, id=policy_obj.id)
|
policy = qos_policy.QosPolicy.get_object(context.elevated(),
|
||||||
|
id=policy_obj.id)
|
||||||
|
|
||||||
# Check if QoS policy rule was created/deleted/updated
|
# Check if QoS policy rule was created/deleted/updated
|
||||||
if (event_type == callbacks_events.CREATED):
|
if (event_type == callbacks_events.CREATED):
|
||||||
|
Loading…
Reference in New Issue
Block a user