Commit Graph

389 Commits

Author SHA1 Message Date
ed2edeb6e8 Bump version to 0.0.5, with unnumbered interfaces 2024-04-07 17:51:27 +02:00
8c3a708647 unnumbered: implement path planner 2024-04-07 17:51:08 +02:00
6949e72888 Assert that target unnumbered interfaces AND loopbacks also cannot be unnumbered 2024-04-07 17:16:25 +02:00
6352d6892e Add reasonable pylint config 2024-04-07 15:35:18 +02:00
c9c5a14f30 lint: remove unnecessary import 2024-04-07 15:34:58 +02:00
2a85eac702 lint: fix unnecessary f-string 2024-04-07 15:34:18 +02:00
09bdaa3fca lint: fix singleton-comparison 2024-04-07 15:32:28 +02:00
6212c5a82f unnumbered: add dumper() 2024-04-07 15:26:55 +02:00
426599e510 Also allow loopback interfaces to be unnumbered 2024-04-07 15:19:57 +02:00
476d909904 unnumbered: Add syntax and semantic checking and unit tests 2024-04-07 14:17:32 +02:00
e427d93197 Reformat 2024-04-07 13:11:09 +02:00
9da5be23fa Bump VERSION, fixes #15 2023-12-17 23:25:09 +01:00
1dd5512186 Ignore .eggs/ 2023-08-29 00:39:58 +02:00
ce2d5aacbb Remove dangling EGG from build 2023-08-29 00:39:31 +02:00
46877a4918 Redundant check, h/t gcolman@ 2023-08-29 00:38:10 +02:00
b4c5a8d337 Only mock config for vppcfg plan 2023-07-05 17:50:02 +02:00
2396b96252 bugfix: add 'err' scoped exception 2023-06-23 00:52:44 +02:00
6975757303 Merge ACL plugin work so-far 2023-06-23 00:50:19 +02:00
91122c70a4 acl: add dumper for acls
A reasonable attempt will be made to shorten the output of terms, but
due to the nature of the ACL plugin in VPP, all ACLs will be unrolled
into their individual ACEs (called 'terms').

- src/dst-port will only be emitted with UDP/TCP
- icmp-typc/code will only be emitted with ICMP/ICMPv6
- icmp-code/type and source/destination-ports ranges will be collapsed
  where appropriate.
- if protocol is 0, only L3 information will be emitted

NOTE: a bug in the VPP plugin will allow for ICMP 'sport' and 'dport'
upper value to be 16 bits. If an ACE is retrieved from the dataplane
regarding an ICMP or ICMPv6 (referring the 16 bit values to icmp type
and code), they will be truncated and a warning issued.
2023-06-23 00:42:24 +02:00
7d615fd338 Set MPLS for loopback and interface. Allow for --novpp and VPP changes 2023-06-23 00:42:08 +02:00
1bebb8d68d acl: add dumper for acls
A reasonable attempt will be made to shorten the output of terms, but
due to the nature of the ACL plugin in VPP, all ACLs will be unrolled
into their individual ACEs (called 'terms').

- src/dst-port will only be emitted with UDP/TCP
- icmp-typc/code will only be emitted with ICMP/ICMPv6
- icmp-code/type and source/destination-ports ranges will be collapsed
  where appropriate.
- if protocol is 0, only L3 information will be emitted

NOTE: a bug in the VPP plugin will allow for ICMP 'sport' and 'dport'
upper value to be 16 bits. If an ACE is retrieved from the dataplane
regarding an ICMP or ICMPv6 (referring the 16 bit values to icmp type
and code), they will be truncated and a warning issued.
2023-06-23 00:41:43 +02:00
28b8ba1485 Protect API calls that are missing, print a warning 2023-06-23 00:40:46 +02:00
603e26a313 Set MPLS for loopback and interface. Allow for --novpp and VPP changes 2023-06-23 00:38:39 +02:00
c7ba451016 Collapse the error messages to force consistency 2023-06-23 00:33:39 +02:00
a4dfbf055f Refuse to work with ACLs if there are duplicate tags -- it means something/somebody has been inserting them outside of vppcfg, and this breaks the requirement that vppcfg.acls. is the same uniquely identified vpp.acl.tag 2023-06-23 00:33:21 +02:00
871e5a7d8b acl: add dumper for acls
A reasonable attempt will be made to shorten the output of terms, but
due to the nature of the ACL plugin in VPP, all ACLs will be unrolled
into their individual ACEs (called 'terms').

- src/dst-port will only be emitted with UDP/TCP
- icmp-typc/code will only be emitted with ICMP/ICMPv6
- icmp-code/type and source/destination-ports ranges will be collapsed
  where appropriate.
