netlab icon indicating copy to clipboard operation
netlab copied to clipboard

Add af:'evpn' to IBGP session check

Open jbemmel opened this issue 11 months ago • 0 comments

https://github.com/ipspace/netlab/blob/35d07d4d44dc20072938f2ca9bd7ac1c9a54af1e/tests/integration/evpn/01-vxlan-bridging.yml#L64

In these tests it is not sufficient for the IBGP session to exist, the correct address families need to be enabled too.

e.g. for FRR:

def valid_bgp_neighbor(
      ngb: list,
      n_id: str,
      af: str = 'ipv4',
      state: str = 'Established',
      intf: str = '') -> str:
  _result = global_vars.get_result_dict('_result')

  n_addr = _common.get_bgp_neighbor_id(ngb,n_id,af if af in ['ipv4','ipv6'] else 'ipv4')

  if n_addr is True:
    if not intf:
      raise Exception(f'Need an interface name for an unnumbered EBGP neighbor')
    n_addr = intf
  
  struct_name = f'{af}Unicast' if af in ['ipv4','ipv6'] else "l2VpnEvpn"

or perhaps allow af to be a list of strings, and check all of them

jbemmel avatar Feb 10 '25 04:02 jbemmel