41bce7131cRemove surperfluous YAML file
Pim van Pelt
2022-04-05 15:54:09 +00:00
0a755a0745Add bond/bridge YAML emitter
Pim van Pelt
2022-04-05 15:50:49 +00:00
2360d28d0aAdd the ability to set any mode/lb on bonds
Pim van Pelt
2022-04-05 15:05:03 +00:00
289138da94Bundle Yamale schema
Pim van Pelt
2022-04-05 12:40:05 +00:00
fdb732142aAdd bridgedomain settings.
Pim van Pelt
2022-04-05 12:01:13 +00:00
f53f7d5095Remove linux-cp / lcpng specialcase, the API exposed by lcpng and linux-cp is now identical
Pim van Pelt
2022-04-05 11:08:58 +00:00
b461ef49bbAdd 'state' field to interfaces and sub-interfaces
Pim van Pelt
2022-04-05 11:06:33 +00:00
65de792e35Implement workaround for endianness issue in linux-cp
Pim van Pelt
2022-04-03 22:24:59 +00:00
a4a91d1f5eReplace dumper with an actual YAML emitter
Pim van Pelt
2022-04-03 21:37:48 +00:00
53a7935168Copy the Yamale schema.yaml file into the source-code verbatim. This allows the tool to run without any external (file) dependencies, using the built-in yamale_schema if the -s/--schema flag is not specified
Pim van Pelt
2022-04-03 15:53:00 +00:00
a561dc64b1Correctly prune addresses from untagged and tagged VXLAN tunnels
Pim van Pelt
2022-04-03 15:40:21 +00:00
6bfb31e3fcExclude .exec files
Pim van Pelt
2022-04-03 15:23:31 +00:00
88f4240dddAdd a sub-interface test for VXLAN tunnels
Pim van Pelt
2022-04-03 15:22:43 +00:00
593ffed772Clarify the encap is optional
Pim van Pelt
2022-04-03 15:03:10 +00:00
196e09b2d2Add interface/sub-interface config documentation
Pim van Pelt
2022-04-03 15:01:23 +00:00
dc3fb57274Add config documentation for VXLAN tunnels
Pim van Pelt
2022-04-03 14:44:50 +00:00
720f581e47Do bounds checking on the BondEthernet and VXLAN Tunnel instances
Pim van Pelt
2022-04-03 14:40:44 +00:00
79f41d447dAdd caveat on bridgedomain configurability
Pim van Pelt
2022-04-03 14:29:35 +00:00
dc0d785818Add example.yaml reference
Pim van Pelt
2022-04-03 14:22:31 +00:00
e25f73db9cAdd BondEthernet documentation, with a caveat on its restrictive types
Pim van Pelt
2022-04-03 14:20:30 +00:00
00731e38f1Make code match documentation :-)
Pim van Pelt
2022-04-03 14:07:56 +00:00
15daa65c0bAdd bridgedomain config structure
Pim van Pelt
2022-04-03 13:58:45 +00:00
1b13ab7c0cAdd a first piece of explanation on the YAML config structure
Pim van Pelt
2022-04-03 13:41:56 +00:00
ce15b5a6fdDocument 'vppcfg plan' including an example
Pim van Pelt
2022-04-03 13:18:32 +00:00
35e878a42eAdd example output to illustrate the 'vppcfg dump' command
Pim van Pelt
2022-04-03 13:05:48 +00:00
dfd8c8b8a9Add user guide for 'vppcfg dump' command
Pim van Pelt
2022-04-03 13:01:31 +00:00
eee47c02b1Explain that 'check' does not use VPP interaction at all
Pim van Pelt
2022-04-03 12:53:14 +00:00
82d78c721cClarification on return value
Pim van Pelt
2022-04-03 12:51:15 +00:00
3a4416e8d7Add a user guide for 'vppcfg check'
Pim van Pelt
2022-04-03 12:48:40 +00:00
2642e94deaAssert that sub-ints with addresses must have exact-match set
Pim van Pelt
2022-04-03 12:48:09 +00:00
a8ed54308bMerge from github
Pim van Pelt
2022-04-03 12:04:37 +00:00
ef475a200aMove docs into their own directory
Pim van Pelt
2022-04-03 12:02:41 +00:00
c3f8a97de9Move docs into their own directory
Pim van Pelt
2022-04-03 12:02:41 +00:00
2b98d57fd2Move VPPAPIDumper into its own class.
Pim van Pelt
2022-04-03 11:52:01 +00:00
50581f7171Rename 'config' to 'cache' in the VPPApi.
Pim van Pelt
2022-04-03 11:21:29 +00:00
1a0daa48d1Move to explicit 'plan -o XXX' commandline
Pim van Pelt
2022-04-03 11:20:47 +00:00
b67493003fOnly write output if in planning mode
Pim van Pelt
2022-04-03 11:05:50 +00:00
566efe3596Add a CLI output emitter (either to stdout or to filename), based on plan --output/-o flag
Pim van Pelt
2022-04-03 09:49:27 +00:00
8499f2104eClean up some debugging statements post-prune
Pim van Pelt
2022-04-03 09:19:51 +00:00
342ccf3765Add a real life example (hippo12.yaml) which shows all supported config so far
Pim van Pelt
2022-04-03 09:19:25 +00:00
27b4500d3eAdd integration tests in intest/
Pim van Pelt
2022-04-03 09:18:40 +00:00
75e5a23538Merge branch 'main' of github.com:pimvanpelt/vppcfg into main
Pim van Pelt
2022-04-03 09:04:19 +00:00
d30f2d8965Relax the LCP requirements - it is OK to have an address without an LCP
Pim van Pelt
2022-04-03 09:04:11 +00:00
5e7f1bdba4Update LICENSE
Pim van Pelt
2022-04-02 23:31:40 +02:00
682d157d5bAdd note on 'Applying' verb which will come next.
Pim van Pelt
2022-04-02 22:37:45 +02:00
6a6caa113eUpdate usage output
Pim van Pelt
2022-04-02 22:34:13 +02:00
f786a00e9aCheck for the existence of LCP config statements, and if so, require linux-cp or lcpng plugins are enabled in VPP
Pim van Pelt
2022-04-02 20:16:51 +00:00
240fcebbcfRemove integration-test.sh
Pim van Pelt
2022-03-29 17:13:55 +00:00
f70bff400fIntroduce a CLI object
Pim van Pelt
2022-03-29 14:04:53 +00:00
7c8f36d1feMerge from upstream
Pim van Pelt
2022-03-28 16:44:17 +00:00
2003a21068Refactor prune_lcps()
Pim van Pelt
2022-03-28 16:38:35 +00:00
271b502299Refactor prune_lcps()
Pim van Pelt
2022-03-28 16:38:35 +00:00
4704780362Typofix in variable name
Pim van Pelt
2022-03-27 22:09:35 +00:00
020c5f72e1Also create loopback LCPs
Pim van Pelt
2022-03-27 21:37:56 +00:00
fe49b89492Bugfix - ensure BVI exists in VPP before trying to remove it
Pim van Pelt
2022-03-27 21:32:02 +00:00
24547869c9Avoid issuing 'pop 0' for untagged l2xc changes; just emit the exact CLI statement
Pim van Pelt
2022-03-27 21:26:25 +00:00
2415d30c0aSecond part of a BVI refactor
Pim van Pelt
2022-03-27 20:39:19 +00:00
850b982f2aFirst part of a BVI refactor
Pim van Pelt
2022-03-27 20:04:22 +00:00
90c23cf987Prune sub-ints that have a different encap than their config counterpart
Pim van Pelt
2022-03-27 16:14:37 +00:00
b97a0f46b8Allow LCP to consume the full 15 char length
Pim van Pelt
2022-03-27 14:50:56 +00:00
9d6d99547fDo not append interfaces to bridge_members if their sw_if_index has been removed - this forces the interface to be re-added
Pim van Pelt
2022-03-27 12:52:28 +00:00
78bd0c4f5aAssert BondEthernet devices also exist as interfaces. Assert MTU of members is equal to that of the BondEthernet interface
Pim van Pelt
2022-03-27 12:29:57 +00:00
176fd297aaRefactor phys_exist() into phys_exist_in_{config,vpp}(); Correct vppapi.get_phys()
Pim van Pelt
2022-03-26 23:07:49 +00:00
4c31541b3eSignal failure/success at the end of the reconciliation run
Pim van Pelt
2022-03-26 22:52:06 +00:00
cb6eafae3eComplete Sync Phase
Pim van Pelt
2022-03-26 22:51:21 +00:00
084094bb27Add get_bvis() plus unittest
Pim van Pelt
2022-03-26 22:45:52 +00:00
a2d2476710Make Sync Phase config-centric
Pim van Pelt
2022-03-26 22:18:54 +00:00
619c579561Make vpp_readconfig() explicit again. I want to try to read the VPP config only once, and pathplan the entire prune/create/sync cycle with one set of API reads at the beginning.
Pim van Pelt
2022-03-26 21:08:41 +00:00
f5601765b0Ignore .swp files
Pim van Pelt
2022-03-26 17:18:25 +00:00
7bb9fa5ac8Assert that a QinX cannot have higher MTU than its intermediate interface
Pim van Pelt
2022-03-26 17:18:10 +00:00
40c6b2d1c8Sync Phase: Implement MTU syncing (for both packet MTU and Max Frame Size)
Pim van Pelt
2022-03-26 17:09:07 +00:00
0c747dbfc3Sync Phase: Implement bridgedomains
Pim van Pelt
2022-03-26 15:43:55 +00:00
0a80801217Always set interface up after MTU change; otherwise only set it up if it was down
Pim van Pelt
2022-03-26 15:21:09 +00:00
e9bbd47407Sync Phase: Implement bondethernets
Pim van Pelt
2022-03-26 15:14:49 +00:00
f2784ce5d0Remove spurious logline
Pim van Pelt
2022-03-26 12:26:57 +00:00
54bb45f03dtypofix on interface_names and sw_if_index
Pim van Pelt
2022-03-26 12:20:19 +00:00
660cccd14eAssert that bd0 is reserved
Pim van Pelt
2022-03-26 11:25:13 +00:00
abbabcf2d0Skip deletion of TAP sub-ints belonging to LCP interfaces
Pim van Pelt
2022-03-26 11:19:37 +00:00
90a97a3d7bAdd Create Phase
Pim van Pelt
2022-03-26 11:14:30 +00:00
d5a7c59f4eRemove sub-ints before VXLANs. Report on interfaces thare are deleted before their addresses are.
Pim van Pelt
2022-03-25 23:20:57 +00:00
661c7fc16cImplement pruning in config as well
Pim van Pelt
2022-03-25 23:04:28 +00:00
1d7fd268e0Add ability to delete sub-ints on BVI + Loopback
Pim van Pelt
2022-03-25 18:43:46 +00:00
9aeb60ad98Also bring down BVIs and Loopbacks if they do not exist in the config
Pim van Pelt
2022-03-25 14:15:40 +00:00
152fa12099Update to ordering
Pim van Pelt
2022-03-25 13:56:04 +00:00
a068f25f19Re-order the Pruning flow
Pim van Pelt
2022-03-25 13:35:14 +00:00
0a31a22e7eAdd docstrings, reorder functions. Rename prune_addresses_set_interface_down() to merely prune_interfaces_down(), and make distinction on setting down and pruning addresses, so we don't do it twice.
Pim van Pelt
2022-03-25 11:55:30 +00:00
864c78ddfeOnly change link and MTU if they differ from the vpp_iface
Pim van Pelt
2022-03-25 00:29:57 +00:00
250aae5210Prune step 8: Remove qinx, dot1ad/dot1q, and set phys to default if they are not in the config
Pim van Pelt
2022-03-25 00:15:41 +00:00
33aedd585fPrune Step 7: Remove VXLAN tunnels that either aren't in the config, or have a mismatched src/dst/vni
Pim van Pelt
2022-03-24 23:42:46 +00:00
c381c7cbaaPrune Step 6: Remove BondEthernets and their member interfaces that are not in the config
Pim van Pelt
2022-03-24 23:17:56 +00:00
731f7ecbb4Implement Prune Step 5: Remove L2XC that are not in the config
Pim van Pelt
2022-03-24 22:50:22 +00:00
721ac690cdImplement Prune Step 4: Remove members from bridgedomains, and remove bridgedomains not in the config
Pim van Pelt
2022-03-24 22:22:55 +00:00
cd4d44a2b1Implement Prune Step 3 -- remove BVI and Loopback interfaces and IPs that are not in the config
Pim van Pelt
2022-03-24 22:02:31 +00:00
4666ba1611Ensure bridgedomains exist in the YAML config before trying to look up BVIs in them
Pim van Pelt
2022-03-24 21:57:39 +00:00
3a74a07ee6Add get_by_bvi_name() and add a few hints on the difference between 'bridgename' (bd*) and 'bvi interfacename' (bvi*)
Pim van Pelt
2022-03-24 21:38:13 +00:00
13f70758damerge conflict
Pim van Pelt
2022-03-24 21:00:08 +00:00
15c54d5e1dImplement Prune Step 2: Remove any mismatched LCP, in correct order
Pim van Pelt
2022-03-24 20:43:34 +00:00
d6e2e9765bImplement Prune Step 2: Remove any mismatched LCP, in correct order
Pim van Pelt
2022-03-24 20:43:34 +00:00
82bcb24d5eAdd get_by_lcp_name() + tests
Pim van Pelt
2022-03-24 20:38:28 +00:00
de9ed1730dAdd get_by_lcp_name() plus tests. Correct behavior of sub-ints without explicit encap: they are exact-match
Pim van Pelt
2022-03-24 20:14:06 +00:00