Skip to content

Commit

Permalink
Merge pull request #142 from fabric-testbed/fix-l3vpn-ipv6-typo
Browse files Browse the repository at this point in the history
Update net_handler.py
  • Loading branch information
kthare10 authored Jun 24, 2024
2 parents 0a2d673 + cb4b815 commit 7c1f9bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fabric_am/handlers/net_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ def __l3vpn_create_data(self, sliver: NetworkServiceSliver, service_name: str) -
bgp_data['local-ipv4'] = {'address': ipv4_addr_mask[0], 'netmask': ipv4_addr_mask[1]}
elif labs.ipv6_subnet:
ipv6_addr_mask = labs.ipv6_subnet.split('/')
bgp_data['local-ipv4'] = {'address': ipv6_addr_mask[0], 'netmask': ipv6_addr_mask[1]}
bgp_data['local-ipv6'] = {'address': ipv6_addr_mask[0], 'netmask': ipv6_addr_mask[1]}
else:
raise NetHandlerException(f'l3vpn - missing ipv4_subnet or ipv6_subnet label for site {site_data["device"]} on BGP interface {str(interface)}')
# add bgp peering remote
Expand All @@ -858,7 +858,7 @@ def __l3vpn_create_data(self, sliver: NetworkServiceSliver, service_name: str) -
bgp_data['remote-ipv4'] = {'address': ipv4_addr_mask[0], 'netmask': ipv4_addr_mask[1]}
elif labs.ipv6_subnet:
ipv6_addr_mask = peer_labs.ipv6_subnet.split('/')
bgp_data['remote-ipv4'] = {'address': ipv6_addr_mask[0], 'netmask': ipv6_addr_mask[1]}
bgp_data['remote-ipv6'] = {'address': ipv6_addr_mask[0], 'netmask': ipv6_addr_mask[1]}
else:
raise NetHandlerException(f'l3vpn - missing peering label ipv4_subnet or ipv6_subnet for site {site_data["device"]} on BGP interface {str(interface)}')
if peer_labs.asn:
Expand Down Expand Up @@ -889,7 +889,7 @@ def __l3vpn_create_data(self, sliver: NetworkServiceSliver, service_name: str) -
f'l3vpn - conflicting ipv4_subnet and ipv6_subnet labels for direct gateway config on site {site_data["device"]}')
else:
ipv6_addr_mask = labs.ipv6_subnet.split('/')
site_data['direct']['gateway-ipv4'] = {'address': ipv6_addr_mask[0], 'netmask': ipv6_addr_mask[1]}
site_data['direct']['gateway-ipv6'] = {'address': ipv6_addr_mask[0], 'netmask': ipv6_addr_mask[1]}
else:
raise NetHandlerException(
f'l3vpn - require either ipv4_subnet or ipv6_subnet label for interface via direct gateway on site {site_data["device"]}')
Expand Down

0 comments on commit 7c1f9bd

Please sign in to comment.