diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-26 10:51:10 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-26 10:51:10 +0200 |
commit | 2102c7c318ef02f3506a8d3003ed1d41a04b190e (patch) | |
tree | 0626d3513482651f713eb31c19c8cd28c3e2d132 /src | |
parent | e47502b6de539e3da8fb9ceeb4c96708f86dd5c7 (diff) | |
download | vyos-1x-2102c7c318ef02f3506a8d3003ed1d41a04b190e.tar.gz vyos-1x-2102c7c318ef02f3506a8d3003ed1d41a04b190e.zip |
salt: T2382: id and master nodes are mandatory - use in verify()
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/salt-minion.py | 9 |
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): |