mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/transform"
|
||||
"github.com/container-orchestrated-devices/container-device-interface/pkg/cdi"
|
||||
"github.com/container-orchestrated-devices/container-device-interface/pkg/parser"
|
||||
toml "github.com/pelletier/go-toml"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -238,11 +239,11 @@ func validateOptions(c *cli.Context, opts *options) error {
|
||||
return fmt.Errorf("invalid --toolkit-root option: %v", opts.toolkitRoot)
|
||||
}
|
||||
|
||||
vendor, class := cdi.ParseQualifier(opts.cdiKind)
|
||||
if err := cdi.ValidateVendorName(vendor); err != nil {
|
||||
vendor, class := parser.ParseQualifier(opts.cdiKind)
|
||||
if err := parser.ValidateVendorName(vendor); err != nil {
|
||||
return fmt.Errorf("invalid CDI vendor name: %v", err)
|
||||
}
|
||||
if err := cdi.ValidateClassName(class); err != nil {
|
||||
if err := parser.ValidateClassName(class); err != nil {
|
||||
return fmt.Errorf("invalid CDI class name: %v", err)
|
||||
}
|
||||
opts.cdiVendor = vendor
|
||||
|
||||
Reference in New Issue
Block a user