device type - predefined interface with device-name placeholer #16940
-
Hi, I would create a device-type with interfaces and ports. perhaps {{ devicename}}.lan - I try this, but it dosn't work. Its used to find quick the right interface in selectboxes ( instead of 1000 lan or eth entries) thanks for any ideas |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I don't know of a way to do this inside of interface templates as you described. However, you could implement a custom script and event rule combination on creation of a device to populate the interface(s). It should be a very simple and small script to accomplish what you're looking for. |
Beta Was this translation helpful? Give feedback.
-
Which Netbox version are you using? It sounds like you are working around a perceived weakness in the GUI. If you describe exactly what you're trying to do that shows you "1000 lan or eth entries" then we may be able to show a better way. In most cases you can select the device first, and then you'll be presented with only the interfaces of that device. In some versions of Netbox you need to click a little icon that looks like a cylinder to do this. |
Beta Was this translation helpful? Give feedback.
Do you mean you are looking at, for example,
/ipam/ip-addresses/516/edit/
and then trying to assign it to an interface?First, click on the little icon to the right
Then select a device from the Device dropdown (filter on site or rack first if necessary to reduce the list of devices):
Then you will see only the interfaces on that device:
Then click on the interface you want in that list, e.g. "g2"
Admittedly this UI is not great, and many people (including me) think it is worse than how it was in older versions of Netbox. But it's serviceable once yo…