95c08bbb29Print an error if the number of errors is unexpected
Pim van Pelt
2022-03-24 20:12:36 +00:00
fe2e63ac0ePrune Step1: remove addresses and set down, any interface not in the YAML config
Pim van Pelt
2022-03-24 17:16:29 +00:00
29a8bae899Add get_bondethernets()
Pim van Pelt
2022-03-24 16:34:45 +00:00
de95e522abMove VPPApi into a Reconciler class, add (empty) prune() create() and sync() methods. Add --force flag to enable making progress after warnings are issued
Pim van Pelt
2022-03-24 15:57:12 +00:00
2e2f63e1ddFix reporting of YAML tests; send retval based on the bitflags of tests passing/failing
Pim van Pelt
2022-03-24 15:15:26 +00:00
cfcbec239cCosmetic rename instance of config/validator class
Pim van Pelt
2022-03-24 14:00:05 +00:00
672dd65f11Rename validator/ to config/
Pim van Pelt
2022-03-24 13:56:04 +00:00
e8e41098beAssert that all PHYs in the config also exist in VPP
Pim van Pelt
2022-03-24 12:29:16 +00:00
8129235031Clean up logging a little bit
Pim van Pelt
2022-03-24 12:14:26 +00:00
b43d7903fdAdd a few additional useful functions
Pim van Pelt
2022-03-24 10:45:34 +00:00
ac5b8fcc8fSimple VPPApi abstraction, which fetches the necessary info from VPP, and a few dumpers
Pim van Pelt
2022-03-23 23:29:19 +00:00
8ac9b50d94Add some clarification to the reconsiliation algorithm
Pim van Pelt
2022-03-23 23:28:12 +00:00
f37b80c012Break into three sections
Pim van Pelt
2022-03-23 17:16:29 +00:00
bcc4c8ff05Merge branch 'main' of github.com:pimvanpelt/vppcfg into main
Pim van Pelt
2022-03-23 17:11:46 +00:00
7390322693Add first stab approximation of the reconsiliation order
Pim van Pelt
2022-03-23 17:11:34 +00:00
613b4a27c7Update README.md
Pim van Pelt
2022-03-22 23:03:22 +01:00
df1b1bbbefUpdate README.md
Pim van Pelt
2022-03-22 22:58:38 +01:00
c37faecd3fBuffer output, print when errors occur. Introduce debug/quiet flags
Pim van Pelt
2022-03-22 20:11:32 +00:00
4cb07cf2daAdd -d and -q flags
Pim van Pelt
2022-03-22 19:52:19 +00:00
0ab907f155Add get_bridgedomains()
Pim van Pelt
2022-03-22 18:57:45 +00:00
27ce2351c7Cosmetic: use '.. LCP' consistently
Pim van Pelt
2022-03-22 18:49:31 +00:00
97fef9bfd2Assert get_by_name() with non-existent name returns a tuple of None,None
Pim van Pelt
2022-03-22 18:31:03 +00:00
5ecd1ef22cAdd unit tests for loopbacks; While here, fix a bug in get_by_name(), yaay
Pim van Pelt
2022-03-22 18:02:35 +00:00
36fbbf9b35Add a full set of get_*_by_name() tests
Pim van Pelt
2022-03-22 17:53:40 +00:00
1e7227a52aAllow for bridgedomains without any member interfaces
Pim van Pelt
2022-03-22 15:38:43 +00:00
7bf940be0aBecome a bit stricter: do full-line pattern match, and update unit tests to capture the full error output
Pim van Pelt
2022-03-22 15:10:40 +00:00
7303adb74aAssert is_l2() on sub-ints cannot have address or LCP
Pim van Pelt
2022-03-22 15:02:38 +00:00
077d49cb88Assert that is_l2() interfaces cannot have LCP or address; Fix consistency on 'be' vs 'have' an LCP.
Pim van Pelt
2022-03-22 14:54:09 +00:00
6688c6b243Add the case of the ifname being the source of an l2xc to the is_l2() logic1
Pim van Pelt
2022-03-22 14:21:30 +00:00
5ebaf5e005Add optional filtering of get_lcps() based on type of interface
Pim van Pelt
2022-03-22 14:17:36 +00:00
907412f49cFix bug in get_l2xc_interfaces(), and add tests for it
Pim van Pelt
2022-03-22 13:15:21 +00:00
7ae82c297cAdd get_lcps() to enumerate all LCP names in the system
Pim van Pelt
2022-03-22 13:04:56 +00:00
c18f04fa55Refactor: stop trying to derive implicit LCP names. Make it mandatory and explicitly configured
Pim van Pelt
2022-03-21 11:06:15 +00:00
551b06bb67Move the output around - first print the unexpected messages, only then fail the assertions
Pim van Pelt
2022-03-21 10:23:49 +00:00
58d0ebe71eComplete test_qinx now that get_*_by_name() returns tuples
Pim van Pelt
2022-03-21 08:53:40 +00:00
ba22b1aad8Refactor for *_get_by_name()
Pim van Pelt
2022-03-21 01:18:03 +00:00
5247e3a241Add the beginning of a test_qinx() suite, will complete after a refactor in an upcoming commit
Pim van Pelt
2022-03-20 23:32:59 +00:00
e44db47989Add interface.get_qinx_parent_by_name()
Pim van Pelt
2022-03-20 23:10:44 +00:00
c55fe93e16Add unit tests for bridgedomain - move is_bridge_interface*() functions to validator/bridgedomain.py
Pim van Pelt
2022-03-20 22:41:19 +00:00
47757b702cCorrect name for LCP tests
Pim van Pelt
2022-03-20 22:17:56 +00:00
1f07f7eadfAdd unit tests for bondethernet
Pim van Pelt
2022-03-20 22:17:41 +00:00
31c3d13c12Isolate LCP into its own tests
Pim van Pelt
2022-03-20 22:04:49 +00:00
14cd365ad3Move LCP tests to their own test_*py file
Pim van Pelt
2022-03-20 22:01:51 +00:00
459346878aMove to assertEqual
Pim van Pelt
2022-03-20 21:54:28 +00:00
8445140842Add unittests for validator/interface.py
Pim van Pelt
2022-03-20 21:49:08 +00:00
e46cf3d3a8Make the test.errors.count value explicit, update tests which had an implicit count
Pim van Pelt
2022-03-20 19:44:29 +00:00
1ff3ae95ccFully move yamltest to unittest framework, assert errors instead of printing them
Pim van Pelt
2022-03-20 19:27:23 +00:00
3291c60d9aStart refactoring YAML tests into unittest framework
Pim van Pelt
2022-03-20 18:59:40 +00:00
2036795ef1Move unittest YAML files into their own directory, pending more python unit tests in a followup commit
Pim van Pelt
2022-03-20 16:59:13 +00:00
dbd7bca8f3Add get_encapsulation; refactor unique_encapsulation to use it. All tests pass.
Pim van Pelt
2022-03-20 16:45:03 +00:00
7a1dc2f326Test the boundary of valid LCP namelen
Pim van Pelt
2022-03-17 00:37:46 +00:00
343c1097c7Stop trying to police interface names -- they will be validated by get_by_name()
Pim van Pelt
2022-03-17 00:20:22 +00:00
f921b1721aExpand autocreated LCP namelen to all possible (dot1q, qin*) scenarios. Allow manually set LCP to be 15char in length
Pim van Pelt
2022-03-17 00:15:18 +00:00
3663a04cdeBugfix: check sub_iface instead of iface
Pim van Pelt
2022-03-16 23:57:47 +00:00
59cbc8b886Add description len=64 to avoid runaway strings
Pim van Pelt
2022-03-16 23:23:28 +00:00
6b6207f028define 'is_l2' the same way VPP does: in a bridge or as an L2XC target.
Pim van Pelt
2022-03-16 23:16:46 +00:00
8a1da516f3Fix tests for upcoming LCP assertion that intermediate interfaces 'xe0.1000' must exist as an LCP in order for Qin* sub-interfaces 'xe0.1000.1234' to be allowed
Pim van Pelt
2022-03-16 22:43:13 +00:00
ccfb51189aA few small refactors, using get_by_name() more, casting boolean return values, etc
Pim van Pelt
2022-03-16 22:20:51 +00:00
252fa989b2Assert VXLAN local/remote is the same address family. Assert VXLAN VNI is unique.
Pim van Pelt
2022-03-15 22:57:09 +00:00
1e5b1e49adAssert that an interface cannot l2 cross connect to itself
Pim van Pelt
2022-03-15 22:36:48 +00:00
e7e3958cebAssert source/target L2XC are the same MTU
Pim van Pelt
2022-03-15 22:32:55 +00:00
686cd45158Add first approximation of vxlan_tunnels
Pim van Pelt
2022-03-15 22:21:36 +00:00
05b3c5c157Small refactor, to allow for more interface types to be added as l2xc targets later
Pim van Pelt
2022-03-15 21:56:29 +00:00
af90b37a33bugfix: Use sub-interface name
Pim van Pelt
2022-03-15 21:52:44 +00:00
2947bbfd25Get rid of ' characters in errors
Pim van Pelt
2022-03-15 21:13:42 +00:00
2bbcff2ca0Also assert that targets of an L2XC do not have an address or LCP
Pim van Pelt
2022-03-15 21:07:47 +00:00
5876465327A few cosmetic changes in logging
Pim van Pelt
2022-03-15 20:57:11 +00:00
6d3de72c00A completely empty config is a valid config
Pim van Pelt
2022-03-15 20:52:09 +00:00
c5872880feAdd l2xc support, including extensive tests to validate correct usage of the feature
Pim van Pelt
2022-03-15 20:45:27 +00:00
b9a7bb697eAdd validator to ensure that bridgedomain interfaces occur in at most one bridgedomain. Ironically, this caught a bug in the bridgedomain5 test, where Gi1/0/0 was added twice.
Pim van Pelt
2022-03-15 19:48:32 +00:00
9d8c201a06Merge branch 'main' of github.com:pimvanpelt/vppcfg into main
Pim van Pelt
2022-03-14 00:19:32 +00:00
f43d5a5e87Merge branch 'main' of github.com:pimvanpelt/vppcfg into main
Pim van Pelt
2022-03-14 00:18:51 +00:00
0e293217fdMerge branch 'main' of github.com:pimvanpelt/vppcfg into main
Pim van Pelt
2022-03-14 00:18:51 +00:00
13f211f27aMake clearer that 'is not allowed' actually means that the address conflicts with another
Pim van Pelt
2022-03-14 00:17:33 +00:00
a5a58c1261Make clearer that 'is not allowed' actually means that the address conflicts with another
Pim van Pelt
2022-03-14 00:17:33 +00:00
b6ab172986Merge branch 'main' of github.com:pimvanpelt/vppcfg into main
Pim van Pelt
2022-03-13 23:50:22 +00:00
bb57ed8e52IP Address validator
Pim van Pelt
2022-03-13 23:45:40 +00:00
19bbd0e8a3IP Address validator
Pim van Pelt
2022-03-13 23:45:40 +00:00
3f2b80172cAdd another schema validation test
Pim van Pelt
2022-03-13 21:18:08 +00:00
5c61259eddAdd copyright and license
Pim van Pelt
2022-03-13 21:08:32 +00:00
412ecfdbf7Add important note :)
Pim van Pelt
2022-03-13 21:06:02 +00:00
9c88e2a0ccAdd a --quiet/-q flag, which only logs warnings and errors
Pim van Pelt
2022-03-13 21:01:59 +00:00
660e240eb7Add some more garbage fields and tpyoes
Pim van Pelt
2022-03-13 20:38:12 +00:00
2ca7cc3f11Check for fields that are of the wrong type. Fix bug in ip_interface() validator thanks to this unittest
Pim van Pelt
2022-03-13 20:20:14 +00:00
0f03d6cbaaAdd unit test that ensures exact-match=False can't be on a sub-int with an LCP or address
Pim van Pelt
2022-03-13 20:10:06 +00:00
ec93195832Print unittest description in case it's available
Pim van Pelt
2022-03-13 19:58:17 +00:00
763c1ca74cEnsure that LCP names are globally unique (between interface/sub-interface/loopback/bridgedomain)
Pim van Pelt
2022-03-13 19:53:13 +00:00
0d8a28caddEnforce that when a bridgedomain has an address (ie a BVI), that it must also have an LCP
Pim van Pelt
2022-03-13 19:32:30 +00:00
8825984d49Force loopbacks with an address to have an LCP
Pim van Pelt
2022-03-13 19:27:27 +00:00
d693c41c72Add four simple loopback examples (with and without LCP or address)
Pim van Pelt
2022-03-13 19:19:39 +00:00
1adb91d227Add LCP/Address example bridgedomains
Pim van Pelt
2022-03-13 19:19:18 +00:00
1340e5db42Remove the attempted plural 'address(es)', and keep it singular. Fix a typo (addd-ress); update unit tests
Pim van Pelt
2022-03-13 19:08:45 +00:00
878f94b2bdAdd unit tests for bondethernet, including a set of correctly form ones
Pim van Pelt
2022-03-13 19:04:31 +00:00
527b1ca95bAdd a set of bridgedomain unit tests, including a fully formed correct one. Fix one bug found along the way!
Pim van Pelt
2022-03-13 18:55:00 +00:00
6ce6718b34Typofix
Pim van Pelt
2022-03-13 18:35:44 +00:00
5207b920d7Rename unittest
Pim van Pelt
2022-03-13 18:35:28 +00:00
9aec425bc0Add unit tests for all interface/sub-interface failure modes
Pim van Pelt
2022-03-13 18:35:11 +00:00
cc0ec92638Bugfix - get correct parent MTU
Pim van Pelt
2022-03-13 17:42:16 +00:00
95c8be553fSimple unit tester, with a few example tests
Pim van Pelt
2022-03-13 17:20:10 +00:00