| Age | Commit message (Collapse) | Author |
|
python: T8857: replace bare except clauses with except Exception in config scripts
|
|
scripts
Bare except: catches everything derived from BaseException, including
SystemExit and KeyboardInterrupt. Config scripts must not silently
continue past sys.exit(), so replace bare except: with except Exception:
in the three config-mode scripts that contained one.
Library code (python/vyos/configverify.py, python/vyos/config.py) and
op-mode scripts are intentionally out of scope: those cases require
case-by-case design review (e.g. MTU lookups should accept defaults as
arguments rather than rely on exception handling; reset-style op-mode
scripts may legitimately want to ignore KeyboardInterrupt).
Sites changed:
- src/conf_mode/interfaces_ethernet.py (MTU adapter lookup)
- src/conf_mode/vpp_interfaces_bonding.py (MAC validation)
- src/conf_mode/container.py x2 (IPv4 / IPv6 prefix lookup)
|
|
Add bidirectional VPP interface reference validation: prevent assigning an interface used by a VPP feature (NAT/ACL/IPFIX/sFlow, etc.)
as a VPP member (bond/bridge/xconnect) and prevent using a VPP member interface in VPP features.
Block interface deletion when it is still referenced by any VPP feature/member.
Fix VLAN subinterface removal checks broken by the recent VPP config tree restructuring.
|
|
vpp: T8416: Prevent interfaces from being assigned to xconnect and bridge/bonding at the same time
|
|
bridge/bonding at the same time
|
|
vpp: T8355: Set MTU for vpp interfaces
|
|
|
|
T8352: VPP add op-mode commands to show bonding interfaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CLI:
```
set vpp acl ip tag-name <tag-name> rule <nn> action <permit|deny|permit-reflect>
set vpp acl ip tag-name <tag-name> rule <nn> source prefix <prefix>
set vpp acl ip tag-name <tag-name> rule <nn> source port <port|range>
set vpp acl ip tag-name <tag-name> rule <nn> destination prefix <prefix>
set vpp acl ip tag-name <tag-name> rule <nn> destination port <port>
set vpp acl ip tag-name <tag-name> rule <nn> protocol <protocol>
set vpp acl ip tag-name <tag-name> rule <nn> tcp-flags <fin|syn|rst|psh|ack|urg|ecn|cwr>
set vpp acl ip tag-name <tag-name> rule <nn> tcp-flags not <fin|syn|rst|psh|ack|urg|ecn|cwr>
set vpp acl ip interface <interface_name> input acl-tag <n> tag-name <tag-name>
set vpp acl ip interface <interface_name> output acl-tag <n> tag-name <tag-name>
set vpp acl macip tag-name <tag-name> rule <nn> prefix <prefix>
set vpp acl macip tag-name <tag-name> rule <nn> mac-address <mac>
set vpp acl macip tag-name <tag-name> rule <nn> mac-mask <mac-mask>
set vpp acl macip tag-name <tag-name> rule <nn> action <permit|deny>
set vpp acl macip interface <interface_name> tag-name <tag-name>
```
OP mode
```
show vpp acl ip tag-name <tag_name>
show vpp acl ip interface
show vpp acl macip tag-name <tag_name>
show vpp acl macip interface
```
|
|
This reverts commit 405d3ee7ac909bbf458f522e6539a1f4eacdf7e6.
|
|
|
|
By default VPP creates interface via API with the 'down' state.
Add methods to set interface state UP/DOWN.
It probably should reuse the common Class in the future.
We do not have classes for interface (vpp) state settings.
|
|
|
|
Introduce a delay to address instability in the VPP API, which may
fail to create the LCP or establish a connection.
This should be reviewed and resolved in future releases.
This fixes confgurations with included kernel-itnerface (LCP)
And all smoketests
Example:
set interfaces ethernet eth1 address '192.0.2.1/30'
set vpp settings interface eth1 driver 'dpdk'
set vpp interfaces vxlan vxlan10 remote '192.0.2.2'
set vpp interfaces vxlan vxlan10 source-address '192.0.2.1'
set vpp interfaces vxlan vxlan10 vni '10'
set vpp interfaces vxlan vxlan10 kernel-interface 'vpptap10'
Without this delay we get:
vyos@r14# commit
[ vpp interfaces vxlan vxlan10 ]
Traceback (most recent call last):
File "/usr/libexec/vyos/services/vyos-configd", line 139, in run_script
script.apply(c)
File "/usr/libexec/vyos//conf_mode/vpp_interfaces_vxlan.py", line 174, in apply
i.kernel_add()
File "/usr/lib/python3/dist-packages/vyos/vpp/interface/vxlan.py", line 85, in kernel_add
self.vpp.lcp_pair_add(self.ifname, self.kernel_interface)
File "/usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py", line 79, in check_retval_wrapper
return_value = decorated_func(cls, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py", line 58, in api_safe_wrapper
return decorated_func(cls, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py", line 188, in lcp_pair_add
return self.__vpp_api_client.api.lcp_itf_pair_add_del_v2(**api_call_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 129, in __call__
return self._func(**kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 564, in f
return self._call_vpp(i, msg, multipart, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 853, in _call_vpp
raise VPPIOError(2, "VPP API client: read failed")
vpp_papi.vpp_papi.VPPIOError: [Errno 2] VPP API client: read failed
|
|
Do not use 'recursive_defaults' as argument of the funciton get_config()
It cause vyos-1x/src/tests/test_configd_inspect.py signature checks fail
AssertionError: 2 != 1 : 'vpp_interfaces_bonding.py': 'get_config' incorrect signature
|
|
|