Skip to content

Fix: Use isis.metric in configuration templates - #3812

Merged
ipspace merged 2 commits into
devfrom
isis-metric-j2
Aug 24, 2026
Merged

Fix: Use isis.metric in configuration templates#3812
ipspace merged 2 commits into
devfrom
isis-metric-j2

Conversation

@ipspace

@ipspace ipspace commented Aug 24, 2026

Copy link
Copy Markdown
Owner

After #3811, we can remove the fallback to isis.cost from the IS-IS configuration templates, resulting in cleaner templates ;)

Closes #3662

After #3811, we can remove the fallback to isis.cost from the IS-IS
configuration templates, resulting in cleaner templates ;)

Closes #3662

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 and isis.cost guards 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.

ipspace added a commit that referenced this pull request Aug 24, 2026
@ipspace
ipspace merged commit 3ed9990 into dev Aug 24, 2026
@ipspace
ipspace deleted the isis-metric-j2 branch August 24, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize IS-IS cost into metric before rendering templates

2 participants