andreas-stuerz / opn-cli

CLI for OPNsense Firewall using API Requests
BSD 2-Clause "Simplified" License
45 stars 8 forks source link

Config backup via new api endpoint (#51) #51

Closed jan-win1993 closed 5 months ago

jan-win1993 commented 6 months ago
jan-win1993 commented 6 months ago

With the release of OPNsense version 24.1 the plugin "os-api-backup" was discontinued and therefore the old API-endpoint for configuration backups can't be used anymore. I've added a new command "configbackup" which uses the newer API-endpoint (which resides in the OPNsense core library) to download the configuration backup. To ensure backwards compatibility I did not modify the old "apibackup" command and added some remarks to the help pages of the "apibackup" and "configbackup" commands. The unit test did run successfully in isolation:

opnsense_cli/tests/commands/core/test_configbackup.py::TestApibackupCommands::test_download PASSED  [100%]                                    

Best regards, Jan.

jan-win1993 commented 5 months ago

If possible a new release would be very nice :) Thanks in advance ! Best regards, Jan.

andreas-stuerz commented 5 months ago

Hi Jan,

the changes will be included in the 2.0 release which is comming soon.

Best regards, Andreas