Skip to content

Commit

Permalink
Merge pull request #115 from iolinkcommunity/feature/device-fw-update
Browse files Browse the repository at this point in the history
Feature/device fw update
  • Loading branch information
roesekoSICKAG authored Nov 20, 2023
2 parents 9e2a3f7 + 681d8ce commit 124743e
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions JSON_for_IO-Link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2884,6 +2884,55 @@ paths:
"500":
$ref: "#/components/responses/HTTP_500"

"/devices/{deviceAlias}/fwupdate":
get:
operationId: GetDevicesDeviceAliasFirmwareUpdateStatus
tags:
- devices
description: Gives the stage and progress of a running firmware update. The active property shows if an update is currently in progress.
summary: Gives the stage and progress of a running firmware update. The active property shows if an update is currently in progress.
responses:
"200":
description: >-
Gives the stage and progress of a running firmware update. The active property shows if an update is currently in progress.
content:
application/json:
schema:
$ref: "#/components/schemas/deviceFirmwareUpdateStatusGet"
"400": # code 305, 306
$ref: "#/components/responses/HTTP_400"
"403":
$ref: "#/components/responses/HTTP_403"
"404":
$ref: "#/components/responses/HTTP_404"
"500":
$ref: "#/components/responses/HTTP_500"
post:
operationId: PostDevicesDeviceAliasFirmwareUpdate
tags:
- devices
summary: Perform a firmware update for a specific Device with an iolfw-file according to specification IOL-Profile_Firmware-Update_V11_10082_Sep19.
description: Perform a firmware update for a specific Device with an iolfw-file according to specification IOL-Profile_Firmware-Update_V11_10082_Sep19.
responses:
"204":
description: >-
Successful operation. Device firmware has been updated.
"400": # code 107
$ref: "#/components/responses/HTTP_400"
"403":
$ref: "#/components/responses/HTTP_403"
"404":
$ref: "#/components/responses/HTTP_404"
"500":
$ref: "#/components/responses/HTTP_500"
requestBody:
required: true
description: The firmware update file in iolfw format. The file must be provided as a multipart/form-data request including the `filename` as header parameter (see RFC7578).
content:
multipart/form-data:
schema:
$ref: "#/components/schemas/deviceFirmwareUpdatePost"

components:
schemas:
artifact:
Expand Down Expand Up @@ -3357,6 +3406,52 @@ components:
$ref: "#/components/schemas/deviceParameterValueGetPost"
iolinkError:
$ref: "#/components/schemas/iolinkErrorObject"
deviceFirmwareUpdatePost:
type: object
properties:
password:
type: string
description: password for updating the device if required
iolfwfile:
type: string
format: binary
description: IOLFW File for the device
required:
- iolfwfile
deviceFirmwareUpdateStatusGet:
type: object
properties:
active:
type: boolean
description: >-
Indicates if a firmware update is currently in progress.
stage:
type: string
description: >-
Indicates the current stage of the firmware update.
enum:
- PREPARATION
- DOWNLOAD
- VALIDATION
- UPDATE
- FINISHED
message:
type: string
description: >-
Status message according to BLOB Transfer & Firmware Update Specification Version 1.1 September 2019 (Table 19 – Error displays of FW-Update tools).
example: Selected file is not a firmware update file
action:
type: string
description: >-
Indicates the action to be taken by the user according to BLOB Transfer & Firmware Update Specification Version 1.1 September 2019 (Table 19 – Error displays of FW-Update tools).
example: Look for a file with extension .iolfw
progress:
type: number
description: >-
Indicates the progress of the firmware update in percent.
minimum: 0
maximum: 100

deviceEventsGet:
type: array
items:
Expand Down Expand Up @@ -5219,6 +5314,11 @@ components:
value:
code: 104
message: Action locked by another client
"107":
description: Error during device firmware update
value:
code: 107
message: Read /devices/{deviceAlias}/fwupdate to get more information about the status.
"201":
description: Error while parsing the incoming JSON object
value:
Expand Down Expand Up @@ -5417,6 +5517,7 @@ components:
value:
code: 106
message: MQTT feature not supported

HTTP_503:

Check warning on line 5521 in JSON_for_IO-Link.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

oas3-unused-component

Potentially unused component has been detected.
description: Service unavailable
content:
Expand Down Expand Up @@ -5529,3 +5630,4 @@ components:
"2477": false
"2478": false


0 comments on commit 124743e

Please sign in to comment.