Hi,
We have written a lot of third party tools for NAV here at UiT. Installing these every time we made a change was a chore, so I wrote a tool installer to automate this. An typical install script looks like this:
from nav.uit.toolinst import install_tool
install_tool( name='dhcp', title='DHCP', description='Add MAC-address to DHCP-service.')
The installer will discover all relevant files and install them in their proper place.
A full blueprint with a link to the code and examples can be found here:
https://blueprints.launchpad.net/nav/+spec/tool-installer
Is there any interest in such a tool?
- Ole Martin
On Wed, 21 Aug 2013 12:56:15 +0200 Ole Martin Bjørndalen ole.martin.bjorndalen@uit.no wrote:
Hi,
Hi Ole Martin, good to hear from you again, it's been a while!
A full blueprint with a link to the code and examples can be found here:
https://blueprints.launchpad.net/nav/+spec/tool-installer
Is there any interest in such a tool?
Sure, I think such a tool has its place. Anything that would ease people into writing their own add-ons to NAV is nice. Not that I currently know many users besides UiT who do this, but such a tool might help with that.
We would have to do a proper code review before accepting this into NAV, though. I only gave the code a cursory glance just now, and I think your add-ons will be in trouble with NAV 3.15.
The upcoming NAV 3.15 release completely removes NAV's dependency on mod_python (save for an optional module that can be used to have NAV authenticate and authorize any resouce served by Apache, which we will use on our client installations). This means any 3rd party code that still uses mod_python and the old NAV session machinery will not be compatible with NAV 3.15
NAV 3.15 also tosses out Cheetah completely, in favor of Django templates. This means that any Cheetah templates you have that inherit from NAV's base templates will no longer work.
Assuming you ditch the old tech in your own code, the install tool may become a lot simpler. I have some ideas of my own, but I'd rather hear your comments and read your code first.
We've grown quite fond of using Bitbucket for code reviews via pull requests. You should probably fork my NAV mirror repository [1] there for any further (public) work you might want to do on NAV.
[1] https://bitbucket.org/mbrekkevold/nav-mirror
On 22. aug. 2013 16:52, Morten Brekkevold wrote:
Hi Ole Martin, good to hear from you again, it's been a while!
Likewise!
We would have to do a proper code review before accepting this into NAV, though.
Indeed. There are a lot of things I'd like to clean up even before the code review, but I think what I've got is a good start.
NAV 3.15 also tosses out Cheetah completely, in favor of Django templates. This means that any Cheetah templates you have that inherit from NAV's base templates will no longer work.
Happily, since writing the toolinst I have converted all our tools to Django. The only one left was netbscan, but now that it has been included in machinetracker there is no need for this anymore. I've tossed it out.
Assuming you ditch the old tech in your own code, the install tool may become a lot simpler. I have some ideas of my own, but I'd rather hear your comments and read your code first.
I look forward to hearing your ideas. The tool is indeed a lot simpler now, but there is stil a lot of room for improvement.
We've grown quite fond of using Bitbucket for code reviews via pull requests. You should probably fork my NAV mirror repository [1] there for any further (public) work you might want to do on NAV.
Will do!