Replies: 1 comment
-
I was able to make some progress. Here's what helped. docs/features/configuration-rendering.md There are {{ dcim.Site.objects.count() }} sites. This single line above was the part that I was missing and kept running into documents that were related to Ansible. I need to get all the members of a virtual chassis and need to get all the devices with a chassis set. device only accesses the current object to it doesn't work for what I need. Using this, I was able to get closer to what I was trying to accomplish. Also, installing pgAdmin helped too to see the database columns.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been trying to use the native netbox templates to render configurations. I've been able to figure out devices and virtual contexts by guessing but is there any sort of usable documentation on templating?
Right now i'm stuck on virtual chassis. i've found model(VirtualChassis) but how do I use that in a template and filter by using device.virtual_chassis.id? virtual_chassis.all() doesn't work. device.virtualchassis.all() doesn't work. device.virtual_chassis.all() doesn't work. I'm not familiar with django, jinga2 or python.
I'm not following how help(VirtualDeviceContext) in nbshell gets converted into device.vdcs in the template. I know it doesn't get converted but i'm just trying to understand how to use nvshell to figure out what i should use in the template. help(Device) works in the template as device. so why doesn't virtualchassis work? i'm just not following.
Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions