summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-15 21:09:03 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-15 21:09:03 +0200
commit0ea1574b922ed30b46717620ce212af7f70ec03f (patch)
tree12cfbb981e57f518e54069c0aa3cdb0ab6677f5f /src
parent0b56514eb00864c8d69a02c2ab307f3877623d8a (diff)
downloadvyos-1x-0ea1574b922ed30b46717620ce212af7f70ec03f.tar.gz
vyos-1x-0ea1574b922ed30b46717620ce212af7f70ec03f.zip
salt-minion: T4364: add support for source-interface definition
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/salt-minion.py7
1 files changed, 7 insertions, 0 deletions
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):