From a982224a6fd2bd432057cef3fe4c2f3cb9402476 Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Fri, 26 Nov 2021 18:19:58 +0200 Subject: [PATCH 1/2] specs-go, schema: nuke KindShort and NameShort. Remove unused Spec.KindShort and Device.NameShort. Signed-off-by: Krisztian Litkey --- schema/schema.json | 8 -------- specs-go/config.go | 2 -- 2 files changed, 10 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index 8e890fe5..7cfe12cd 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -11,10 +11,6 @@ "description": "The kind of the device usually of the form 'vendor.com/device'", "type": "string" }, - "kindShort": { - "description": "List of shorthand terms which refers to kind. That can be used on the cli, e.g: 'device' instead of 'vendor.com/device'.", - "$ref": "defs.json#/definitions/ArrayOfStrings" - }, "containerRuntime": { "description": "A list of container runtimes this spec applies to", "$ref": "defs.json#/definitions/ArrayOfStrings" @@ -28,10 +24,6 @@ "description": "The name of the device", "type": "string" }, - "nameShort": { - "description": "A list of aliases which refers to the device", - "$ref": "defs.json#/definitions/ArrayOfStrings" - }, "containerEdits": { "$ref": "defs.json#/definitions/containerEdits" } diff --git a/specs-go/config.go b/specs-go/config.go index 96535529..20914e5b 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -6,7 +6,6 @@ import "os" type Spec struct { Version string `json:"cdiVersion"` Kind string `json:"kind"` - KindShort []string `json:"kindShort,omitempty"` ContainerRuntime []string `json:"containerRuntime,omitempty"` Devices []Device `json:"devices"` @@ -16,7 +15,6 @@ type Spec struct { // Device is a "Device" a container runtime can add to a container type Device struct { Name string `json:"name"` - NameShort []string `json:"nameShort"` ContainerEdits ContainerEdits `json:"containerEdits"` } From 0c994bcdecb9dcd3beb2f92041583a2b5ff50896 Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Thu, 9 Dec 2021 18:31:44 +0200 Subject: [PATCH 2/2] SPEC.md: remove {kind,name}Short references. Signed-off-by: Krisztian Litkey --- SPEC.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SPEC.md b/SPEC.md index b4610c75..604513e5 100644 --- a/SPEC.md +++ b/SPEC.md @@ -70,13 +70,11 @@ The key words "must", "must not", "required", "shall", "shall not", "should", "s { "cdiVersion": "0.1.0", "kind": "", - "kindShort": ["", ...], "containerRuntime": [""], (optional) "devices": [ { "name": "", - "nameShort": ["", ""], (optional) // Same as the below containerSpec field. // 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 * `kind` (string, REQUIRED) field specifies a label which uniquely identifies the device vendor. It can be used to disambiguate the vendor that matches a device, e.g: `docker/podman run --device vendor.com/device=foo ...`. - * The `kind` and `kindShort` labels have two segments: a prefix and a name, separated by a slash (/). + * The `kind` label has two segments: a prefix and a name, separated by a slash (/). * 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. * 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 (/). * 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 * `name` (string, REQUIRED), name of the device, can be used to refer to it when requesting a device. * Beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (\_), dots (.), and alphanumerics between. * e.g: `docker/podman run --device foo ...` - * `nameShort` (array of strings, OPTIONAL), alternative names for the device. Can be used to reduce the CLI verbosity * Entries in the array MUST use the same schema as the entry for the `name` field * `containerEdits` (object, OPTIONAL) this field is described in the next section. * This field should only be merged in the OCI spec if the device has been requested by the container runtime user.