Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge overall sprint work into main branch #22

Merged
merged 42 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9cc0c99
Update bulk setProperties body
cristian-recoseanu Apr 22, 2024
40fe54e
Add initial Backup & Restore section
cristian-recoseanu Apr 22, 2024
209fc17
Update Backup & restore.md
cristian-recoseanu Apr 22, 2024
ed8621f
Update README.md
cristian-recoseanu Apr 22, 2024
4c466d8
Update Backup & restore.md
cristian-recoseanu Apr 23, 2024
5b3f474
Update backup & restore diagrams
cristian-recoseanu Apr 23, 2024
6b10ba5
Update API requests.md
cristian-recoseanu Apr 23, 2024
c4ce145
Update Backup & restore.md
cristian-recoseanu Apr 23, 2024
9b8afcb
Update Backup & Restore
cristian-recoseanu Apr 30, 2024
bdfc784
Update bulkProperties examples
cristian-recoseanu Apr 30, 2024
98215fa
Update Backup & restore.md
cristian-recoseanu Apr 30, 2024
7993eef
Add documentation for section 3
cristian-recoseanu May 7, 2024
6771bd4
Introduce definitions and simplify structure
cristian-recoseanu May 14, 2024
76787ea
Update docs/Backup & restore.md
cristian-recoseanu May 21, 2024
213d8a4
Update docs/Backup & restore.md
cristian-recoseanu May 21, 2024
8eed69f
Also explain `incompatible revision`
cristian-recoseanu May 21, 2024
c69ba03
Merge branch 'publish-backup-restore-revision' of https://github.com/…
cristian-recoseanu May 21, 2024
ac875c9
Update docs/Backup & restore.md
cristian-recoseanu May 21, 2024
4ecc08a
Add further definitions and clarifications and cross links
cristian-recoseanu May 28, 2024
b4d0c63
Update API requests.md
cristian-recoseanu May 28, 2024
d433da0
Clarify restore terminology
cristian-recoseanu May 28, 2024
a8fddb5
Further clarify the restore terms
cristian-recoseanu May 28, 2024
6870243
Feedback/additions receiving from meeting participants
cristian-recoseanu Jun 4, 2024
8126798
Change "allowPartial" to "allowIncomplete"
cristian-recoseanu Jun 10, 2024
c0eb657
Update restoring-same-dev-different-dev-rev.png
cristian-recoseanu Jun 10, 2024
c320ede
Update bulkProperties-validate-request.json
cristian-recoseanu Jun 10, 2024
5ecc5eb
Update README.md
cristian-recoseanu Jun 10, 2024
11fcb7d
Change OPTIONS to PATCH
cristian-recoseanu Jun 11, 2024
03c6edf
Update diagrams in line with latest control feature sets register
cristian-recoseanu Jul 2, 2024
3bee846
Update validation and restore diagrams to include exception examples
cristian-recoseanu Jul 29, 2024
e4a20a7
Update Backup & restore.md
cristian-recoseanu Jul 29, 2024
7a03282
Fix schemas and diagrams in line with the latest models
cristian-recoseanu Sep 9, 2024
dccaa7c
Delete restoring-same-dev-different-dev-rev.png
cristian-recoseanu Sep 9, 2024
1c22171
Fix examples in line with the latest models
cristian-recoseanu Sep 9, 2024
7c1a2b9
Simplify the document
cristian-recoseanu Sep 9, 2024
5776c45
Update Backup & restore.md
cristian-recoseanu Sep 9, 2024
45c05e9
Model changes as per face to face meeting
cristian-recoseanu Sep 17, 2024
d672de4
Changes as highlighted during meeting on 2024/10/15
cristian-recoseanu Oct 18, 2024
c0546b8
Update Backup & restore.md
cristian-recoseanu Oct 18, 2024
1c6ba0c
Update docs/API requests.md
cristian-recoseanu Oct 22, 2024
421ca63
Merge pull request #11 from AMWA-TV/publish-backup-restore-revision
TheSaneWonko Oct 29, 2024
5e6f0ed
Merge branch 'v1.0-dev' into publish-backup-restore
cristian-recoseanu Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions APIs/schemas/bulkProperties-set-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
},
"recurse": {
"type": "boolean"
},
"restoreMode": {
"type": "integer",
"description": "numeric representation of NcRestoreMode enum options"
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion APIs/schemas/bulkProperties-validate-request.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "OPTIONS request body for invoking ValidateSetPropertiesByPath method on NcBulkPropertiesManager",
"description": "PATCH request body for invoking ValidateSetPropertiesByPath method on NcBulkPropertiesManager",
"title": "Bulk properties Validate request",
"required": [
"arguments"
Expand All @@ -17,6 +17,10 @@
},
"recurse": {
"type": "boolean"
},
"restoreMode": {
"type": "integer",
"description": "numeric representation of NcRestoreMode enum options"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion APIs/schemas/bulkProperties-validate-response.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Returns a NcMethodResultObjectPropertiesSetValidation from a bulkProperties OPTIONS",
"description": "Returns a NcMethodResultObjectPropertiesSetValidation from a bulkProperties PATCH",
"title": "NcMethodResultObjectPropertiesSetValidation"
}
36 changes: 20 additions & 16 deletions docs/API requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Concurrency control is left to specific device implementations, however devices

The URL provided in the [IS-04 device](IS-04%20interactions.md) is used as the base URL for all subsequent requests.

As described in the Configuration API, the [rolePaths](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/ConfigurationAPI.html#rolepaths_get) endpoint returns all the role paths available for the device. Each `rolePath` MUST be created by appending [NcObject roles](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html) starting with the `root block` and using `.` as the delimiter. Consequently the `.` character MUST not be used inside individual object roles.
As described in the Configuration API, the [rolePaths](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/ConfigurationAPI.html#rolepaths_get) endpoint MUST return all the device model's role paths. Each `rolePath` MUST be created by appending [NcObject roles](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html) starting with the `root block` and using `.` as the delimiter. Consequently the `.` character MUST not be used inside individual object roles.

It is RECOMMENDED for Device model objects roles to use `Unreserved Characters` as described in [RFC 3986 - 2.3. Unreserved Characters](https://www.ietf.org/rfc/rfc3986.txt). When `Reserved Characters` are used in an object role, they MUST be URL encoded when included in the `rolePaths` endpoint and subsequently in a URL.
It is RECOMMENDED for device model objects roles to use `Unreserved Characters` as described in [RFC 3986 - 2.3. Unreserved Characters](https://www.ietf.org/rfc/rfc3986.txt). When `Reserved Characters` are used in an object role, they MUST be URL encoded when included in the `rolePaths` endpoint and subsequently in a URL.

Device model object roles are case sensitive and thus any `rolePaths` and URLs which include them are also case sensitive as described in [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-2.7.3).

Expand All @@ -39,7 +39,7 @@ The following subsections define common use cases for the applicable HTTP verbs
| PUT | [Modify a property](#changing-a-property) | baseUrl/rolePaths/{rolePath}/properties/{propertyId}/value | [property-value-put-request](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/schemas/property-value-put-request.json) | [NcMethodResult](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncmethodresult) |
| PUT | [Setting bulk properties for a role path](#setting-bulk-properties-for-a-role-path) | baseUrl/rolePaths/{rolePath}/bulkProperties | [bulkProperties-set-request](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/schemas/bulkProperties-set-request.json) | [NcMethodResultObjectPropertiesSetValidation](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncmethodresultobjectpropertiessetvalidation) |
| PATCH | [Invoke a method](#invoking-a-method) | baseUrl/rolePaths/{rolePath}/methods/{methodId} | [method-patch-request](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/schemas/method-patch-request.json) | [NcMethodResult](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncmethodresult) |
| OPTIONS | [Validating bulk properties for a role path](#validating-bulk-properties-for-a-role-path) | baseUrl/rolePaths/{rolePath}/bulkProperties | [bulkProperties-validate-request](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/schemas/bulkProperties-validate-request.json) | [NcMethodResultObjectPropertiesSetValidation](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncmethodresultobjectpropertiessetvalidation) |
| PATCH | [Validating bulk properties for a role path](#validating-bulk-properties-for-a-role-path) | baseUrl/rolePaths/{rolePath}/bulkProperties | [bulkProperties-validate-request](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/schemas/bulkProperties-validate-request.json) | [NcMethodResultObjectPropertiesSetValidation](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncmethodresultobjectpropertiessetvalidation) |

## GET

Expand Down Expand Up @@ -79,10 +79,16 @@ This is equivalent to invoking the [GetDatatype method](https://specs.amwa.tv/ms
|:--:|
| _**Getting bulk properties**_ |

The URL MUST target a specific role path in the device model. Devices treat this as a request to retrieve all the properties of that role path inside a [bulk values holder](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncbulkvaluesholder) and MUST return a response of type [NcMethodResultBulkValuesHolder](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncmethodresultbulkvaluesholder). If the `recurse` query parameter is set to `true` then the response will include the values of the target role path as well as any nested role paths. Not including the `recurse` query parameter MUST be treated as providing a `recurse` value of `true`. If the request encountered an error then the response result returned MUST inherit from [NcMethodResultError](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncmethodresulterror) and include an errorMessage of type [NcString](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#primitives).
The URL MUST target a specific role path in the device model. This MUST retrieve all the properties of that role path as a [bulk values holder](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncbulkvaluesholder) and MUST return a response of type [NcMethodResultBulkValuesHolder](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncmethodresultbulkvaluesholder). If the `recurse` query parameter is set to `true` then the response MUST include the values of the target role path as well as any nested role paths. Not including the `recurse` query parameter MUST be treated as providing a `recurse` value of `true`. If the request encountered an error then the response result returned MUST inherit from [NcMethodResultError](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncmethodresulterror) and include an `errorMessage` of type [NcString](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#primitives). If devices cannot accept backup requests due to temporary internal constraints (e.g. requires to be in maintenance mode) then they MUST use a status of `NotReady` and supply further details on the reason for this in the `errorMessage`.

This is equivalent to invoking the `GetPropertiesByPath` method on the [Bulk properties manager object](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncbulkpropertiesmanager).

Retrieving properties through the `bulkProperties` endpoint allows a user to perform a `full backup` or a `partial backup`.

A `full backup` is a [backup data set](Backup%20&%20restore.md#definitions) returned by a `GET` operation on the `/bulkProperties` endpoint of the root block with the `recurse` parameter set to true.

A `partial backup` is a [backup data set](Backup%20&%20restore.md#definitions) returned by a `GET` operation on the `/bulkProperties` endpoint of any object of the device model, other than the root block. A partial backup can also be obtained by a `GET` operation on the `/bulkProperties` endpoint of the root block with the `recurse` query parameter set to false; however this will only result in a backup of the root block only.

## PUT

### Changing a property
Expand All @@ -99,8 +105,6 @@ The body of the request MUST include an object which includes the new value of t

This is equivalent to invoking the generic [Set method](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html#generic-getter-and-setter) on the specific object for the required property.

`TODO`: Figure out how we map deprecation statuses for properties and methods.

### Setting bulk properties for a role path

| ![Setting bulk properties](images/set-bulk-properties.png) |
Expand All @@ -110,15 +114,16 @@ This is equivalent to invoking the generic [Set method](https://specs.amwa.tv/ms
The PUT verb MUST be used for setting a bulk properties data set.

The URL MUST target a specific role path.
The body of the request MUST include an object which includes an `arguments` object with `dataSet` and `recurse` sub elements.
The body of the request MUST include an object which includes an `arguments` object with `dataSet`, `recurse` and `restoreMode` sub elements.

```json
{
"arguments": {
"dataSet": {
...
},
"recurse": true
"recurse": true,
"restoreMode": 1
}
}
```
Expand All @@ -127,10 +132,12 @@ If the `recurse` value is `true` then the device will attempt to use the provide

For a full schema of the required body object see the [bulkProperties-set-request](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/schemas/bulkProperties-set-request.json) schema.

The response MUST be of type [NcMethodResultObjectPropertiesSetValidation](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncmethodresultobjectpropertiessetvalidation). If the request encountered an error then the response result returned MUST inherit from [NcMethodResultError](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncmethodresulterror) and include an errorMessage of type [NcString](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#primitives).
The response MUST be of type [NcMethodResultObjectPropertiesSetValidation](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncmethodresultobjectpropertiessetvalidation). If the request encountered an error then the response result returned MUST inherit from [NcMethodResultError](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncmethodresulterror) and include an errorMessage of type [NcString](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#primitives). If devices cannot accept restore requests due to temporary internal constraints then they MUST use a status of `NotReady` and supply further details on the reason for this in the errorMessage.

This is equivalent to invoking the `SetPropertiesByPath` method inside the [Bulk properties manager object](https://specs.amwa.tv/nmos-control-feature-sets/branches/publish-device-configuration/device-configuration/#ncbulkpropertiesmanager).

Setting properties through the `bulkProperties` endpoint allows a user to perform a restore.

## PATCH

### Invoking a method
Expand Down Expand Up @@ -158,28 +165,25 @@ The response MUST be of type [NcMethodResult](https://specs.amwa.tv/ms-05-02/lat

This is equivalent to invoking the specified method.

`TODO`: Figure out how we map deprecation statuses for properties and methods.

## OPTIONS

### Validating bulk properties for a role path

| ![Validating bulk properties](images/validate-bulk-properties.png) |
|:--:|
| _**Validating bulk properties**_ |

The OPTIONS verb MUST be used for validating a bulk properties data set.
The PATCH verb MUST be used for validating a bulk properties data set.

The URL MUST target a specific role path.
The body of the request MUST include an object which includes an `arguments` object with `dataSet` and `recurse` sub elements.
The body of the request MUST include an object which includes an `arguments` object with `dataSet`, `recurse` and `restoreMode` sub elements.

```json
{
"arguments": {
"dataSet": {
...
},
"recurse": true
"recurse": true,
"restoreMode": 1
}
}
```
Expand Down
Loading