-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable the import of device types from JSON-formatted definitions #451
Comments
Is this users per instance (i.e. if I create a device for a Cisco 3560, my boss won't be able to select it), or NetBox users in general (i.e. if I create a device, there is no "device community" to share it with other companies? If the first point, I haven't noticed yet (haven't tested on more than one user account as of yet), but we'll definitely need that before moving forward., if the second, a user submitted gallery or library would be an awesome resource. |
+1 for the user submitted gallery, I think it would be very popular; |
@fltchr "User" in this context just means an organization using NetBox. Sorry for the confusion. Here's a scenario. You just got in a shipment of Juniper QFX5100-48S switches that need to be racked up. You've never used these before, so first you need to create a new device type in NetBox. But rather than creating one manually, you can instruct NetBox to import a definition from a GitHub repo, e.g. I just need to come up with the logic to process JSON and start a library. |
@jeremystretch There are also modules for devices that need to be taken into consideration. example: And then there is the cabling too: |
@stianvi Expansion modules aren't part of the device, so they aren't attached to a device type. They may or may not be installed; that's up to the user to define. And cabling isn't modelled at all. |
I'm very interested on this feature. Thanks you for to do and to improve NetBox, I think could countribute with the device types submitted gallery. :) |
An export feature for device types might be a good idea too: some of us have already created libraries of devices, sharing them might be useful, given import is implemented. |
This would be extremely useful, including some of the ideas already mentioned such as export. I imagine some type of verification mechanism to verify the accuracy of each device type, but that could probably be controlled via Github workflow. |
This would save so much work. We just setup Netbox and the thought of having to create all these device types gives me a headache. |
@jeremystretch I'm not sure the viability, but, Cisco/Juniper provide Visio stencils for all their hardware. Providing one could process those VSS files (they are hexadecimal) you might be able to "easily" convert all the Visio stencils to JSON based on the data provided within. That said, I'm not sure if the stencils include mgmt or con ports but it might be a place to start: http://www.cisco.com/c/en/us/products/visio-stencil-listing.html If it goes that easily, perhaps also do the linecards so when NAPALM runs inventory it could suggest adding templates for discovered children? I would also recommend that users with existing devices templates be able to "upgrade" their devices to the new templates as a method of standardization - if they so chose. |
@bellwood probably this can be used to convert VSS files to something more open: https://github.com/kakwa/libvisio2svg these VSS pictures might be somewhat useful for drawing rack faces (if you want them to look fancy), but I doubt you can export ports or other sticky points. |
I was hoping more for port details than graphics for JSON library building,
just figured it's a somewhat complete provider library we might be able to
process it
Graphics could/would nice though on the rack elevations via another feature
request
|
@jeremystretch I found this nice library: django-import-export |
Currently, each NetBox user must create their own device types. This results in wasted effort because users inevitably end up duplicating work. For instance, ten users who each use Juniper EX4300-48T switches will end up creating identical (or at least exceeding similar) device types.
We don't want to pre-populate device types in NetBox on initial installation, because it's impossible to predict which device types a user will want. Extraneous device types would result in clutter that needs to be deleted.
Ideally, we could begin compiling a library of device type definitions formatted as JSON. A user could select the desired device types from the library and import them into NetBox to create device types.
The text was updated successfully, but these errors were encountered: