diff options
author | John Estabrook <jestabro@vyos.io> | 2021-08-13 12:01:04 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2021-08-19 08:12:59 -0500 |
commit | 40f5359d2d34e322272b79f3905d26954311daa6 (patch) | |
tree | 6a1e224258f903757cbbdd9a21453c2d48b5419f /python/vyos/xml/load.py | |
parent | 8114975668ac5d0f59bbc6abdc0df91e4c0d9995 (diff) | |
download | vyos-1x-40f5359d2d34e322272b79f3905d26954311daa6.tar.gz vyos-1x-40f5359d2d34e322272b79f3905d26954311daa6.zip |
xml: T3474: add syntaxVersion processing to python xml lib
Diffstat (limited to 'python/vyos/xml/load.py')
-rw-r--r-- | python/vyos/xml/load.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/vyos/xml/load.py b/python/vyos/xml/load.py index 0578bef80..c3022f3d6 100644 --- a/python/vyos/xml/load.py +++ b/python/vyos/xml/load.py @@ -115,7 +115,12 @@ def _format_nodes(inside, conf, xml): nodetype = 'tagNode' nodename = kw.tagNode elif 'syntaxVersion' in conf.keys(): - conf.pop('syntaxVersion') + sv = conf.pop('syntaxVersion') + if isinstance(sv, list): + for v in sv: + xml[kw.component_version][v['@component']] = v['@version'] + else: + xml[kw.component_version][sv['@component']] = sv['@version'] continue else: _fatal(conf.keys()) |