Skip to content

Commit 4764ed5

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 6309414 commit 4764ed5

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
@@ -651,9 +651,9 @@ def _validate_create_network_callback(self, resource, event, trigger,
651651
network_id = payload.resource_id
652652
network = network_object.Network.get_object(context, id=network_id)
653653

654-
policy_id = network.qos_policy_id
655-
if policy_id is None:
654+
if not network or not getattr(network, 'qos_policy_id', None):
656655
return
656+
policy_id = network.qos_policy_id
657657

658658
policy = policy_object.QosPolicy.get_object(
659659
context.elevated(), id=policy_id)

0 commit comments

Comments
 (0)