summaryrefslogtreecommitdiff
path: root/python/vyos/systemversions.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-02-17 09:30:55 -0600
committerGitHub <noreply@github.com>2022-02-17 09:30:55 -0600
commite66879f71da3383a84ebfe6235795e718c32bdb9 (patch)
treeb60ad5df3baa2ee55567e2b00b83389b205062f5 /python/vyos/systemversions.py
parentf076f9f4cf6e6b7d89eada9f5d59bacea0f3af72 (diff)
parent425f8f16caa7e9e5101be3dc8ab32e60db274d7f (diff)
downloadvyos-1x-e66879f71da3383a84ebfe6235795e718c32bdb9.tar.gz
vyos-1x-e66879f71da3383a84ebfe6235795e718c32bdb9.zip
Merge pull request #1225 from jestabro/component-version
T3474: move component version info to XML
Diffstat (limited to 'python/vyos/systemversions.py')
-rw-r--r--python/vyos/systemversions.py7
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()