neaten up _extract_bgp_announcement

master
Marek Isalski 3 years ago
parent cbf75bb34c
commit aca95aa38f

@ -289,7 +289,8 @@ def monty_provision( config, args, routers ):
print( '/ipv6 address add interface="%s" address="%s" disabled=%s comment="%s" eui-64=yes advertise=yes' % ( vlan[ 'name' ], addr.network, disabled, comment ) )
else:
prefix = _extract_bgp_announcement( addr[ 'address' ], addr.get( 'network', None ) )
addr = ipaddress.ip_interface( addr )
prefix = _extract_bgp_announcement( addr, addr )
_adjust_filter( config, api, prefix, args.hostname,
home = ( name in args.home ),
standby = ( name not in args.home ) and ( name in args.standby ),

Loading…
Cancel
Save