diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-07-25 19:15:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-25 19:15:42 +0300 |
| commit | 819fcff25325c113ca18d9575c0fb03cff96a9af (patch) | |
| tree | 74943ddd73484764cd2c2f4ce8426cc11cd8f41e | |
| parent | 6c6bcb59b85efdb60129639afaade482a2419cfe (diff) | |
| parent | 96bcbae4c9fd33194b180b755a6df09c93c2dd93 (diff) | |
| download | vyos-1x-819fcff25325c113ca18d9575c0fb03cff96a9af.tar.gz vyos-1x-819fcff25325c113ca18d9575c0fb03cff96a9af.zip | |
Merge pull request #4621 from ServerForge/current
T7175: Added VPP option
| -rw-r--r-- | data/templates/sflow/hsflowd.conf.j2 | 3 | ||||
| -rw-r--r-- | interface-definitions/system_sflow.xml.in | 6 | ||||
| -rwxr-xr-x | src/conf_mode/system_sflow.py | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/data/templates/sflow/hsflowd.conf.j2 b/data/templates/sflow/hsflowd.conf.j2 index 6a1ba2956..fc251e92b 100644 --- a/data/templates/sflow/hsflowd.conf.j2 +++ b/data/templates/sflow/hsflowd.conf.j2 @@ -32,4 +32,7 @@ sflow { dropmon { limit={{ drop_monitor_limit }} start=on sw=on hw=off } {% endif %} dbus { } +{% if vpp is vyos_defined %} + vpp { } +{% endif %} } diff --git a/interface-definitions/system_sflow.xml.in b/interface-definitions/system_sflow.xml.in index 2cd7a5d12..a77d6cf00 100644 --- a/interface-definitions/system_sflow.xml.in +++ b/interface-definitions/system_sflow.xml.in @@ -106,6 +106,12 @@ </leafNode> </children> </tagNode> + <leafNode name="vpp"> + <properties> + <help>Enable VPP sampling</help> + <valueless/> + </properties> + </leafNode> <leafNode name="enable-egress"> <properties> <help>Enable egress sampling</help> diff --git a/src/conf_mode/system_sflow.py b/src/conf_mode/system_sflow.py index 86a344ff7..c5fe5641f 100755 --- a/src/conf_mode/system_sflow.py +++ b/src/conf_mode/system_sflow.py @@ -60,7 +60,8 @@ def verify(sflow): ) # Check if at least one interface is configured - if 'interface' not in sflow: + # Skip this check if VPP is enabled + if 'interface' not in sflow and 'vpp' not in sflow: raise ConfigError( 'sFlow requires at least one interface to be configured!') |
