summaryrefslogtreecommitdiff
path: root/src/conf_mode/service_ipoe-server.py
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-05-04 12:30:31 +0000
committerDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-05-04 12:30:31 +0000
commitde5540e49a0e66805204c424686556451592de45 (patch)
treec540797eb03ff6dea0f8715c774a70ba6cdf970d /src/conf_mode/service_ipoe-server.py
parent2315092353b2fbf32c2c6a4055ed245f27ab2531 (diff)
downloadvyos-1x-de5540e49a0e66805204c424686556451592de45.tar.gz
vyos-1x-de5540e49a0e66805204c424686556451592de45.zip
ipoe: T2294: Fix nodes path
Diffstat (limited to 'src/conf_mode/service_ipoe-server.py')
-rwxr-xr-xsrc/conf_mode/service_ipoe-server.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/conf_mode/service_ipoe-server.py b/src/conf_mode/service_ipoe-server.py
index b53692d37..84443ade3 100755
--- a/src/conf_mode/service_ipoe-server.py
+++ b/src/conf_mode/service_ipoe-server.py
@@ -112,28 +112,30 @@ def get_config():
'name': interface,
'mac': []
}
- for client in conf.list_nodes(base_path + ['authentication', 'interface', interface, 'mac-address']):
- mac = {
+ for mac in conf.list_nodes(['authentication', 'interface', interface, 'mac-address']):
+ client = {
'address': mac,
'rate_download': '',
'rate_upload': '',
'vlan_id': ''
}
- conf.set_level(base_path + ['authentication', 'interface', interface, 'mac-address', client])
+ conf.set_level(base_path + ['authentication', 'interface', interface, 'mac-address', mac])
if conf.exists(['rate-limit', 'download']):
- mac['rate_download'] = conf.return_value(['rate-limit', 'download'])
+ client['rate_download'] = conf.return_value(['rate-limit', 'download'])
if conf.exists(['rate-limit', 'upload']):
- mac['rate_upload'] = conf.return_value(['rate-limit', 'upload'])
+ client['rate_upload'] = conf.return_value(['rate-limit', 'upload'])
if conf.exists(['vlan-id']):
- mac['vlan'] = conf.return_value(['vlan-id'])
+ client['vlan'] = conf.return_value(['vlan-id'])
- tmp['mac'].append(mac)
+ tmp['mac'].append(client)
ipoe['auth_interfaces'].append(tmp)
+ conf.set_level(base_path)
+
#
# authentication mode radius servers and settings
if conf.exists(['authentication', 'mode', 'radius']):