diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-14 15:17:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-14 15:17:21 +0100 |
commit | 7ab99227e63bfec734bf2372e80ef5a93dc2ef54 (patch) | |
tree | 4d5cc90840d8a13717891aecadf170533830d117 /vendor/github.com/container-orchestrated-devices/container-device-interface/specs-go/config.go | |
parent | 9686216f9d44e1d6b4fa60a5c0866746d1afa60b (diff) | |
parent | 72ab66d88622eadcf7c603aa5e6c0751d72214dc (diff) | |
download | podman-7ab99227e63bfec734bf2372e80ef5a93dc2ef54.tar.gz podman-7ab99227e63bfec734bf2372e80ef5a93dc2ef54.tar.bz2 podman-7ab99227e63bfec734bf2372e80ef5a93dc2ef54.zip |
Merge pull request #12825 from elezar/update-cdi
Update use of CDI API
Diffstat (limited to 'vendor/github.com/container-orchestrated-devices/container-device-interface/specs-go/config.go')
-rw-r--r-- | vendor/github.com/container-orchestrated-devices/container-device-interface/specs-go/config.go | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/vendor/github.com/container-orchestrated-devices/container-device-interface/specs-go/config.go b/vendor/github.com/container-orchestrated-devices/container-device-interface/specs-go/config.go index 0223bb703..20914e5b6 100644 --- a/vendor/github.com/container-orchestrated-devices/container-device-interface/specs-go/config.go +++ b/vendor/github.com/container-orchestrated-devices/container-device-interface/specs-go/config.go @@ -1,20 +1,20 @@ package specs +import "os" + // Spec is the base configuration for CDI type Spec struct { Version string `json:"cdiVersion"` Kind string `json:"kind"` - KindShort []string `json:"kindShort,omitempty"` ContainerRuntime []string `json:"containerRuntime,omitempty"` - Devices []Devices `json:"devices"` + Devices []Device `json:"devices"` ContainerEdits ContainerEdits `json:"containerEdits,omitempty"` } -// Devices is a "Device" a container runtime can add to a container -type Devices 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"` } @@ -28,9 +28,14 @@ type ContainerEdits struct { // DeviceNode represents a device node that needs to be added to the OCI spec. type DeviceNode struct { - HostPath string `json:"hostPath"` - ContainerPath string `json:"containerPath"` - Permissions []string `json:"permissions,omitempty"` + Path string `json:"path"` + Type string `json:"type,omitempty"` + Major int64 `json:"major,omitempty"` + Minor int64 `json:"minor,omitempty"` + FileMode *os.FileMode `json:"fileMode,omitempty"` + Permissions string `json:"permissions,omitempty"` + UID *uint32 `json:"uid,omitempty"` + GID *uint32 `json:"gid,omitempty"` } // Mount represents a mount that needs to be added to the OCI spec. |