Address network filtering issue
Ensure that network retrieval without id will not cause and
exception.
Change-Id: Icebed0daa658fd50e179eb5c272e12ab9e666353
(cherry picked from commit 4c2c53eb86
)
This commit is contained in:
parent
f10a3432df
commit
b440057ed6
|
@ -569,6 +569,8 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||
|
||||
def _extend_network_dict_provider(self, context, network,
|
||||
multiprovider=None, bindings=None):
|
||||
if 'id' not in network:
|
||||
return
|
||||
if not bindings:
|
||||
bindings = nsxv_db.get_network_bindings(context.session,
|
||||
network['id'])
|
||||
|
|
|
@ -665,6 +665,8 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||
bindings[0].binding_type == utils.NsxV3NetworkTypes.VXLAN)
|
||||
|
||||
def _extend_network_dict_provider(self, context, network, bindings=None):
|
||||
if 'id' not in network:
|
||||
return
|
||||
if not bindings:
|
||||
bindings = nsx_db.get_network_bindings(context.session,
|
||||
network['id'])
|
||||
|
|
Loading…
Reference in New Issue