From 0ea1574b922ed30b46717620ce212af7f70ec03f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 15 Apr 2022 21:09:03 +0200 Subject: salt-minion: T4364: add support for source-interface definition --- src/conf_mode/salt-minion.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/conf_mode/salt-minion.py') diff --git a/src/conf_mode/salt-minion.py b/src/conf_mode/salt-minion.py index 89df3b48a..d296bc202 100755 --- a/src/conf_mode/salt-minion.py +++ b/src/conf_mode/salt-minion.py @@ -25,6 +25,7 @@ from vyos.configdict import dict_merge from vyos.template import render from vyos.util import call from vyos.util import chown +from vyos.verify import verify_interface_exists from vyos.xml import defaults from vyos import ConfigError @@ -66,6 +67,12 @@ def get_config(config=None): return salt def verify(salt): + if not salt: + return None + + if 'source_interface' in salt: + verify_interface_exists(salt['source_interface']) + return None def generate(salt): -- cgit v1.2.3