mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Suport vpci-class-guid in the non-containerd backend
IDType `vpci-class-guid` is a synonym of `class`. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
parent
cb07afa3cc
commit
31e1fec950
2 changed files with 6 additions and 8 deletions
|
@ -53,8 +53,6 @@ func TestWindowsDevices(t *testing.T) {
|
||||||
doc: "process/vpci-class-guid://5B45201D-F2F2-4F3B-85BB-30FF1F953599 mounted",
|
doc: "process/vpci-class-guid://5B45201D-F2F2-4F3B-85BB-30FF1F953599 mounted",
|
||||||
devices: []string{"vpci-class-guid://5B45201D-F2F2-4F3B-85BB-30FF1F953599"},
|
devices: []string{"vpci-class-guid://5B45201D-F2F2-4F3B-85BB-30FF1F953599"},
|
||||||
isolation: containertypes.IsolationProcess,
|
isolation: containertypes.IsolationProcess,
|
||||||
expectedStartFailure: !testEnv.RuntimeIsWindowsContainerd(),
|
|
||||||
expectedStartFailureMessage: "device assignment of type 'vpci-class-guid' is not supported",
|
|
||||||
expectedStdout: "/Windows/System32/HostDriverStore/FileRepository",
|
expectedStdout: "/Windows/System32/HostDriverStore/FileRepository",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -313,8 +313,8 @@ func (c *client) createWindows(id string, spec *specs.Spec, runtimeOptions inter
|
||||||
}
|
}
|
||||||
for _, d := range spec.Windows.Devices {
|
for _, d := range spec.Windows.Devices {
|
||||||
// Per https://github.com/microsoft/hcsshim/blob/v0.9.2/internal/uvm/virtual_device.go#L17-L18,
|
// Per https://github.com/microsoft/hcsshim/blob/v0.9.2/internal/uvm/virtual_device.go#L17-L18,
|
||||||
// this represents an Interface Class GUID.
|
// these represent an Interface Class GUID.
|
||||||
if d.IDType != "class" {
|
if d.IDType != "class" && d.IDType != "vpci-class-guid" {
|
||||||
return errors.Errorf("device assignment of type '%s' is not supported", d.IDType)
|
return errors.Errorf("device assignment of type '%s' is not supported", d.IDType)
|
||||||
}
|
}
|
||||||
configuration.AssignedDevices = append(configuration.AssignedDevices, hcsshim.AssignedDevice{InterfaceClassGUID: d.ID})
|
configuration.AssignedDevices = append(configuration.AssignedDevices, hcsshim.AssignedDevice{InterfaceClassGUID: d.ID})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue