Page MenuHomeVyOS Platform

vyos.vyos: get_os_version crashes with KeyError when 'show version' cannot be parsed
Open, NormalPublic

Description

The vyos cliconf plugin only sets network_os_major_version when show version matches VyOS <major>.<minor>, and raises KeyError when there is no Version: line at all. get_os_version() (used by ~22 resource modules to choose 1.3/1.4+ syntax) then fails with an unhelpful KeyError: 'network_os_major_version' (custom image names, unexpected output).

Make parsing tolerant and fail with a clear message that includes the reported version. Add cliconf unit tests for 1.3.x, 1.4.x, 1.5-rolling, date-based rolling (2025.11.20-0019-rolling) and an unparseable string.

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)