summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle McClammy <kylem@serverforge.org>2025-07-24 19:20:39 +0000
committerKyle McClammy <kylem@serverforge.org>2025-07-24 19:20:39 +0000
commite0564b36303488d2033bdf921f54e4180269cdf5 (patch)
tree1bd3d3409d95f146d9d3f4e3d38fdaae0f333f46
parent6c6bcb59b85efdb60129639afaade482a2419cfe (diff)
downloadvyos-1x-e0564b36303488d2033bdf921f54e4180269cdf5.tar.gz
vyos-1x-e0564b36303488d2033bdf921f54e4180269cdf5.zip
T7175: Added VPP option
-rw-r--r--data/templates/sflow/hsflowd.conf.j23
-rw-r--r--interface-definitions/system_sflow.xml.in6
-rwxr-xr-xsrc/conf_mode/system_sflow.py3
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..7e4a02916 100644
--- a/interface-definitions/system_sflow.xml.in
+++ b/interface-definitions/system_sflow.xml.in
@@ -112,6 +112,12 @@
<valueless/>
</properties>
</leafNode>
+ <leafNode name="vpp">
+ <properties>
+ <help>Enable VPP sampling</help>
+ <valueless/>
+ </properties>
+ </leafNode>
#include <include/interface/vrf.xml.i>
</children>
</node>
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!')