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

Error in cEOS Jinja2 template for eAPI with MGMT VRF #1470

Closed
paullavelle opened this issue Jul 14, 2023 · 2 comments
Closed

Error in cEOS Jinja2 template for eAPI with MGMT VRF #1470

paullavelle opened this issue Jul 14, 2023 · 2 comments

Comments

@paullavelle
Copy link

There is an error in the cEOS node Jinja2 template that prevents eAPI from functioning with the MGMT VRF option (https://containerlab.dev/manual/kinds/ceos/#mgmt-vrf).

File:

https://github.com/srl-labs/containerlab/blob/main/nodes/ceos/ceos.cfg

Error:

management api http-commands
   no shutdown
{{ if .Env.CLAB_MGMT_VRF }}      vrf {{ .Env.CLAB_MGMT_VRF }}{{end}}

Fixed version:

management api http-commands
   no shutdown
{% if .Env.CLAB_MGMT_VRF %}
   !
   vrf {{ .Env.CLAB_MGMT_VRF }}
      no shutdown
{% endif %}

This will ensure that the 'no shutdown' command is also applied within the VRF context, which is a requirement for eAPI.

@bjmeuer
Copy link
Contributor

bjmeuer commented Jul 19, 2023

this is not a jinja2 template right? Isn't is a go template and should be like:

management api http-commands
   no shutdown
{{- if .Env.CLAB_MGMT_VRF }}
   !
   vrf {{ .Env.CLAB_MGMT_VRF }}
      no shutdown
{{end}}

@paullavelle
Copy link
Author

You are correct, I misread the template format.

@hellt hellt closed this as completed in 645be53 Jul 26, 2023
hellt added a commit that referenced this issue Jul 26, 2023
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

No branches or pull requests

2 participants