Skip to content

Device ID to Target Name change - Impacts "Device" concepts within the specification - #225

Draft
ajcraig wants to merge 4 commits into
pre-draftfrom
ajc/rename-deviceId-targetName
Draft

ajcraig wants to merge 4 commits into
pre-draftfrom
ajc/rename-deviceId-targetName

Conversation

@ajcraig

@ajcraig ajcraig commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Description

This PR started with a change to the deviceId to targetName within 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:

  • Fix (change that resolves an issue)
  • New enhancement (change that adds specification content)
  • Content edits (change that edits existing content)

Checklist

  • I have read the CONTRIBUTING document.
  • My changes adhere to the established patterns, and best practices.

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}...]]`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be:

Suggested change
* 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. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be:

Suggested change
| {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). |

@phil-abb phil-abb Sep 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should happen if the target names in the route don't match the targetName property?

Comment on lines 568 to 577
# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be:

Suggested change
# 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

@phil-abb

Copy link
Copy Markdown
Contributor

Is there a reason we wanted to use targetName instead of just name?

…hrough with a counterpart :)

Signed-off-by: Armand Craig <acraig@project.margo.org>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants