diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-09-17 22:28:34 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-09-21 16:34:25 +0200 |
commit | 05df2a5f021f0c7aab7c06db645d210858b6e98d (patch) | |
tree | 96b08be53303b3c30f24829d5538bc41dc010bea /python/vyos/configverify.py | |
parent | 87d54b805f6fe1ede06387241117d492334bee31 (diff) | |
download | vyos-1x-05df2a5f021f0c7aab7c06db645d210858b6e98d.tar.gz vyos-1x-05df2a5f021f0c7aab7c06db645d210858b6e98d.zip |
ipoe: T4678: T4703: rewrite to get_config_dict()
In addition to the rewrite to make use of get_config_dict() the CLI is
slightly adjusted as specified in T4703.
* Rename vlan-id and vlan-range to simply vlan
* Rename network-mode to simply mode
* Re-use existing common Jinja2 template for Accel-PPP which are shared
with PPPoE and SSTP server.
* Retrieve default values via defaultValue XML node
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r-- | python/vyos/configverify.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 447ec795c..afa0c5b33 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -381,14 +381,14 @@ def verify_vlan_config(config): verify_mtu_parent(c_vlan, config) verify_mtu_parent(c_vlan, s_vlan) -def verify_accel_ppp_base_service(config): +def verify_accel_ppp_base_service(config, local_users=True): """ Common helper function which must be used by all Accel-PPP services based on get_config_dict() """ # vertify auth settings - if dict_search('authentication.mode', config) == 'local': - if not dict_search('authentication.local_users', config): + 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!') for user in dict_search('authentication.local_users.username', config): |