diff options
author | John Estabrook <jestabro@vyos.io> | 2022-10-28 14:26:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 14:26:03 -0500 |
commit | 562c367e8877086bbc66005f441339b847f243a2 (patch) | |
tree | 61c1c2830239106b76e6c5a3ee09bc43b1e8db43 /src | |
parent | 5f26d80a262dacbff750a22b670a9b8411773174 (diff) | |
parent | 0e63712195465c9bf0bf55c369b86961d54dfaac (diff) | |
download | vyos-1x-562c367e8877086bbc66005f441339b847f243a2.tar.gz vyos-1x-562c367e8877086bbc66005f441339b847f243a2.zip |
Merge pull request #1619 from jestabro/component-version-string
T4291: consolidate component version string read/write functions
Diffstat (limited to 'src')
-rwxr-xr-x | src/helpers/system-versions-foot.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/helpers/system-versions-foot.py b/src/helpers/system-versions-foot.py index 2aa687221..9614f0d28 100755 --- a/src/helpers/system-versions-foot.py +++ b/src/helpers/system-versions-foot.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -# Copyright 2019 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright 2019, 2022 VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -16,24 +16,13 @@ # along with this library. If not, see <http://www.gnu.org/licenses/>. import sys -import vyos.formatversions as formatversions -import vyos.systemversions as systemversions import vyos.defaults -import vyos.version - -sys_versions = systemversions.get_system_component_version() - -component_string = formatversions.format_versions_string(sys_versions) - -os_version_string = vyos.version.get_version() +from vyos.component_version import write_system_footer sys.stdout.write("\n\n") if vyos.defaults.cfg_vintage == 'vyos': - formatversions.write_vyos_versions_foot(None, component_string, - os_version_string) + write_system_footer(None, vintage='vyos') elif vyos.defaults.cfg_vintage == 'vyatta': - formatversions.write_vyatta_versions_foot(None, component_string, - os_version_string) + write_system_footer(None, vintage='vyatta') else: - formatversions.write_vyatta_versions_foot(None, component_string, - os_version_string) + write_system_footer(None, vintage='vyos') |