Fixed python load paths so that vppcfg will work installed as python
library and standalone from the source directory, fixing load
pathes for resources such as yaml files along the way.
Added a make target for pylint called 'make check-style', fixed a
number of minor pylint issues along the way.
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Initial version of deb pkg, based on pybuild. Reverted to classic
setup.py, because debian tooling does not yet understand the newer
pyproject.toml.
Yamale is absent from the list of package dependencies as there is as
yet no upstream debian packaging for it, will need to work around with
documentation and install with pip for the moment. Autotest of the
debian packaging is also disabled for the moment.
Systemd service is automatically installed and bould to the vpp
service, but does not become active until the user creates the
configuration /etc/vpp/config.yaml
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
When a bridge-domain has a BVI, it will not sync/add the interfaces to
the bridge. As an example:
bridgedomains:
bd1001:
bvi: loop1001
interfaces: [ tap1001 ]
mtu: 9000
taps:
tap1001:
host:
bridge: br0
mac: 02:fe:83:97:f4:7f
mtu: 9000
name: vpp-bd1001
Before this change, the 'tap1001' would get created, but if the BVI
'loop1001' was correctly set up on the bridge, the code would continue
and skip over enumerating config_bridge_iface. After this change,
both the BVI will be checked (and added if not present), AND all
interfaces will be enumerated (and added if not present).
Add a reasonably tolerant .pylintrc and fix most pylint errors and
warnings.
------------------------------------------------------------------
Your code has been rated at 9.78/10
Used:
$ flynt -a -tc . vppcfg
Execution time: 0.216s
Files checked: 24
Files modified: 13
Character count reduction: 632 (0.36%)
Per expression type:
Old style (`%`) expressions attempted: 209/211 (99.1%)
No `.format(...)` calls attempted.
No concatenations attempted.
F-string expressions created: 205
Ran an integration test before and after. No diffs.
- add __vxlan_tunnel_has_diff() to align with the other _has_diff()
methods
- factor out a few repetitive occurences of l2xc creations
- strictly make "cli=" the pattern instead of "cli = ", to help grepping :)
- based on previously submitted schema and validation, can add a TAP
with host netns, bridge and MTU.
- detect diffs in __tap_has_diff(), used to prune TAPs that must change
- add prune_taps() and create_taps() in the reconciler
- add Dumper() logic to emit YAML config for TAPs
- Move tap_is_lcp() into the VPPApi() class, so it can be reused
Add lots of test cases in intest/*.yaml and example.yaml - full
regression and integration and unit/YAML tests pass on this change.