summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-26 10:51:10 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-26 10:51:10 +0200
commit2102c7c318ef02f3506a8d3003ed1d41a04b190e (patch)
tree0626d3513482651f713eb31c19c8cd28c3e2d132 /src/conf_mode
parente47502b6de539e3da8fb9ceeb4c96708f86dd5c7 (diff)
downloadvyos-1x-2102c7c318ef02f3506a8d3003ed1d41a04b190e.tar.gz
vyos-1x-2102c7c318ef02f3506a8d3003ed1d41a04b190e.zip
salt: T2382: id and master nodes are mandatory - use in verify()
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/salt-minion.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/salt-minion.py b/src/conf_mode/salt-minion.py
index 78eda08f3..55139dca1 100755
--- a/src/conf_mode/salt-minion.py
+++ b/src/conf_mode/salt-minion.py
@@ -78,6 +78,15 @@ def get_config():
return salt
def verify(salt):
+ if not salt:
+ return None
+
+ if not salt['salt_id']:
+ raise ConfigError('Missing mandatory salt id!')
+
+ if not salt['master']:
+ raise ConfigError('Salt master must be defined!')
+
return None
def generate(salt):