Fix address_scope calculation
Fix in the iteration to obtain address_scope linked to a subnet. A network can be linked to more than one subnet (ipv4 and ipv6), but if one of them does not have an address_scope, a null object element access failure occurs. Closes-bug: #1998104 Change-Id: Ic6d48a86043aaf4b458bb2230883a355fc841ee9
This commit is contained in:
parent
ed5b04acc2
commit
feff164b60
|
@ -1189,7 +1189,9 @@ class BgpDbMixin(object):
|
|||
ext_net_id = gw_subnet.network_id
|
||||
ext_pool = subnetpool_obj.SubnetPool.get_object(
|
||||
ctx, id=gw_subnet.subnetpool_id)
|
||||
ext_scope_set = ext_net_subnetpool_map.get(ext_net_id, set())
|
||||
if ext_pool is not None:
|
||||
ext_scope_set = ext_net_subnetpool_map.get(ext_net_id,
|
||||
set())
|
||||
ext_scope_set.add(ext_pool.address_scope_id)
|
||||
ext_net_subnetpool_map[ext_net_id] = ext_scope_set
|
||||
|
||||
|
|
Loading…
Reference in New Issue