- if protocol is 0, only L3 information will be emitted

NOTE: a bug in the VPP plugin will allow for ICMP 'sport' and 'dport'
upper value to be 16 bits. If an ACE is retrieved from the dataplane
regarding an ICMP or ICMPv6 (referring the 16 bit values to icmp type
and code), they will be truncated and a warning issued.
2023-06-23 00:32:51 +02:00
7a69f657db Protect API calls that are missing, print a warning 2023-06-23 00:31:48 +02:00
52864aac2c Add documentation for MPLS on loopback interfaces 2023-06-23 00:31:21 +02:00
1c9590dcce Set MPLS for loopback and interface. Allow for --novpp and VPP changes 2023-06-23 00:31:19 +02:00
9a42cc91c3 Allow MPLS on loopbacks too -- needed for BVIs and such. Add tests. 2023-06-23 00:30:03 +02:00
52b8cb5477 Add MPLS config option and interface.is_mpls()
Also add tests and documentation
2023-06-23 00:30:03 +02:00
0f27a15bee Update schema.yaml 2023-06-23 00:30:03 +02:00
b442bc1aae Fix some formatting issues 2023-06-23 00:30:03 +02:00
8077d20bc7 Cut 0.0.4 2023-06-23 00:30:03 +02:00
367aad8dbe Add address.get_canonical() and is_canonical()
These functions will take either an IPv4/IPv6 address, or an IPv4/IPv6
prefix, and cast them to their canonical form. Notably for IPv6 addresses,
this means lower case and with the 0-tuples correctly formatted:

2001:DB8::1 becomes 2001:db8::1
2001:db8:0:0::1 becomes 2001:db8::1

This avoids spurious diffs in vppcfg when comparing to the output of the VPP
dataplane.
2023-06-23 00:30:03 +02:00
f961e41ce6 Add address.get_canonical() and is_canonical()
These functions will take either an IPv4/IPv6 address, or an IPv4/IPv6
prefix, and cast them to their canonical form. Notably for IPv6 addresses,
this means lower case and with the 0-tuples correctly formatted:

2001:DB8::1 becomes 2001:db8::1
2001:db8:0:0::1 becomes 2001:db8::1

This avoids spurious diffs in vppcfg when comparing to the output of the VPP
dataplane.
2023-06-23 00:30:03 +02:00
cf5f1f0944 Add device-type, to ensure that plan --novpp generates MTU statements 2023-06-23 00:30:03 +02:00
3249432681 Move to checkout@v3 for node 16 2023-06-23 00:30:03 +02:00
8cf915e873 Bugfix: Run vppcfg plan --novpp cleanly with bondethernet and MAC addresses 2023-06-23 00:30:03 +02:00
d804422f55 Merge pull request #13 from pimvanpelt/mpls_iface
Support MPLS Interfaces
2023-06-23 00:17:57 +02:00
20b29735fc Merge pull request #12 from najieb/main
Update schema.yaml to allow for DPDK interfaces that have hexadecimal names, such as `GigabitEthernetb/0/0`. h/t najieb for the simple fix.
2023-06-23 00:13:06 +02:00
1dc9b4f393 Protect API calls that are missing, print a warning 2023-06-11 18:55:44 +02:00
d274a47888 Add documentation for MPLS on loopback interfaces 2023-06-11 18:45:30 +02:00
0cf4473ca1 Set MPLS for loopback and interface. Allow for --novpp and VPP changes 2023-06-11 18:43:43 +02:00
9efcf345e0 Allow MPLS on loopbacks too -- needed for BVIs and such. Add tests. 2023-06-11 18:18:05 +02:00
4681aec952 Add MPLS config option and interface.is_mpls()
Also add tests and documentation
2023-06-11 18:05:33 +02:00
7b160c9a82 Update schema.yaml 2023-05-31 10:04:36 +07:00
85e553c437 Fix some formatting issues 2023-05-25 18:32:54 +02:00
d5dbd11d2d Cut 0.0.4 2023-05-25 18:29:52 +02:00
0183822505 Add address.get_canonical() and is_canonical()
These functions will take either an IPv4/IPv6 address, or an IPv4/IPv6
prefix, and cast them to their canonical form. Notably for IPv6 addresses,
this means lower case and with the 0-tuples correctly formatted:

2001:DB8::1 becomes 2001:db8::1
2001:db8:0:0::1 becomes 2001:db8::1

This avoids spurious diffs in vppcfg when comparing to the output of the VPP
dataplane.
2023-05-25 18:29:52 +02:00