Repository navigation
Release - v0.9.6 #507
N4S4
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What's Changed
This release adds the DSM system update workflow to the wrapper: the calls the DSM 7
Control Panel makes to check, download, pre-check and install a firmware update.
All new arguments are optional, and every existing call keeps sending exactly the
same request it sent in 0.9.5.
Enhancements
DSM upgrade workflow (
synology_api/core_upgrade.py)CoreUpgrade.upgrade_basic_status(): overall upgrade status (SYNO.Core.Upgradebasic_status, version 1). Returnsallow_upgradeandstatus;statusis"none"when the system is up to date.CoreUpgrade.upgrade_check_upgradeable_drives(upgrade_to): per-drive upgradeeligibility (
check_having_upgradeable_drives, version 1).upgrade_tois aJSON object with integer
baseandnano, for example{"base": 72806, "nano": 0}.Strings or an empty dict are rejected by DSM with error 101.
CoreUpgrade.upgrade_install(upgrade_type="dsm", force=True): starts the install ofan already downloaded update (
SYNO.Core.Upgradestart, version 1). This rebootsthe NAS and the session normally dies before a response arrives.
CoreUpgrade.upgrade_download_start(target="update", need_auto_smallupdate=True):starts the firmware download (
.Server.Downloadstart, version 2). Download only,it installs nothing.
CoreUpgrade.upgrade_download_cancel(): cancels a download in progress(
.Server.Downloadcancel, version 1).Update panel request variants (
synology_api/core_sys_info.py)SysInfo.upgrade_status(feasibility_check=True)sendsSYNO.Core.Upgradestatusat version 1 with the flag the panel uses for its feasibility check.
SysInfo.sys_upgrade_download(need_download_target=True)sends.Server.Downloadprogressat version 2 withneed_download_target.CoreUpgrade.upgrade_precheck_start(lang=None, upgrade_type=None)switches toPreCheckstartversion 2 withlangandtypewhen arguments are given.The last three were already in the wrapper under the same names, so they were extended
with an optional argument instead of duplicated under a new name. Call them with no
arguments and you get the 0.9.5 request unchanged.
Contacts fix and photo endpoint (
synology_api/contacts.py)Contacts.get_contact(contact_ids): fixed. The method used to sendcontact_id, aparameter that the
getmethod ofSYNO.Contacts.Contactdoes not accept, so DSMignored it and answered error 120, whose message "Preserve for other purpose" is a
reserved code and says nothing about the cause. It now sends
idsas a JSON arraystring, takes a single ID or a list of IDs, and returns
data["contact"], a list evenfor one ID. The argument is
contact_idsnow; the old call never returned data, sonothing working depends on the old name.
Contacts.get_photo(contact_ids): new. Reads the separate photo endpoint,contact_idsin anddata["photo"]out, one entry per contact. This closes the gapwhere the contact list exposes a
photofield that always came back empty.One detail if you call these methods directly: on this API the parameter names change
from method to method (
getanddeletetakeids,get_phototakescontact_ids,settakesid), and mixing them up is exactly what produces error 120.Thanks @n1cc00 for the Contacts work (#506).
Documentation
/stargazersendpoint, which now requiresauthentication, and reads the star count from the repository info instead
(contributed by @joeperpetua in fix(docs): drop stargazers endpoint due to GH API update #500).
Heads-up
The read-only calls were exercised against a DSM 7 NAS:
basic_status,progressat version 2 withneed_download_target,check_having_upgradeable_driveswith a real build and
statusat version 1 withfeasibility_check.upgrade_install,upgrade_download_start,upgrade_download_cancelandupgrade_precheck_startatversion 2 are writes and were not exercised, because no DSM update was pending on the
test unit. Treat them as implemented against the panel contract, not as tested end to end.
get_contactandget_photowere exercised on the same NAS, read only, with a single ID,a list of IDs and a numeric string. Every contact on that unit has an empty photo field, so
get_photoreturns the documented structure but the photo content itself (base64 or a URL)has not been verified.
Full Changelog: v0.9.5...v0.9.6
This discussion was created from the release Release - v0.9.6.
All reactions