13 Commits

Author SHA1 Message Date
e460eb73cb Add API SYNO.Core.SecurityScan.Status (#46) 2020-05-02 15:47:00 +02:00
5f9c2dd96a Add DSM 5 SYNO.DSM.Network test (#45) 2020-05-02 14:56:40 +02:00
a398d3a952 Add API SYNO.DSM.Network (#44) 2020-05-02 11:49:49 +02:00
3fc3ecc6bc Returns unmodified data first, use human_readable=True if needed (#43) 2020-05-02 00:24:07 +02:00
bf6c88912c Fix Storage volume_disk_temp_[X](volume_id) for SHR disks redundancy (#42)
* Fix Storage volume_disk_temp_[X] for SHR disks redundancy

* Fix pylint & black

* Add SHR2 redundancy tests
2020-05-01 13:55:02 +02:00
adba2c3084 Fix : DSM 5 storage "KeyError: 'data'" (#39) 2020-04-29 12:27:44 +02:00
4096d7886b Add DSM 5 tests + fix DSM 5 issues 2020-04-28 22:56:51 +02:00
15697152cc Populated test data from DSM 5.2-5967 Update 9 (#37)
Co-authored-by: aaska <aaska@users.noreply.github.com>

Co-authored-by: Stanislav Toropovskyi <48147949+stast1@users.noreply.github.com>
2020-04-28 13:58:29 +02:00
0622bcf560 Refactor requests (#33)
* API discovery (SYNO.API.Info) + use Exceptions

- remove dsm_version
- use SynologyDSMRequestException for failed requests

* _discover_apis any time

* simplify requests

- Add api.request(api, method, params=None)

* Add connection failed tests

* Finalized ?

* Fix SynologyDSMRequestException not beeing SynologyDSMException

* Fix SynologyDSMAPINotExistsException not beeing SynologyDSMException

* Add Virtual Machine Manager API documentation

* Can get and post request

- Add error handling by API code

* Pylint

* Add get + post tests + SynologyDSMAPIErrorException
2020-04-22 14:00:27 +02:00
e393b1282c Add SYNO.API.Info to test constants + reorganize test consts (#31) 2020-04-14 14:01:58 +02:00
3e28d2049a Add two-step authentication (2SA) login (#29)
+ add login exceptions
+ add Black params
+ add official references creation-update dates
+ add login 2SA tests
+ remove useless "_sid" url prepend
+ remove _execute_get_url append_sid param
+ Require 2SA once, remember granted device ==> skip OTP checking
+ add device_token property to save connected device
2020-04-13 00:26:14 +02:00
a68ef9fe49 Separate DSM 6 test consts + prepare to test DSM 5 (#27) 2020-04-09 21:45:52 +02:00
aa9bba8814 Add tests + some fixes (#23)
* Add tests + some fixes

Fixes:
- [utilization] cpu_total_load returns `None` if one load is 0
- [storage] volume_disk_temp_avg + volume_disk_temp_max were global, not volume related

Add:
- [storage] env
- [storage] storage_pools

Changes:
- api.password is now private
- api.storage_url is now private
- use API_KEY on each of APIs/services

* Fix encoding

* Use future division

* Add test_disk + test_volume to check error handling cases
2020-03-30 23:07:54 +02:00