Commit Graph

20 Commits

Author SHA1 Message Date
c3f8a97de9 Move docs into their own directory 2022-04-03 12:02:41 +00:00
682d157d5b Add note on 'Applying' verb which will come next. 2022-04-02 22:37:45 +02:00
6a6caa113e Update usage output 2022-04-02 22:34:13 +02:00
850b982f2a First part of a BVI refactor
The handling of BVI is awkward, with the autoderived interface name
"bviXX" based on the bridgedomain bd_id. Lots of special casing happens
on account of this decision, and to make matters worse there is poor
interaction (leading to VPP crashes) when BVIs and Loopbacks are used
at the same time: https://lists.fd.io/g/vpp-dev/message/21116

This is step one of a refactor of the logic. In this commit, I'm
removing all of the BVI logic from the codebase, rendering bridgedomains
unable to have IP interfaces. In the next commit, I will introduce new
behavior in the schema, allowing for 'bvi' to be a loopback
interfacename which will be used as BVI for a bridgedomain, restoring
the ability to use bridgedomains with IP interfaces (using a loop).
2022-03-27 20:09:22 +00:00
90a97a3d7b Add Create Phase
This is rather straight forward: for each object (in correct order),
if the object exists in VPP, we can skip it. We know that it will exist
only if it was valid (ie correct encapsulation, tc). If it does not
exist in VPP, issue the correct creation request to VPP.

Implement the creation of all types, in the following order:
- create_loopbacks() and create_bvis()
- create_bondethernets()
- create_vxlan_tunnels()
- create_sub_interfaces() first 1-tag, then 2-tag
- create_bridgedomains()
- create_lcps() bottomsup: first 0-tag, then 1-tag, then 2-tag names.

Add a placeholder TODO to fix a bug with prune_sub_interfaces() which
should allow for TAPs belonging to LCPs; will fix in followup commit.
2022-03-26 11:14:30 +00:00
152fa12099 Update to ordering
- Prune bridgedomains before pruning BVIs. The reason for this is that
  prune_bridgedomains() will set the BVI to L3 mode, and if the BVI is
  removed before the bridge is pruned, this is an error.
- When pruning bridge members, use the VPP configuration as the member
  may not exist in the config, upon which the call to interface.is_sub()
  will return False even if it is actually a VPP sub-int.

Update README.md, also take into account the previous change which calls
prune_addresses() before object deletion.
2022-03-25 13:56:04 +00:00
a068f25f19 Re-order the Pruning flow
1. sub-ints have to be removed before their parent, particularly
   bondethernets, because destroying BondEthernet0 will cascade
   destruction of all of its sub-ints. So:
   - first prune_sub_interfaces()
   - then prune_bondethernets()
   - finally prune_phys()
2. for any interface (loop, bvi, sub, phy, bond), prune_addresses()
   before destroying the interface

Update the README with this new flow.
2022-03-25 13:35:14 +00:00
0a31a22e7e Add 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. 2022-03-25 11:55:30 +00:00
c381c7cbaa Prune Step 6: Remove BondEthernets and their member interfaces that are not in the config 2022-03-24 23:17:56 +00:00
cd4d44a2b1 Implement Prune Step 3 -- remove BVI and Loopback interfaces and IPs that are not in the config 2022-03-24 22:02:31 +00:00
8ac9b50d94 Add some clarification to the reconsiliation algorithm 2022-03-23 23:28:12 +00:00
f37b80c012 Break into three sections 2022-03-23 17:16:29 +00:00
bcc4c8ff05 Merge branch 'main' of github.com:pimvanpelt/vppcfg into main 2022-03-23 17:11:46 +00:00
7390322693 Add first stab approximation of the reconsiliation order 2022-03-23 17:11:34 +00:00
613b4a27c7 Update README.md 2022-03-22 23:03:22 +01:00
df1b1bbbef Update README.md 2022-03-22 22:58:38 +01:00
412ecfdbf7 Add important note :) 2022-03-13 21:06:02 +00:00
974ff054d3 Add BUILD instructions. Add LICENSE 2022-03-13 20:59:20 +00:00
be102d5b6d Add ip_interface() validator 2022-03-13 09:55:01 +00:00
9862129ab0 Initial commit 2022-03-13 09:54:50 +00:00