Update Lifecycle
This is the heart of raptor: how an assignment becomes an installed update, and how each party’s actions move the state machine.
The happy path
operator server device
──────── ────── ──────
assignedDS ──────────▶ Action(running), target=pending
◀────── poll (sees deploymentBase)
◀────── GET deploymentBase
(streams artifacts) ◀────── download artifacts
◀────── feedback: proceeding
ActionStatus += proceeding
◀────── feedback: closed/success
Action(finished), target=in_sync
◀────── poll (no deploymentBase;
installedBase set)
- Assign.
POST /rest/v1/targets/{id}/assignedDScreates an Action inrunning(orwait_for_confirmationif the confirmation flow is on), and sets the target topending. Any prior active action is cancelled. - Poll. The device polls the DDI root and sees
_links.deploymentBase. - Fetch & download. The device gets
deploymentBase/{actionId}and downloads the listed artifacts (with HTTP Range resume). - Feedback. The device reports
proceeding, then a final result. Each report appends an ActionStatus row. - Complete. On
closed/successthe Action becomesfinished, the target becomesin_sync, andinstalledBasereflects the deployment. Onclosed/failurethe Action becomeserrorand the target becomeserror.
Feedback vocabulary
Device feedback is {"status":{"execution": ..., "result":{"finished": ...}}}.
execution∈proceeding,scheduled,resumed,downloading,downloaded,canceled,rejected,closed.result.finished∈none,success,failure.
Only closed (with success or failure) is terminal; the others are recorded
as history and leave the action active.
Confirmation flow
With the confirmation flow enabled, a new
assignment lands in wait_for_confirmation and the poll offers confirmationBase
instead of deploymentBase. A confirmed feedback moves it to running; the
next poll then follows the happy path above.
Cancellation
operator server device
──────── ────── ──────
DELETE action ────────▶ Action(canceling)
◀────── poll (sees cancelAction)
◀────── GET cancelAction
◀────── cancel feedback: closed
Action(canceled); assigned reverts to installed
A normal cancel sets the action to canceling and offers the device a
cancelAction link; the device confirms and the action becomes canceled. A
forced cancel (?force=true) closes it immediately, without waiting for the
device.
Auto-registration
An unknown controllerId that polls with a valid gateway token (or in anonymous
mode) is created on the spot as registered. If an
auto-assignment filter matches it, the DS is
assigned during that same poll — so a brand-new device can receive a
deploymentBase on its very first request.