diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-10-28 19:30:11 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-10-28 19:30:11 +0100 |
commit | 25551c5a30bda8bd6e459638cda252ee4c93a07f (patch) | |
tree | 3f630be5993af5f50c2c55a3a2bfe7dff9312028 /src/conf_mode/service_pppoe-server.py | |
parent | 4a83a9ac55caf463c876dd948445e09d316ca629 (diff) | |
download | vyos-1x-25551c5a30bda8bd6e459638cda252ee4c93a07f.tar.gz vyos-1x-25551c5a30bda8bd6e459638cda252ee4c93a07f.zip |
vyos.util: T2995: rename vyos_dict_search() -> dict_search()
Renamed using snippet below:
----------------------------
for file in $(find . -name "*.py")
do
sed -i "s/vyos_dict_search/dict_search/" $file
done
Diffstat (limited to 'src/conf_mode/service_pppoe-server.py')
-rwxr-xr-x | src/conf_mode/service_pppoe-server.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/conf_mode/service_pppoe-server.py b/src/conf_mode/service_pppoe-server.py index a520120f8..2260b3fe1 100755 --- a/src/conf_mode/service_pppoe-server.py +++ b/src/conf_mode/service_pppoe-server.py @@ -23,7 +23,7 @@ from vyos.configdict import get_accel_dict from vyos.configverify import verify_accel_ppp_base_service from vyos.template import render from vyos.util import call -from vyos.util import vyos_dict_search +from vyos.util import dict_search from vyos import ConfigError from vyos import airbag airbag.enable() @@ -57,13 +57,13 @@ def verify(pppoe): raise ConfigError('At least one listen interface must be defined!') # local ippool and gateway settings config checks - if not (vyos_dict_search('client_ip_pool.subnet', pppoe) or - (vyos_dict_search('client_ip_pool.start', pppoe) and - vyos_dict_search('client_ip_pool.stop', pppoe))): + if not (dict_search('client_ip_pool.subnet', pppoe) or + (dict_search('client_ip_pool.start', pppoe) and + dict_search('client_ip_pool.stop', pppoe))): print('Warning: No PPPoE client pool defined') - if vyos_dict_search('authentication.radius.dynamic_author.server', pppoe): - if not vyos_dict_search('authentication.radius.dynamic_author.key', pppoe): + if dict_search('authentication.radius.dynamic_author.server', pppoe): + if not dict_search('authentication.radius.dynamic_author.key', pppoe): raise ConfigError('DA/CoE server key required!') return None @@ -75,7 +75,7 @@ def generate(pppoe): render(pppoe_conf, 'accel-ppp/pppoe.config.tmpl', pppoe, trim_blocks=True) - if vyos_dict_search('authentication.mode', pppoe) == 'local': + if dict_search('authentication.mode', pppoe) == 'local': render(pppoe_chap_secrets, 'accel-ppp/chap-secrets.config_dict.tmpl', pppoe, trim_blocks=True, permission=0o640) else: |