Skip to content

Commit 819fcff

Browse files
authored
Merge pull request #4621 from ServerForge/current
T7175: Added VPP option
2 parents 6c6bcb5 + 96bcbae commit 819fcff

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

data/templates/sflow/hsflowd.conf.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ sflow {
3232
dropmon { limit={{ drop_monitor_limit }} start=on sw=on hw=off }
3333
{% endif %}
3434
dbus { }
35+
{% if vpp is vyos_defined %}
36+
vpp { }
37+
{% endif %}
3538
}

interface-definitions/system_sflow.xml.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@
106106
</leafNode>
107107
</children>
108108
</tagNode>
109+
<leafNode name="vpp">
110+
<properties>
111+
<help>Enable VPP sampling</help>
112+
<valueless/>
113+
</properties>
114+
</leafNode>
109115
<leafNode name="enable-egress">
110116
<properties>
111117
<help>Enable egress sampling</help>

src/conf_mode/system_sflow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def verify(sflow):
6060
)
6161

6262
# Check if at least one interface is configured
63-
if 'interface' not in sflow:
63+
# Skip this check if VPP is enabled
64+
if 'interface' not in sflow and 'vpp' not in sflow:
6465
raise ConfigError(
6566
'sFlow requires at least one interface to be configured!')
6667

0 commit comments

Comments
 (0)