[qos] _validate_create_network_callback return in no network
It seems that _validate_create_network_callback notified without
network_id in payload, to avoid issues in such case return.
Change-Id: I15d22e0e2b4bf3e4f882b521bcd6a13f84e4feed
Closes-Bug: #2008912
(cherry picked from commit ec4bfb91f0
)
This commit is contained in:
parent
3a75901a58
commit
caa7c07f45
|
@ -377,9 +377,9 @@ class QoSPlugin(qos.QoSPluginBase):
|
|||
network_id = payload.resource_id
|
||||
network = network_object.Network.get_object(context, id=network_id)
|
||||
|
||||
policy_id = network.qos_policy_id
|
||||
if policy_id is None:
|
||||
if not network or not getattr(network, 'qos_policy_id', None):
|
||||
return
|
||||
policy_id = network.qos_policy_id
|
||||
|
||||
policy = policy_object.QosPolicy.get_object(
|
||||
context.elevated(), id=policy_id)
|
||||
|
|
Loading…
Reference in New Issue