This repository was archived by the owner on Aug 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212# You should have received a copy of the GNU General Public License
1313# along with this program. If not, see <http://www.gnu.org/licenses/>.
1414#
15- # File: util.py
16- # Purpose:
17- # Various common functions for use in build scripts.
1815
1916from vyos import ConfigError
2017from vyos .config import Config
@@ -58,7 +55,7 @@ def get_config(config=None) -> dict:
5855 get_first_key = True ,
5956 no_tag_node_value_mangle = True ,
6057 )
61-
58+
6259 if system_sflow :
6360 config ['system_sflow' ] = system_sflow
6461
@@ -104,9 +101,9 @@ def verify(config):
104101 raise ConfigError ('sFlow sample rate must be a positive integer' )
105102 except ValueError :
106103 raise ConfigError ('sFlow sample rate must be a valid integer' )
107-
104+
108105 # Verify that system sflow has enable-vpp defined
109- if 'system_sflow' not in config or 'enable_vpp ' not in config .get ('system_sflow' , {}):
106+ if 'system_sflow' not in config or 'vpp ' not in config .get ('system_sflow' , {}):
110107 raise ConfigError ('sFlow enable-vpp must be defined under system sflow configuration' )
111108
112109
You can’t perform that action at this time.
0 commit comments