Refactor the engine.Interface such that the Set() API does not return an extraneous error

Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
This commit is contained in:
Christopher Desiniotis
2023-12-01 15:59:34 -08:00
parent ffe7ed313a
commit 83ad09b179
7 changed files with 16 additions and 13 deletions

View File

@@ -308,9 +308,11 @@ func enableCDI(config *config, cfg engine.Interface) error {
}
switch config.runtime {
case "containerd":
return cfg.Set("enable_cdi", true)
cfg.Set("enable_cdi", true)
case "docker":
return cfg.Set("experimental", true)
cfg.Set("experimental", true)
default:
return fmt.Errorf("enabling CDI in %s is not supported", config.runtime)
}
return fmt.Errorf("enabling CDI in %s is not supported", config.runtime)
return nil
}