Add the case of the ifname being the source of an l2xc to the is_l2() logic1
This is more strict than VPP itself, which does allow a destination to be L3 while the source is L2: DBGvpp# show mode l3 local0 l3 GigabitEthernet3/0/0 l3 GigabitEthernet3/0/1 l3 HundredGigabitEthernet12/0/0 l3 HundredGigabitEthernet12/0/1 DBGvpp# set interface l2 xconnect GigabitEthernet3/0/0 GigabitEthernet3/0/1 DBGvpp# show mode l3 local0 l2 xconnect GigabitEthernet3/0/0 GigabitEthernet3/0/1 l3 GigabitEthernet3/0/1 l3 HundredGigabitEthernet12/0/0 l3 HundredGigabitEthernet12/0/1 But it seems undesirable to have Gi3/0/1 be in l3 mode even though it's the target of a cross connect, so I'm going to leave the behavior stricter than VPP.
This commit is contained in:
@ -307,9 +307,11 @@ def unique_encapsulation(yaml, sub_ifname):
|
||||
|
||||
|
||||
def is_l2(yaml, ifname):
|
||||
""" Returns True if the interface is an L2XC target or a member of a bridgedomain """
|
||||
""" Returns True if the interface is an L2XC source, L2XC target or a member of a bridgedomain """
|
||||
if bridgedomain.is_bridge_interface(yaml, ifname):
|
||||
return True
|
||||
if is_l2xc_interface(yaml, ifname):
|
||||
return True
|
||||
if is_l2xc_target_interface(yaml, ifname):
|
||||
return True
|
||||
return False
|
||||
|
Reference in New Issue
Block a user