Commit Graph

344 Commits

Author SHA1 Message Date
b62f5313dd release: bump version to 0.0.2 for Debian and PIP 2022-07-18 13:05:58 +00:00
849b51be67 pylint: move most implementation detail to private methods 2022-07-18 08:03:56 +00:00
8121eba598 pylint: Remove a few exception lint warnings 2022-07-18 07:46:12 +00:00
343a59b376 bugfix: remove addresses also when there is a diff, not only when the interface is not present; remove duplicate block of code 2022-07-18 07:37:00 +00:00
18260e3465 Call the correct new location of vppcfg.py 2022-07-18 07:36:14 +00:00
1b5233bac1 Merge pull request #8 from mdr78/main
build: add emacs undo tree to .gitignore
2022-07-13 14:34:22 +02:00
7d7e1e2e21 build: add emacs undo tree to .gitignore
Add undo tree to gitignore

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2022-07-13 13:30:34 +01:00
1abcc38bdd build: add empty __init__.py to satisfy build / pylint 2022-07-13 12:28:15 +00:00
2aab450735 Merge pull request #7 from mdr78/main
build: enable unit tests as part of build
2022-07-13 14:21:34 +02:00
fbe82a3057 lint: Address pylint warnings 2022-07-13 12:16:45 +00:00
f5c31c7f39 build: enable unit tests as part of build
Enabling the unit tests as part of the pip and debian builds.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2022-07-13 13:05:55 +01:00
fff10dba02 Merge pull request #6 from mdr78/main
build: fix python load paths
2022-07-12 17:19:29 +02:00
9f2ef0e56a build: fix python load paths
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>
2022-07-12 15:38:14 +01:00
ca0897fa65 Update README.md
Avoid specifying the exact version number, lest we forget to update the README on each subsequent release. Instead, just ls -l the *.deb package.
2022-07-10 21:09:35 +02:00
f8bf7be731 Port 'make wipe' patterns into .gitignore so as not to create a dirty client while building 2022-07-10 18:27:18 +00:00
a644840453 bugfix: print sub-interface, not phy, in this error message 2022-07-10 14:12:23 +00:00
d79efc5a83 Merge pull request #5 from mdr78/main
build: initial pybuild based deb packaging
2022-07-04 14:26:31 +02:00
cd70856b6d Update README.md
fix path of unittests
2022-07-04 13:08:51 +02:00
3122022383 build: initial pybuild based deb packaging
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>
2022-07-04 11:34:16 +01:00
1affc2b59c Merge pull request #4 from mdr78/main
build: reworked with setuptools
2022-07-01 19:54:00 +02:00
b15106b88c build: reworked with setuptools
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2022-07-01 18:36:13 +01:00
4c35df7239 Be a bit more persistent when connecting to VPP - retry 30 times before giving up 2022-06-26 12:37:44 +00:00
29736a3d6b bugfix: bridgedomain sync
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).
2022-06-22 15:32:33 +00:00
91899a3908 Merge pull request #3 from dwallacelf/fix-vpp-args
Fix optional vpp args handling
2022-05-18 07:08:03 +02:00
02cba6e81f Fix optional vpp args handling
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-05-17 17:36:58 -04:00
a7aefee4de Black formatting 2022-05-01 17:51:04 +00:00
a69a49d6f6 Only copy over keyword args if they're set (fixes bug in 'check' which does not supply args.vpp_*) 2022-05-01 17:47:11 +00:00
2ce5fc58e7 Merge pull request #2 from dwallacelf/vpp-api-args
vppcfg: add args to specify location of vpp api files
2022-04-27 10:11:01 +02:00
bc1be09172 Merge pull request #1 from dwallacelf/dumper-pg-if
vpp/dumper: add packet-generator interfaces
2022-04-27 10:07:53 +02:00
a9cff05ca4 vpp/reconciler: format diff with black
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-04-26 21:30:06 -04:00
b09773ae75 vppcfg: add args to specify location of vpp api files
- refactor to address review comments.

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-04-26 21:04:31 -04:00
5b6d80a8f8 dumper: format code change with black.
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-04-26 18:04:50 -04:00
680ef9c8be dumper.py: address review comments.
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-04-26 17:55:32 -04:00
71ea1823f4 Formatting w/ black 2022-04-24 10:41:35 +00:00
1a1760d45c Remove docstring here, it's not describing a class/function/method 2022-04-24 10:38:46 +00:00
5af27211f3 Add an initial stab at docstrings - enable docstring pylinter 2022-04-24 10:36:25 +00:00
544f343da7 Remove spurious print 2022-04-22 22:05:41 +00:00
c78bdf955a Don't ignore missing/unreadable files in test cases (pylint) 2022-04-22 19:40:30 +00:00
5a30d9d995 Add proper exception classes (pylint) 2022-04-22 19:40:04 +00:00
bc0310e088 Study and respond to PyLint
Add a reasonably tolerant .pylintrc and fix most pylint errors and
warnings.

------------------------------------------------------------------
Your code has been rated at 9.78/10
2022-04-22 19:32:38 +00:00
f8a6c3eba7 Add a note about black code formatting 2022-04-22 13:13:42 +00:00
b7ff5479ac Fix lint errors with black 2022-04-22 13:10:16 +00:00
1b49059ffb Add the --diff flag to black to show what should change 2022-04-22 13:09:09 +00:00
9ee9a32693 Test github push action 2022-04-22 13:07:04 +00:00
d9e46b4041 Add a black (code formatting) github action on PR and push 2022-04-22 13:06:21 +00:00
baaaaa67b5 Initial formatting run with Black. Integration tests and unit tests pass before and after this change. 2022-04-22 13:05:55 +00:00
b375ddb433 Final f-string conversions that flynt did not catch. Tested: integration test before and after are clean 2022-04-22 11:48:08 +00:00
e13694a566 Move to f-strings
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.
2022-04-22 10:58:41 +00:00
13cdba1e1d Remove commented out 'print' debug lines 2022-04-22 09:33:27 +00:00
d8c0dd4ab4 Skip TAPs that are an LCP 2022-04-21 19:17:52 +00:00