Skip to content

Commit 37256f4

Browse files
authored
Merge pull request #40 from klihub/cleanups/nuke-short-kind-and-name
specs-go, schema: remove KindShort and NameShort.
2 parents 4b5d530 + 0c994bc commit 37256f4

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

SPEC.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,11 @@ The key words "must", "must not", "required", "shall", "shall not", "should", "s
7070
{
7171
"cdiVersion": "0.1.0",
7272
"kind": "<name>",
73-
"kindShort": ["<short-name>", ...],
7473
"containerRuntime": ["<container-runtime-name>"], (optional)
7574
7675
"devices": [
7776
{
7877
"name": "<name>",
79-
"nameShort": ["<short-name>", "<short-name>"], (optional)
8078
8179
// Same as the below containerSpec field.
8280
// This field should only be applied to the Container's OCI spec
@@ -138,7 +136,7 @@ The key words "must", "must not", "required", "shall", "shall not", "should", "s
138136

139137
* `kind` (string, REQUIRED) field specifies a label which uniquely identifies the device vendor.
140138
It can be used to disambiguate the vendor that matches a device, e.g: `docker/podman run --device vendor.com/device=foo ...`.
141-
* The `kind` and `kindShort` labels have two segments: a prefix and a name, separated by a slash (/).
139+
* The `kind` label has two segments: a prefix and a name, separated by a slash (/).
142140
* The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between.
143141
* The prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/).
144142
* Examples (not an exhaustive list):
@@ -160,7 +158,6 @@ Note: For a CDI file to be valid, at least one entry must be specified in this a
160158
* `name` (string, REQUIRED), name of the device, can be used to refer to it when requesting a device.
161159
* Beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between.
162160
* e.g: `docker/podman run --device foo ...`
163-
* `nameShort` (array of strings, OPTIONAL), alternative names for the device. Can be used to reduce the CLI verbosity
164161
* Entries in the array MUST use the same schema as the entry for the `name` field
165162
* `containerEdits` (object, OPTIONAL) this field is described in the next section.
166163
* This field should only be merged in the OCI spec if the device has been requested by the container runtime user.

schema/schema.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
"description": "The kind of the device usually of the form 'vendor.com/device'",
1212
"type": "string"
1313
},
14-
"kindShort": {
15-
"description": "List of shorthand terms which refers to kind. That can be used on the cli, e.g: 'device' instead of 'vendor.com/device'.",
16-
"$ref": "defs.json#/definitions/ArrayOfStrings"
17-
},
1814
"containerRuntime": {
1915
"description": "A list of container runtimes this spec applies to",
2016
"$ref": "defs.json#/definitions/ArrayOfStrings"
@@ -28,10 +24,6 @@
2824
"description": "The name of the device",
2925
"type": "string"
3026
},
31-
"nameShort": {
32-
"description": "A list of aliases which refers to the device",
33-
"$ref": "defs.json#/definitions/ArrayOfStrings"
34-
},
3527
"containerEdits": {
3628
"$ref": "defs.json#/definitions/containerEdits"
3729
}

specs-go/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import "os"
66
type Spec struct {
77
Version string `json:"cdiVersion"`
88
Kind string `json:"kind"`
9-
KindShort []string `json:"kindShort,omitempty"`
109
ContainerRuntime []string `json:"containerRuntime,omitempty"`
1110

1211
Devices []Device `json:"devices"`
@@ -16,7 +15,6 @@ type Spec struct {
1615
// Device is a "Device" a container runtime can add to a container
1716
type Device struct {
1817
Name string `json:"name"`
19-
NameShort []string `json:"nameShort"`
2018
ContainerEdits ContainerEdits `json:"containerEdits"`
2119
}
2220

0 commit comments

Comments
 (0)