diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-04 21:50:46 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-04 22:03:10 +0200 |
commit | 952871200ecee584e7ed1bcb37bdaa06111e3a72 (patch) | |
tree | b8f0d609026746a27cee176f2d961e1cf3227fd6 /LICENSE.LGPL | |
parent | 64d58eda4c1ebaa9d346d65d606d2a75694467ee (diff) | |
download | vyos-1x-952871200ecee584e7ed1bcb37bdaa06111e3a72.tar.gz vyos-1x-952871200ecee584e7ed1bcb37bdaa06111e3a72.zip |
Python/configdict: add function vlan_to_dict
A generic function which can parse the VLAN (vif, vif-s, cif-c) nodes in a
config session. A dictionary describing the VLAN is returned.
A good example will be the interface-bonding.py script used to generate bond
interfaces in the system. It is used as follows:
if conf.exists('vif'):
for vif in conf.list_nodes('vif'):
# set config level to vif interface
conf.set_level(cfg_base + ' vif ' + vif)
bond['vif'].append(vlan_to_dict(conf))
Diffstat (limited to 'LICENSE.LGPL')
0 files changed, 0 insertions, 0 deletions