Skip to content

fixing indentation on ibgp spine and leaf templates#759

Merged
mikewiebe merged 9 commits into
netascode:developfrom
juarocha:fix_ibgp_peer_template
Jul 7, 2026
Merged

fixing indentation on ibgp spine and leaf templates#759
mikewiebe merged 9 commits into
netascode:developfrom
juarocha:fix_ibgp_peer_template

Conversation

@juarocha

@juarocha juarocha commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Related Issue(s)

Fixes #758

Related Collection Role

  • cisco.nac_dc_vxlan.validate
  • cisco.nac_dc_vxlan.dtc.create
  • cisco.nac_dc_vxlan.dtc.deploy
  • cisco.nac_dc_vxlan.dtc.remove
  • other

Related Data Model Element

  • vxlan.fabric
  • vxlan.global
  • vxlan.topology
  • vxlan.underlay
  • vxlan.overlay
  • vxlan.overlay_extensions
  • vxlan.policy
  • vxlan.multisite
  • defaults.vxlan
  • other

Proposed Changes

Fixing indentation on template, per error descripton:

iBGP peer template: bgp peer template command must have 2 leading spaces. Please fix spacing problem: template peer LEAVES. iBGP peer template: bgp peer template sub-command must have 4 or 6 leading spaces

Test Notes

Cisco Nexus Dashboard Version

4.1.1g

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

@juarocha
juarocha marked this pull request as ready for review March 25, 2026 21:51
@juarocha
juarocha requested a review from a team as a code owner March 25, 2026 21:51
@juarocha
juarocha requested review from ccoueffe and dacasti2mx March 25, 2026 21:51
@juarocha juarocha added ready for review PR Ready for Review bug Something isn't working wip work-in-progress and removed ready for review PR Ready for Review labels Mar 25, 2026
@juarocha

Copy link
Copy Markdown
Contributor Author

@mtarking, @mikewiebe, @ccoueffe I did some additional testing:

The string we grab from the data model needs to have 3 tabs (6 spaces) of indentation to be properly rendered. 2 initial spaces required by the base collection + to indicate that the string is a multi-line string + 2 required by ND (this templates are used under BGP config).

By default on the jinja2 filter indent(), the first line and blank lines are not indented (false is the default on the second parameter).

That's why we need the 6 spaces at the beginning of the line. An alternative will be to remove those spaces and set the flag as true, something like:

  IBGP2_PEER_TEMPLATE_LEAF: |2
{{ vxlan.global.ibgp.leaf_ibgp_peer_template_freeform2 | default("") | indent(6, true) }}

@mtarking mtarking added the 0.8.0 Release 0.8.0 label May 6, 2026
@juarocha
juarocha requested a review from mtarking May 6, 2026 23:56
@juarocha juarocha removed the wip work-in-progress label May 7, 2026
@juarocha
juarocha requested a review from ccoueffe June 17, 2026 17:12
@juburnet juburnet added 0.8.1 Release 0.8.1 and removed 0.8.0 Release 0.8.0 labels Jun 22, 2026
@juburnet

Copy link
Copy Markdown
Collaborator

@ccoueffe if you can re-review

@ccoueffe ccoueffe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@mikewiebe
mikewiebe merged commit 418fa44 into netascode:develop Jul 7, 2026
23 checks passed
@juarocha
juarocha deleted the fix_ibgp_peer_template branch July 7, 2026 16:53
@juburnet juburnet mentioned this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.8.1 Release 0.8.1 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leaf and Spine iBGP freeforms fail

5 participants