alsigna / netbox-software-manager

NetBox Plugin to deal with Cisco IOS & XE software
MIT License
47 stars 8 forks source link

Allow for custom file extensions #13

Open ryanmerolle opened 1 year ago

ryanmerolle commented 1 year ago

Given the shift to multi-vendor support, in the plugin config, you should be able to provide a list of file extensions.

We could likely create another issue to set a filte extension check for each platform.

For now, we should focus on allowing the list to be edited.

As an example: Arista: ".swi" Cisco: ".bin" Fortinet: ".out" Palo Alto: no extension (might be challenging, but most use the UI) Cumulus: ".bin" Sonic: looks like no file extension Juniper: I cannot remember Opengear: ".flash"

Typing this out, we may want to allow any filename/extension. Thoughts?

alsigna commented 1 year ago

I left only .bin filter as plugin can upload/upgrade only Cisco IOS boxes. Someone can try to upload/upgrade device with wrong type of image in case of filter will be less strict. Also I do not have infrastructure to test upload/upgrade for other kind of vendors.

Probably, SoftwareImage model can have reference to Manufacturer model... will think about it. But (imho) just extending image filter can be dangerous.

ryanmerolle commented 1 year ago

Yep I agree. I think the gaurs tail you put in place for upgrades by not allowing non bin files to be uploaded should just move to the upgrade process that would check platform is logic. I'm happy to help and think about this also.