Skip to content

fixing indentation on ibgp spine and leaf templates#759

Open
juarocha wants to merge 1 commit intonetascode:developfrom
juarocha:fix_ibgp_peer_template
Open

fixing indentation on ibgp spine and leaf templates#759
juarocha wants to merge 1 commit intonetascode:developfrom
juarocha:fix_ibgp_peer_template

Conversation

@juarocha
Copy link
Copy Markdown
Contributor

@juarocha juarocha commented Mar 25, 2026

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) }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working wip work-in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leaf and Spine iBGP freeforms fail

1 participant