Skip to content

Commit 4462c1a

Browse files
elajkatralonsoh
authored andcommitted
[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 ec4bfb9)
1 parent a5f1788 commit 4462c1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neutron/services/qos/qos_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,9 @@ def _validate_create_network_callback(self, resource, event, trigger,
610610
network_id = payload.resource_id
611611
network = network_object.Network.get_object(context, id=network_id)
612612

613-
policy_id = network.qos_policy_id
614-
if policy_id is None:
613+
if not network or not getattr(network, 'qos_policy_id', None):
615614
return
615+
policy_id = network.qos_policy_id
616616

617617
policy = policy_object.QosPolicy.get_object(
618618
context.elevated(), id=policy_id)

0 commit comments

Comments
 (0)