Conversation
Signed-off-by: Armand Craig <acraig@project.margo.org>
…eId-targetName Signed-off-by: Armand Craig <acraig@project.margo.org>
Signed-off-by: Armand Craig <acraig@project.margo.org>
|
|
||
| * MUST be stable for the lifetime of the target relationship. | ||
| * MUST consist only of unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3) in each path segment. | ||
| * MAY contain `/` separators to represent a see-thru [gateway](../../concepts/gateways/gateways.md) hierarchy, in the form `{name}[/{name}[/{name}...]]`. |
There was a problem hiding this comment.
should this be:
| * MAY contain `/` separators to represent a see-thru [gateway](../../concepts/gateways/gateways.md) hierarchy, in the form `{name}[/{name}[/{name}...]]`. | |
| * MAY contain `/` separators to represent a see-thru [gateway](../../concepts/gateways/gateways.md) hierarchy, in the form `{targetName}[/{targetName}[/{targetName}...]]`. |
| |Parameter | Type | Required? | Description| | ||
| |----------|------|-----------|------------| | ||
| | {deviceId} | string | Y | The unique identifier of the device reporting the capabilities. <br/>It must have the following format: "{id}[/{id}[/{id}...]]". The top-level `id` is required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). If reporting capabilties for a child device, the subsequent `id`s are required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). <br/>Using multiple ids in the endpoint does not register multiple devices in a single request, but indicates a hierarchy of devices, with a parent/child relationship. | | ||
| | {targetName} | string | Y | The name of the target whose capabilities are being reported or deleted. See [Target Names](./api-requirements-and-security.md#target-names). <br/>It must have the following format: "{name}[/{name}[/{name}...]]". The top-level `name` is required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). If reporting capabilties for a child device, the subsequent `name`s are required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). <br/>Using multiple names in the endpoint does not register multiple devices in a single request, but indicates a hierarchy of devices, with a parent/child relationship. | |
There was a problem hiding this comment.
Should this be:
| | {targetName} | string | Y | The name of the target whose capabilities are being reported or deleted. See [Target Names](./api-requirements-and-security.md#target-names). <br/>It must have the following format: "{name}[/{name}[/{name}...]]". The top-level `name` is required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). If reporting capabilties for a child device, the subsequent `name`s are required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). <br/>Using multiple names in the endpoint does not register multiple devices in a single request, but indicates a hierarchy of devices, with a parent/child relationship. | | |
| | {targetName} | string | Y | The name of the target whose capabilities are being reported or deleted. See [Target Names](./api-requirements-and-security.md#target-names). <br/>It must have the following format: "{targetName}[/{targetName}[/{targetName}...]]". The top-level `targetName` is required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). If reporting capabilities for a child device, the subsequent `targetName`s are required and must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3). <br/>Using multiple target names in the endpoint does not register multiple devices in a single request, but indicates a hierarchy of devices, with a parent/child relationship. | |
| | Field | Type | Required? | Description | | ||
| |-----------------|-----------------|-----------------|-----------------| | ||
| | id | string | Y | Unique deviceID assigned to the device via the Device Owner. It must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3) plus the path separator (i.e. '/'). In case of a device behind a gateway, the id field takes the form of a path with the id of the parent gateway, the id of the child device, and the ids of any intermediate devices, i.e., "{gatewayId}/[{intermediateDeviceId/.../]{deviceId}". | | ||
| | targetName | string | Y | The name of the target whose capabilities are described. It MUST match the `{targetName}` route parameter. It must include only unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3) plus the path separator (i.e. '/'). In case of a device behind a see-thru gateway, the value takes the form of a path with the name of the parent gateway, the names of any intermediate devices, and the name of the child device, i.e., "{gatewayName}/[{intermediateName}/.../]{childName}". See [Target Names](./api-requirements-and-security.md#target-names). | |
There was a problem hiding this comment.
What should happen if the target names in the route don't match the targetName property?
| # format: "{name}[/{name}[/{name}...]]" | ||
| # Top-level name is required and must include only unreserved characters as specified in RFC3986. | ||
| # Subsequent names are only used when referencing child devices behind a see-thru gateway, and must include only unreserved characters as specified in RFC3986 when present. | ||
| type: string | ||
| pattern: '^[A-Za-z0-9._~-]+(\/[A-Za-z0-9._~-]+)*$' | ||
| DeviceId_with_asterisk: | ||
| # format: "{id}[/{id}[/{id}...]/*]" | ||
| # Top-level id is required and must include only unreserved characters as specified in RFC3986. | ||
| # Subsequent ids are only used when referencing child devices, and must include only unreserved characters as specified in RFC3986 when present. | ||
| TargetName_with_asterisk: | ||
| # format: "{name}[/{name}[/{name}...]/*]" | ||
| # Top-level name is required and must include only unreserved characters as specified in RFC3986. | ||
| # Subsequent names are only used when referencing child devices behind a see-thru gateway, and must include only unreserved characters as specified in RFC3986 when present. | ||
| type: string |
There was a problem hiding this comment.
Should this be:
| # format: "{name}[/{name}[/{name}...]]" | |
| # Top-level name is required and must include only unreserved characters as specified in RFC3986. | |
| # Subsequent names are only used when referencing child devices behind a see-thru gateway, and must include only unreserved characters as specified in RFC3986 when present. | |
| type: string | |
| pattern: '^[A-Za-z0-9._~-]+(\/[A-Za-z0-9._~-]+)*$' | |
| DeviceId_with_asterisk: | |
| # format: "{id}[/{id}[/{id}...]/*]" | |
| # Top-level id is required and must include only unreserved characters as specified in RFC3986. | |
| # Subsequent ids are only used when referencing child devices, and must include only unreserved characters as specified in RFC3986 when present. | |
| TargetName_with_asterisk: | |
| # format: "{name}[/{name}[/{name}...]/*]" | |
| # Top-level name is required and must include only unreserved characters as specified in RFC3986. | |
| # Subsequent names are only used when referencing child devices behind a see-thru gateway, and must include only unreserved characters as specified in RFC3986 when present. | |
| type: string | |
| # format: "{targetName}[/{targetName}[/{targetName}...]]" | |
| # Top-level target name is required and must include only unreserved characters as specified in RFC3986. | |
| # Subsequent target names are only used when referencing child devices behind a see-thru gateway, and must include only unreserved characters as specified in RFC3986 when present. | |
| type: string | |
| pattern: '^[A-Za-z0-9._~-]+(\/[A-Za-z0-9._~-]+)*$' | |
| TargetName_with_asterisk: | |
| # format: "{targetName}[/{targetName}[/{targetName}...]/*]" | |
| # Top-level target name is required and must include only unreserved characters as specified in RFC3986. | |
| # Subsequent target names are only used when referencing child devices behind a see-thru gateway, and must include only unreserved characters as specified in RFC3986 when present. | |
| type: string |
|
Is there a reason we wanted to use |
…hrough with a counterpart :) Signed-off-by: Armand Craig <acraig@project.margo.org>
|
|
||
| * MUST be stable for the lifetime of the target relationship. | ||
| * MUST consist only of unreserved characters as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-2.3) in each name. | ||
| * MUST NOT contain more than one `/` separator. |
There was a problem hiding this comment.
Is this changing the original requirements? Or was this the intention all along?
Was the original intention to allow only two levels: gateway -> child? Or was the intention to allow multiple nested gateways: gateway -> child -> child?
The way the capabilities endpoint was defined in the SUP seemed to indicate that more than two levels were desired:
@julienduquesnay-se - thoughts?
There was a problem hiding this comment.
Good note to highlight, as I'm trying to round out the Ids we use and the rules around them.
Investigating the original SUP, the id parameter is described:
In case of a device behind a gateway, it takes the form of a path with the id of the parent gateway and the id of the child device, i.e., "{device-id}/{device-id}". The top-level {device-id} must be unique for a given {clientId}, and the children {device-id} must be unique for a given parent {device-id
Additionally, all the examples in the SUP are only Parent/Child. No reference of Parent/Child/Child.
IMO, what hops occur from Gateway to Child that the capabiltiies or deployment specs are associated with are not relevant/useful for the WFM.
|
A general comment on this is a concern around us using human provided friendly names in pathing etc. I agree we need these names and should display them to users etc, but I think it is a mistake we will regret down the road. We do not need to optimize for a user entering the friendly name in the path vs. ids for size, character control etc. |
|
Hi @ajcraig Thanks for letting me know about this change.
I have a question regarding the line above from the PR description. If so, it seems the intent of this PR is:
Is my understanding correct? |
Are you proposing to remove the The SUP owner wanted to include it to make it look more RESTful. |
Description
This PR started with a change to the
deviceIdtotargetNamewithin the device capabilities artifact. After making that change in the specification repo, I realized we needed to alter the concept of "Device" within our workload management focused GA1. Changes proposed in this PR align more towards workloads targeting compute surfaces, which could be a variety of form factors from single devices to multi node clusters.Issues Addressed
N/A
Change Type
Please select the relevant options:
Checklist