@@ -26,7 +26,7 @@ import (
26
26
27
27
oci "github.com/opencontainers/runtime-spec/specs-go"
28
28
ocigen "github.com/opencontainers/runtime-tools/generate"
29
- "tags.cncf.io/container-device-interface/specs-go"
29
+ cdi "tags.cncf.io/container-device-interface/specs-go"
30
30
)
31
31
32
32
const (
64
64
// to all OCI Specs where at least one devices from the CDI Spec
65
65
// is injected.
66
66
type ContainerEdits struct {
67
- * specs .ContainerEdits
67
+ * cdi .ContainerEdits
68
68
}
69
69
70
70
// Apply edits to the given OCI Spec. Updates the OCI Spec in place.
@@ -205,7 +205,7 @@ func (e *ContainerEdits) Append(o *ContainerEdits) *ContainerEdits {
205
205
e = & ContainerEdits {}
206
206
}
207
207
if e .ContainerEdits == nil {
208
- e .ContainerEdits = & specs .ContainerEdits {}
208
+ e .ContainerEdits = & cdi .ContainerEdits {}
209
209
}
210
210
211
211
e .Env = append (e .Env , o .Env ... )
@@ -259,7 +259,7 @@ func ValidateEnv(env []string) error {
259
259
260
260
// DeviceNode is a CDI Spec DeviceNode wrapper, used for validating DeviceNodes.
261
261
type DeviceNode struct {
262
- * specs .DeviceNode
262
+ * cdi .DeviceNode
263
263
}
264
264
265
265
// Validate a CDI Spec DeviceNode.
@@ -289,7 +289,7 @@ func (d *DeviceNode) Validate() error {
289
289
290
290
// Hook is a CDI Spec Hook wrapper, used for validating hooks.
291
291
type Hook struct {
292
- * specs .Hook
292
+ * cdi .Hook
293
293
}
294
294
295
295
// Validate a hook.
@@ -308,7 +308,7 @@ func (h *Hook) Validate() error {
308
308
309
309
// Mount is a CDI Mount wrapper, used for validating mounts.
310
310
type Mount struct {
311
- * specs .Mount
311
+ * cdi .Mount
312
312
}
313
313
314
314
// Validate a mount.
@@ -325,13 +325,13 @@ func (m *Mount) Validate() error {
325
325
// IntelRdt is a CDI IntelRdt wrapper.
326
326
// This is used for validation and conversion to OCI specifications.
327
327
type IntelRdt struct {
328
- * specs .IntelRdt
328
+ * cdi .IntelRdt
329
329
}
330
330
331
331
// ValidateIntelRdt validates the IntelRdt configuration.
332
332
//
333
333
// Deprecated: ValidateIntelRdt is deprecated use IntelRdt.Validate() instead.
334
- func ValidateIntelRdt (i * specs .IntelRdt ) error {
334
+ func ValidateIntelRdt (i * cdi .IntelRdt ) error {
335
335
return (& IntelRdt {i }).Validate ()
336
336
}
337
337
0 commit comments