Use NewContainerEdits utility function for CDI generation

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-12-07 11:09:19 +01:00
parent 3140810c95
commit 41f1b93422

View File

@ -208,7 +208,7 @@ func (m command) generateSpec(root string) (*specs.Spec, error) {
deviceSpecs = append(deviceSpecs, allDevice)
allEdits := cdi.ContainerEdits{}
allEdits := edits.NewContainerEdits()
ipcs, err := NewIPCDiscoverer(m.logger, root)
if err != nil {
@ -316,7 +316,7 @@ func (m command) generateDeviceSpecs(devicelib device.Interface, root string) ([
// createAllDevice creates an 'all' device which combines the edits from the previous devices
func createAllDevice(deviceSpecs []specs.Device) specs.Device {
edits := cdi.ContainerEdits{}
edits := edits.NewContainerEdits()
for _, d := range deviceSpecs {
edit := cdi.ContainerEdits{