Commit Graph

11 Commits

Author SHA1 Message Date
36fbbf9b35 Add a full set of get_*_by_name() tests 2022-03-22 17:53:40 +00:00
6688c6b243 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.
2022-03-22 14:21:32 +00:00
907412f49c Fix bug in get_l2xc_interfaces(), and add tests for it 2022-03-22 13:15:21 +00:00
c18f04fa55 Refactor: stop trying to derive implicit LCP names. Make it mandatory and explicitly configured 2022-03-21 11:06:15 +00:00
ba22b1aad8 Refactor for *_get_by_name()
They now all return a list [ifname, iface]. If no interface was found
they return None,None. If one was found, they return the (string) name
and the dictionary with interface contents.
2022-03-21 08:47:05 +00:00
5247e3a241 Add the beginning of a test_qinx() suite, will complete after a refactor in an upcoming commit 2022-03-20 23:32:59 +00:00
e44db47989 Add interface.get_qinx_parent_by_name() 2022-03-20 23:10:54 +00:00
31c3d13c12 Isolate LCP into its own tests 2022-03-20 22:04:49 +00:00
14cd365ad3 Move LCP tests to their own test_*py file 2022-03-20 22:01:51 +00:00
459346878a Move to assertEqual 2022-03-20 21:54:28 +00:00
8445140842 Add unittests for validator/interface.py 2022-03-20 21:49:08 +00:00