Page MenuHomeVyOS Platform

vyos.vyos: vyos_route_maps drops rule descriptions containing spaces
Open, NormalPublic

Description

vyos.vyos.vyos_route_maps loses rule descriptions that contain spaces.

The parser regex in rm_templates/route_maps.py and route_maps_14.py only accepts a single token (description\s(?P<description>\S+)\s*$), so a running-config line such as set policy route-map RM rule 10 description 'my long desc' is not parsed at all. The setval also renders the value unquoted (description my long desc), producing an invalid command. As a result tasks with a multi-word description are never idempotent.

Fix: accept the rest of the line as the description and quote it in the generated command, as the prefix_lists template already does. Unit tests updated (rendered and parsed, both templates).

Details

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