Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T5446: BGP: change <bgp paramater bestpath med> from node to leafNode #2137

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/templates/frr/bgpd.frr.j2
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ router bgp {{ system_as }} {{ 'vrf ' ~ vrf if vrf is vyos_defined }}
bgp bestpath compare-routerid
{% endif %}
{% if parameters.bestpath.med is vyos_defined %}
bgp bestpath med {{ 'confed' if parameters.bestpath.med.confed is vyos_defined }} {{ 'missing-as-worst' if parameters.bestpath.med.missing_as_worst is vyos_defined }}
bgp bestpath med {{ parameters.bestpath.med | join(' ') | replace('_', '-') }}
{% endif %}
{% if parameters.bestpath.peer_type is vyos_defined %}
bgp bestpath peer-type {{ 'multipath-relax' if parameters.bestpath.peer_type.multipath_relax is vyos_defined }}
Expand Down
33 changes: 17 additions & 16 deletions interface-definitions/include/bgp/protocol-common-config.xml.i
Original file line number Diff line number Diff line change
Expand Up @@ -1123,25 +1123,26 @@
<valueless/>
</properties>
</leafNode>
<node name="med">
<leafNode name="med">
<properties>
<help>MED attribute comparison parameters</help>
<completionHelp>
<list>confed missing-as-worst</list>
</completionHelp>
<valueHelp>
<format>confed</format>
<description>Compare MEDs among confederation paths</description>
</valueHelp>
<valueHelp>
<format>missing-as-worst</format>
<description>Treat missing route as a MED as the least preferred one</description>
</valueHelp>
<constraint>
<regex>(confed|missing-as-worst)</regex>
</constraint>
<multi/>
</properties>
<children>
<leafNode name="confed">
<properties>
<help>Compare MEDs among confederation paths</help>
<valueless/>
</properties>
</leafNode>
<leafNode name="missing-as-worst">
<properties>
<help>Treat missing route as a MED as the least preferred one</help>
<valueless/>
</properties>
</leafNode>
</children>
</node>
</leafNode>
<node name="peer-type">
<properties>
<help>Peer type</help>
Expand Down
Loading