Fix: Use isis.metric in configuration templates - #3812
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The templates consistently switch to isis.metric only, and the repository’s IS-IS transformation code normalizes isis.cost into isis.metric (and removes cost) before template rendering.
Pull request overview
This PR cleans up IS-IS (and SRv6-over-IS-IS) configuration templates to rely solely on the canonical transformed attribute isis.metric, removing the legacy isis.cost fallback logic now that normalization is handled during transformation (per #3811 / #3662).
Changes:
- Removed
metric|default(cost)fallback logic andisis.costguards from multiple IS-IS templates. - Updated ArcOS IS-IS metric template comments and VRF/global parity logic to reference only
l.isis.metric. - Simplified SRv6 SR OS template metric handling to emit only
srv6.isis.metric.
File summaries
| File | Description |
|---|---|
| netsim/ansible/templates/vrf/arcos.j2 | Uses only l.isis.metric for per-interface IS-IS metric in VRF config. |
| netsim/ansible/templates/srv6/sros.j2 | Removes srv6.isis.cost fallback and emits only srv6.isis.metric. |
| netsim/ansible/templates/isis/vyos.j2 | Removes l.isis.cost fallback/guards; emits metric only when l.isis.metric is present. |
| netsim/ansible/templates/isis/sros.openconfig.j2 | Removes l.isis.cost fallback/guards in OpenConfig-rendered IS-IS interface metrics. |
| netsim/ansible/templates/isis/sros.j2 | Removes l.isis.cost fallback/guards for SR OS IS-IS level metrics. |
| netsim/ansible/templates/isis/srlinux.macro.j2 | Removes l.isis.cost fallback/guards in SR Linux IS-IS per-interface level metric emission. |
| netsim/ansible/templates/isis/nxos.j2 | Removes l.isis.cost fallback/guards for NX-OS IS-IS (IPv4/IPv6) metric commands. |
| netsim/ansible/templates/isis/junos.isis.j2 | Removes l.isis.cost fallback/guards for Junos IS-IS level metrics (incl. IPv6-unicast-metric). |
| netsim/ansible/templates/isis/iosxr.j2 | Removes l.isis.cost fallback/guards for IOS XR per-AF interface metric. |
| netsim/ansible/templates/isis/ios.j2 | Removes l.isis.cost fallback/guards for IOS per-interface IS-IS metrics. |
| netsim/ansible/templates/isis/frr.macro.j2 | Removes l.isis.cost fallback/guards for FRR per-interface IS-IS metric. |
| netsim/ansible/templates/isis/eos.macro.j2 | Removes l.isis.cost fallback/guards for EOS per-interface IS-IS metric (incl. IPv6 metric). |
| netsim/ansible/templates/isis/asa.j2 | Removes l.isis.cost fallback/guards for ASA per-interface IS-IS metric. |
| netsim/ansible/templates/isis/arcos.j2 | Uses only l.isis.metric for per-interface IS-IS metric and updates related comment accordingly. |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #3811, we can remove the fallback to isis.cost from the IS-IS configuration templates, resulting in cleaner templates ;)
Closes #3662