diff options
author | John Estabrook <jestabro@vyos.io> | 2022-02-16 15:29:02 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2022-02-16 20:07:57 -0600 |
commit | d9a1f8deceec729371004377692d477f5e554cb1 (patch) | |
tree | 962766bb31fa71498aa27a425f1177e006e48282 /python/vyos | |
parent | 3795fdba8edf8e81298370d6cd8d81a779ae2997 (diff) | |
download | vyos-1x-d9a1f8deceec729371004377692d477f5e554cb1.tar.gz vyos-1x-d9a1f8deceec729371004377692d477f5e554cb1.zip |
xml: T3474: add smoketest to check xml component versions are maintained
Add smoketest to catch updates to a component version in legacy
curver_DATA that is not present in xml syntaxVersion.
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/systemversions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/vyos/systemversions.py b/python/vyos/systemversions.py index 9b3f4f413..f2da76d4f 100644 --- a/python/vyos/systemversions.py +++ b/python/vyos/systemversions.py @@ -17,7 +17,10 @@ import os import re import sys import vyos.defaults +from vyos.xml import component_version +# legacy version, reading from the file names in +# /opt/vyatta/etc/config-migrate/current def get_system_versions(): """ Get component versions from running system; critical failure if @@ -37,3 +40,7 @@ def get_system_versions(): system_versions[pair[0]] = int(pair[1]) return system_versions + +# read from xml cache +def get_system_component_version(): + return component_version() |