summaryrefslogtreecommitdiff
path: root/python/vyos/configverify.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-12-05 10:00:18 +0100
committerGitHub <noreply@github.com>2022-12-05 10:00:18 +0100
commit31566f8195b7deed559578526e0c0c42c615e79f (patch)
tree02d1e21fd21cd4fba94c4365251a9e90f74c6319 /python/vyos/configverify.py
parent1804f1cb1a9026fe07b49f5d65460875423534bc (diff)
parentc229abf2a7db93e0117d6b39de62b9c15150c915 (diff)
downloadvyos-1x-31566f8195b7deed559578526e0c0c42c615e79f.tar.gz
vyos-1x-31566f8195b7deed559578526e0c0c42c615e79f.zip
Merge pull request #1686 from sever-sever/T4804
T4804: Add check for PPPoE server and use defaults values
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r--python/vyos/configverify.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index afa0c5b33..8e0ce701e 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -388,8 +388,10 @@ def verify_accel_ppp_base_service(config, local_users=True):
"""
# vertify auth settings
if local_users and dict_search('authentication.mode', config) == 'local':
- if dict_search(f'authentication.local_users', config) == None:
- raise ConfigError('Authentication mode local requires local users to be configured!')
+ if (dict_search(f'authentication.local_users', config) is None or
+ dict_search(f'authentication.local_users', config) == {}):
+ raise ConfigError(
+ 'Authentication mode local requires local users to be configured!')
for user in dict_search('authentication.local_users.username', config):
user_config = config['authentication']['local_users']['username'][user]