diff options
| -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!') |
