Pim van Pelt
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
Pim van Pelt
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
Pim van Pelt
864c78ddfe
Only change link and MTU if they differ from the vpp_iface
2022-03-25 00:29:57 +00:00
Pim van Pelt
250aae5210
Prune step 8: Remove qinx, dot1ad/dot1q, and set phys to default if they are not in the config
2022-03-25 00:15:41 +00:00
Pim van Pelt
33aedd585f
Prune Step 7: Remove VXLAN tunnels that either aren't in the config, or have a mismatched src/dst/vni
2022-03-24 23:42:46 +00:00
Pim van Pelt
c381c7cbaa
Prune Step 6: Remove BondEthernets and their member interfaces that are not in the config
2022-03-24 23:17:56 +00:00
Pim van Pelt
731f7ecbb4
Implement Prune Step 5: Remove L2XC that are not in the config
2022-03-24 22:50:22 +00:00
Pim van Pelt
721ac690cd
Implement Prune Step 4: Remove members from bridgedomains, and remove bridgedomains not in the config
2022-03-24 22:25:37 +00:00
Pim van Pelt
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
Pim van Pelt
15c54d5e1d
Implement Prune Step 2: Remove any mismatched LCP, in correct order
2022-03-24 20:59:28 +00:00
Pim van Pelt
fe2e63ac0e
Prune Step1: remove addresses and set down, any interface not in the YAML config
2022-03-24 17:16:29 +00:00
Pim van Pelt
de95e522ab
Move VPPApi into a Reconciler class, add (empty) prune() create() and sync() methods. Add --force flag to enable making progress after warnings are issued
2022-03-24 15:57:12 +00:00
Pim van Pelt
e8e41098be
Assert that all PHYs in the config also exist in VPP
2022-03-24 12:29:16 +00:00
Pim van Pelt
8129235031
Clean up logging a little bit
2022-03-24 12:14:26 +00:00
Pim van Pelt
ac5b8fcc8f
Simple VPPApi abstraction, which fetches the necessary info from VPP, and a few dumpers
2022-03-23 23:29:19 +00:00