Best option for extending Netbox Web Features?

515 views
Skip to first unread message

Douglas Heriot

unread,
Apr 7, 2019, 4:14:14 AM4/7/19
to NetBox
We've got some features we need that haven't been accepted, but we want to build them for our own use anyway.
(For example: importing IPs at the same time as devices https://github.com/digitalocean/netbox/issues/2946 )

However, we want to reduce the workload on maintaining an internal fork. There's a few options I see, and I’m not sure what the best one is. All options would avoid changing anything in the database model so we can swap between official release and internal fork relatively easily if needed.

  • Create a separate Django app within the NetBox project, called "importexport" to contain the advanced import/export options we plan to build. Will avoid needing to modify too many existing files that would create merge conflicts. Just not sure how stable the internal API will be?
  • Create a separate Django project that just talks to the same database – not sure if this is safe, or if there's important logic we'd miss out on by touching the database directly if we're not careful?
  • Create a separate Django project that uses the NetBox HTTP API with pynetbox. How stable is the HTTP API, and if we're doing lots of mass imports/updates will it be too inefficient?

Has anyone else gone down this path, with any recommendations?

Douglas

Daniel Sheppard

unread,
Apr 8, 2019, 10:01:04 AM4/8/19
to NetBox
Why not interact with the API directly and make a command line app instead?

That way, you just choose the CSV and go, no multiple clicks getting the data into the web interface in the first place.

I would not use an app that does direct database writes.  Likewise, I would also not do app within Netbox as I have gone that route and it was a headache maintaining it.

Jason Guy

unread,
Apr 8, 2019, 10:04:02 AM4/8/19
to Douglas Heriot, NetBox
Hi Douglas,

Yes, we have been developing an addon app that extends the functionality of netbox as well. We needed a way to use netbox for user reservation of testing equipment in the lab. I have almost all of the changes in the app, but needed to add a little code to create a dropdown menu. 
- I did not want to have a separate WSGI app that interacted using the webhooks.
- It is never advisable to have 2 different apps talking to the same database.

We are still working through some bugs and custom stuff, though I would like to submit it as a pull request. However I am not sure this fits into the intended use-case, which is a production Data Center paradigm. I may be wrong of course, but regardless, it would be cool to have an easy way to install netbox plugins/add-ons to easily extend the current models and templates. 

Cheers,
Jason

--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/185edb42-a866-4c01-b76b-cc454e12a605%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Lenz

unread,
Aug 26, 2020, 11:59:37 AM8/26/20
to NetBox
Hey Jason,

I am also searching for something like a lab reservation system, to book one or more devices for a period of time.
Are you implementing a  netbox-plugin?
Are you thinking of opensourcing it?

Regards Chris

Reply all
Reply to author
Forward
0 new messages