Accessing other Netbox data within Jinja2 configuration generation templates #12783
Replies: 1 comment
-
So far I have only been able to access other devices if a local device object (where the template is rendered from) is associated to another device somehow, for example it has a connection. I wrote the following Jinja2 Config Template and assigned 2 devices to render: hostname {{ device.name }} Render Config output from "test device": Hostname: test device Render Config output from "test device 2": Hostname: test device 2 PS: I also would like to know how to access objects/devices from other objects that are not associated to any other objects. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone! Is there a way to access Netbox data outside of
device.blah
from within Jinja2 configuration templates? i.e. do things likeI would basically like to be able to do read-only Django commands from within Jinja2 configuration templates. (I think that's the best way to linguistically describe what I want, but I'm not a pro-Pythoneer!)
Beta Was this translation helpful? Give feedback.
All reactions