diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-10-24 15:26:55 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-10-24 15:26:55 +0200 |
commit | 1d8e7c841d7eee501e9a822db727fc1eec449b5e (patch) | |
tree | 6d31b0319a71e92b2b0ef18abe6c0bd64fb55457 /python/vyos/configdict.py | |
parent | 034c68aa62b5a9a493e77e8ac18f4e38ee621b25 (diff) | |
parent | 3400b1dd79702553ebbd40516bf454f3fe47885b (diff) | |
download | vyos-1x-1d8e7c841d7eee501e9a822db727fc1eec449b5e.tar.gz vyos-1x-1d8e7c841d7eee501e9a822db727fc1eec449b5e.zip |
Merge branch 'current' of github.com:vyos/vyos-1x into equuleus
* 'current' of github.com:vyos/vyos-1x:
T1762: adjust the set_level() calls to use the new list representation.
[vyos.config] T1764: support both string and list arguments in config functions.
T1759: bug fixes, missing interface IP
[vyos.config] T1758: use vyos.configtree for reading values, instead of calling cli-shell-api.
[HTTP API] Add endpoints for config file and image management.
ddclient: T1030: add cloudflare zone config entry
[service https] T1443: organize internal data by server block
[vyos.config] T1758: check that config setup has completed before calling showConfig, else, default to config.boot
[HTTP API] Use a decorator for functions that require authentication.
ddclient: T1030: adjust to latest syntax
ddclient: T1030: auto create runtime directories
ddclient: T1030: use new default configuration file path
T1759: Migrating interfaces
T1755: fixes issue with 'show vpn ipsec sa' command where lack of keysize (encr-keysize) will result in KeyError - such as for CHACHA20_POLY1305
T1755: fixes issue with 'show vpn ipsec sa' command where lack of hash (integ-alg) will result in KeyError - such as with GCM based options
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r-- | python/vyos/configdict.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index 983906923..e8e52b33d 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -106,7 +106,7 @@ def vlan_to_dict(conf): Function call's itself recursively if a vif-s/vif-c pair is detected. """ vlan = { - 'id': conf.get_level().split()[-1], # get the '100' in 'interfaces bonding bond0 vif-s 100' + 'id': conf.get_level()[-1], # get the '100' in 'interfaces bonding bond0 vif-s 100' 'address': [], 'address_remove': [], 'description': '', @@ -192,7 +192,7 @@ def vlan_to_dict(conf): # ethertype is mandatory on vif-s nodes and only exists here! # check if this is a vif-s node at all: - if conf.get_level().split()[-2] == 'vif-s': + if conf.get_level()[-2] == 'vif-s': vlan['vif_c'] = [] vlan['vif_c_remove'] = [] @@ -215,7 +215,7 @@ def vlan_to_dict(conf): # add new key (vif-c) to dictionary for vif in conf.list_nodes('vif-c'): # set config level to vif interface - conf.set_level(cfg_level + ' vif-c ' + vif) + conf.set_level(cfg_level + ['vif-c', vif]) vlan['vif_c'].append(vlan_to_dict(conf)) return vlan |