NRI: include in API Info response

Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
Rob Murray
2025-12-01 14:52:00 +00:00
parent f6b1488468
commit 7c7a626e5d
8 changed files with 96 additions and 0 deletions

View File

@@ -13,6 +13,11 @@ keywords: "API, Docker, rcli, REST, documentation"
will be rejected.
-->
## v1.53 API changes
* `GET /info` now includes an `NRI` field. If the Node Resource Interface (NRI)
is enabled, this field contains information describing it.
## v1.52 API changes
* `GET /images/{name}/get` now accepts multiple `platform` query-arguments

View File

@@ -2943,6 +2943,31 @@ definitions:
The unique identifier for the device within its source driver.
For CDI devices, this would be an FQDN like "vendor.com/gpu=0".
NRIInfo:
description: |
Information about the Node Resource Interface (NRI).
This field is only present if NRI is enabled.
type: "object"
x-nullable: true
properties:
Info:
description: |
Information about NRI, provided as "label" / "value" pairs.
<p><br /></p>
> **Note**: The information returned in this field, including the
> formatting of values and labels, should not be considered stable,
> and may change without notice.
type: "array"
items:
type: "array"
items:
type: "string"
example:
- ["plugin-path", "/opt/docker/nri/plugins"]
ErrorDetail:
type: "object"
properties:
@@ -6980,6 +7005,8 @@ definitions:
type: "array"
items:
$ref: "#/definitions/DeviceInfo"
NRI:
$ref: "#/definitions/NRIInfo"
Warnings:
description: |
List of warnings / informational messages about missing features, or

View File

@@ -2946,6 +2946,31 @@ definitions:
The unique identifier for the device within its source driver.
For CDI devices, this would be an FQDN like "vendor.com/gpu=0".
NRIInfo:
description: |
Information about the Node Resource Interface (NRI).
This field is only present if NRI is enabled.
type: "object"
x-nullable: true
properties:
Info:
description: |
Information about NRI, provided as "label" / "value" pairs.
<p><br /></p>
> **Note**: The information returned in this field, including the
> formatting of values and labels, should not be considered stable,
> and may change without notice.
type: "array"
items:
type: "array"
items:
type: "string"
example:
- ["plugin-path", "/opt/docker/nri/plugins"]
ErrorDetail:
type: "object"
properties:
@@ -6983,6 +7008,8 @@ definitions:
type: "array"
items:
$ref: "#/definitions/DeviceInfo"
NRI:
$ref: "#/definitions/NRIInfo"
Warnings:
description: |
List of warnings / informational messages about missing features, or

View File

@@ -74,6 +74,7 @@ type Info struct {
FirewallBackend *FirewallInfo `json:"FirewallBackend,omitempty"`
CDISpecDirs []string
DiscoveredDevices []DeviceInfo `json:",omitempty"`
NRI *NRIInfo `json:",omitempty"`
Containerd *ContainerdInfo `json:",omitempty"`
@@ -163,3 +164,8 @@ type DeviceInfo struct {
// Example: CDI FQDN like "vendor.com/gpu=0", or other driver-specific device ID
ID string `json:"ID"`
}
// NRIInfo describes the NRI configuration.
type NRIInfo struct {
Info [][2]string `json:"Info,omitempty"`
}