Export Templates - missing some fields in export #11762
-
I created export template for Exporting cables. This is my jinja:
It returns no values for some fields:
I should return values for Some fields are empty even if the cable is connected properly. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
There is no attribute To explore the available attributes, use nbshell.
Note that recent versions of Netbox allow a single cable to connect to multiple interfaces on multiple devices at each end. But if you don't use this capability, then
|
Beta Was this translation helpful? Give feedback.
-
I really appreciate the help! It was really hard to find everything what I need, but looks it works now. It will be nice if this will be well documented. And the absolute best if import fields correspond with export fields. However this is my export template which is usable for import.
|
Beta Was this translation helpful? Give feedback.
-
Hello all, thanks for your thoughts/code on the cable exporter in the newer versions of netbox. I am not so in with Pyhon/Django/Json/jaml.... How would the code have to be adapted if I have multi terminations for the cables? That doesn't quite make sense to me, and for you guys it's probably just a small consideration. |
Beta Was this translation helpful? Give feedback.
There is no attribute
side_a_device
on the Cable model. And I'm afraid that the CSV import columns can't be used as a guide (nor the CSV export for that matter).To explore the available attributes, use nbshell.
help(Cable)
gives the detailed info, ordir(c)
on an individual cable object, which you can then filter:Note that recent versions of Netbox allow a single …