mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Add support for CDI device configuration
- Persist CDIDevices in container config - Add e2e test - Log HasDevice error and add additional condition for safety Signed-off-by: Sebastian Jug <seb@stianj.ug>
This commit is contained in:
@ -293,6 +293,17 @@ func WithHooksDir(hooksDirs ...string) RuntimeOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithCDI sets the devices to check for for CDI configuration.
|
||||
func WithCDI(devices []string) CtrCreateOption {
|
||||
return func(ctr *Container) error {
|
||||
if ctr.valid {
|
||||
return define.ErrCtrFinalized
|
||||
}
|
||||
ctr.config.CDIDevices = devices
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithDefaultMountsFile sets the file to look at for default mounts (mainly
|
||||
// secrets).
|
||||
// Note we are not saving this in the database as it is for testing purposes
|
||||
|
Reference in New Issue
Block a user