update CDI version to v0.5.4

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
This commit is contained in:
Ed Bartosh
2023-02-22 16:34:43 +02:00
parent 8cb00f45c9
commit 30e4a14092
19 changed files with 738 additions and 172 deletions

View File

@@ -17,9 +17,10 @@
package cdi
import (
"fmt"
cdi "github.com/container-orchestrated-devices/container-device-interface/specs-go"
oci "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
// Device represents a CDI device of a Spec.
@@ -69,10 +70,10 @@ func (d *Device) validate() error {
}
edits := d.edits()
if edits.isEmpty() {
return errors.Errorf("invalid device, empty device edits")
return fmt.Errorf("invalid device, empty device edits")
}
if err := edits.Validate(); err != nil {
return errors.Wrapf(err, "invalid device %q", d.Name)
return fmt.Errorf("invalid device %q: %w", d.Name, err)
}
return nil
}