netbox-software-manager icon indicating copy to clipboard operation
netbox-software-manager copied to clipboard

Allow for custom file extensions

Open ryanmerolle opened this issue 2 years ago • 2 comments

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?

ryanmerolle avatar Jan 26 '23 16:01 ryanmerolle

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.

alsigna avatar Jan 26 '23 16:01 alsigna

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.

ryanmerolle avatar Jan 26 '23 17:01 ryanmerolle