realvitya / pyfortinet

Fortinet Python API library
https://realvitya.github.io/pyfortinet/
2 stars 1 forks source link

Feature Request : add a model device without SN but with psk #4

Closed moustic999 closed 2 months ago

moustic999 commented 6 months ago

Fortimanager api support adding model device without SN but with a PSK and a valid Platform_str; We use this a lot to provision our Fortigates; Would be great to have this supported as we never know the SN of the device which will be installed.

viktorkertesz commented 6 months ago

Hi @moustic999, I am not sure I wanna keep ModelDevice and RealDevice nor BaseDevice. Can you try creating Device object? It has the necessary psk and platform_str field and also SN is not mandatory.

I forgot to extend ModelDevicewith all fields and focused on Device. Original idea with ModelDevice was to distinguish mandatory fields like version and mr (minor release). But I am thinking of getting rid of them. Do you have any opinion on that one? Problem with FMG is the error feedback is not very helpful most of the time and I wanted to make developers' life easier not to allow things which would end up with an error like "Invalid data". I found that confusing sometimes.

realvitya commented 2 months ago

Feature added, will be part of next release