Commit 99c05d5 1 parent b082684 commit 99c05d5 Copy full SHA for 99c05d5
File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -302,17 +302,18 @@ def construct_neighbor_advertiser_slice():
302
302
ipv6_mappings .append (mapping )
303
303
ctr += 1
304
304
305
- vlan_interface_obj = {
306
- 'vlanId' : vlan_id ,
307
- 'vxlanId' : vxlan_id ,
308
- 'ipv4AddrMappings' : ipv4_mappings ,
309
- 'ipv6AddrMappings' : ipv6_mappings
310
- }
305
+ if len (ipv4_mappings ) > 0 or len (ipv6_mappings ) > 0 :
306
+ vlan_interface_obj = {
307
+ 'vlanId' : vlan_id ,
308
+ 'vxlanId' : vxlan_id ,
309
+ 'ipv4AddrMappings' : ipv4_mappings ,
310
+ 'ipv6AddrMappings' : ipv6_mappings
311
+ }
311
312
312
- if vxlanPort :
313
- vlan_interface_obj ['vxlanPort' ] = vxlanPort
313
+ if vxlanPort :
314
+ vlan_interface_obj ['vxlanPort' ] = vxlanPort
314
315
315
- vlan_interfaces_obj .append (vlan_interface_obj )
316
+ vlan_interfaces_obj .append (vlan_interface_obj )
316
317
317
318
slice_obj = {
318
319
'switchInfo' : switch_info_obj ,
You can’t perform that action at this time.
0 commit comments