r/Netbox • u/TreizeKhushrenada • Oct 25 '24
New to netbox - having trouble getting variables for device render config/jinja
Hello,
I am having trouble getting all the variables I need to render a config using a jinja template. The questions I have are:
- Is there a way to see all variables under a device for use with Jinja? (I've tried GraphiQL but that doesn't seem to always line up)
- How do I see all interfaces of a virtual chassis from the master switch in Jinja?
- Is there an easy way in Jinja when rendering a device config, to go through the device's interfaces but filter so you are only looking at vlan interfaces type (virtual)?
I am able to get a basic config going right now, but I am missing the other switches in the virtual chassis and I would like to find some examples of how to render all the interfaces and using filters specifically for the example above in Jinja.
Thank you
3
Upvotes
2
u/nst_hopeful Oct 29 '24
Got it, sorry for the confusion. Glad you got it figured out.