I'd just like to outline the task I'm doing at the moment, and some limitations it has revealed in the UI - then perhaps we can come up with some ideas for improving this.
What I've done so far is:
1. Import all IP addresses. This was pretty straightforward.
2. I'm in the process of importing devices. This is also pretty straightforward, although I'm unable to import Comments/Status (#853) or custom fields (#568)
3. Where it becomes very cumbersome is in linking devices to IP addresses via interfaces.
Here's an example. I've imported a device "ix-asa1" which is a firewall. It has multiple physical interfaces:
GigabitEthernet1/1
GigabitEthernet1/2
GigabitEthernet1/3
But most of the IP addresses are associated with virtual (vlan) subinterfaces:
GigabitEthernet1/3.112
GigabitEthernet1/3.254
GigabitEthernet1/3.255
... etc
(Note: I hadn't pre-created any interfaces on the device type template - but even if I had, all these virtual interfaces would need creating anyway)
There are two ways I could tried to add these relationships in the GUI, but neither works.
(1) I go to the Device, and I click add Interface, and then I try to associate the interface with an IP address. But this attempts to create a duplicate IP address, rather than linking to the already-created one. (#786)
(2) I go to the IP Address, and try to associate it it with a Device and Interface. But this only allows me to associate it with an interface which already exists on a device; there is no option to create a new interface here.
So the workflow has to go in two phases:
- Firstly, work out all the interfaces and IP addresses I want to add. Navigate to the device, and add the interfaces. (Can add multiple interfaces in bulk via the Django admin page)
- Secondly, navigate to each IP Address in turn. Attach each one to the correct device and interface.
This process is very tedious.
Looking through the Netbox GUI, what Netbox wants me to have done is to import the devices first, *then* import the IP Addresses; the import of IP Addresses would also create interfaces for me. Unfortunately I didn't do it in that order. That's an argument that I should throw away my existing work and start again :-(
So although I'm going to go ahead with this now, I wonder what a better process might be. Here are a few ideas:
* When you navigate to Device, and create an Interface, have an option to attach it to an existing IP address (already requested as #786)
* Conversely: when you navigate to IP Address, and request to attach it to a Device/Interface, have an option to create a *new* interface instead of using an existing interface (no ticket yet, but I will do if this is considered a good idea)
* Have some way to bulk-import interfaces linked to Device and IP Address. This would be a table of Device,Interface Name,VRF,IP Address (+ other fields). The existing bulk import of 'IP Address' would work here, if it were able to attach to an existing IP Address object rather than always create new ones.
The rule would probably be: if the IP address already exists, then update its attributes. Also attach it to the given Device/Interface. If there is no such interface, then create that interface.
* Maybe the relationship between device<->interface<->IP address would be better represented via something like JSON rather than CSV?
Anyway, interested to hear what people think.
Cheers, Brian Candler.