Commit Graph

12 Commits

Author SHA1 Message Date
8129235031 Clean up logging a little bit 2022-03-24 12:14:26 +00:00
b43d7903fd Add a few additional useful functions
- is_*() returns True if the interface name is of a certain type
  is_bondethernet() is_loopback() is_bvi() is_bridgedomain()
  is_vxlan_tunnel() is_phy()
- get_phys() by process of elimination, returns all interface names
  that are supposed to be physical network interfaces.

Add unit tests for validator/vxlan_tunnel.py
 => Notable: while here, fix a bug in get_by_name()
Add unit tests for all the is_*() and get_phys() functions.
2022-03-24 10:55:33 +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
1f07f7eadf Add unit tests for bondethernet 2022-03-20 22:17:41 +00:00
2947bbfd25 Get rid of ' characters in errors 2022-03-15 21:13:42 +00:00
5c61259edd Add copyright and license 2022-03-13 21:08:32 +00:00
1340e5db42 Remove the attempted plural 'address(es)', and keep it singular. Fix a typo (addd-ress); update unit tests 2022-03-13 19:08:45 +00:00
881c0faaab Only pass 'schema' to the validator creation. 2022-03-13 16:48:52 +00:00
6b8735bb18 Add bridge-domain support.
Refactor validator main function to avoid 'interface' symbol clash.
Add get_mtu() for interfaces, returns the sub-int's MTU or its parent's MTU, defaulting to 1500.
Ensure MTU for all bridge-domain members is set to the same value.
Ensure all bridge-domain members are L2 (have no LCP, have no address)
2022-03-13 11:20:40 +00:00
3d6903bfdc Rewrite 'exists' to 'get_by_name' 2022-03-13 10:44:59 +00:00
9250e07aed Continue validation even after error occurs, catching as many errors as possible for the user 2022-03-13 09:58:29 +00:00
9862129ab0 Initial commit 2022-03-13 09:54:50 +00:00