Page MenuHomeVyOS Platform

Add python script to get all priorities of service or section from XML
Backport candidate, NormalPublicFEATURE REQUEST

Description

Add python script priority.py to get all priorities of service or section from XML.
Like it does /opt/vyatta/sbin/priority.pl, ideally in the dictionary format.

Details

Difficulty level
Normal (likely a few hours)
Version
1.5
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Viacheslav changed the subtype of this task from "Bug" to "Feature Request".

PR for subtask bug merged:
https://github.com/vyos/vyos1x-config/pull/24
PR for this task will follow the update/rebuild of libvyosconfig.

dmbaturin triaged this task as Normal priority.Mar 21 2024, 2:44 PM

PR:
https://github.com/vyos/vyos-1x/pull/3164

Comparison with legacy priority.pl can be seen with priority.py --legacy-format, below; note that priority of 0 is default for interface-definitions lacking a priority element, as is assigned in legacy commit algorithm.

vyos@vyos:~$ diff out.priority.pl out.priority.py
0a1,11
> 0 protocols/static/arp
> 0 protocols/static/multicast
> 0 protocols/static/neighbor-proxy
> 0 service/config-sync
> 0 service/console-server
> 0 service/event-handler
> 0 service/sla
> 0 system/domain-name
> 0 system/host-name
> 0 system/login/banner
> 0 system/proxy
47c58
< 481 vrf/name/node.tag/protocols/static
---
> 481 vrf/name/protocols/static
59c70
< 611 vrf/name/node.tag/protocols/isis
---
> 611 vrf/name/protocols/isis
62,63c73,74
< 621 vrf/name/node.tag/protocols/ospf
< 621 vrf/name/node.tag/protocols/ospfv3
---
> 621 vrf/name/protocols/ospf
> 621 vrf/name/protocols/ospfv3
75,77c86,91
< 821 vrf/name/node.tag/protocols/bgp
< 822 vrf/name/node.tag/vni
< 900 load-balancing
---
> 820 protocols/eigrp
> 821 vrf/name/protocols/bgp
> 821 vrf/name/protocols/eigrp
> 822 vrf/name/vni
> 900 load-balancing/reverse-proxy
> 900 load-balancing/wan
106,107c120,122
< 1280 service/aws
< 1280 service/monitoring
---
> 1280 service/aws/glb
> 1280 service/monitoring/telegraf
> 1280 service/monitoring/zabbix-agent
jestabro changed the task status from Open to Backport candidate.Mar 22 2024, 12:56 PM
jestabro moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.