mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-08 17:04:26 +01:00
This PR got merged while it had some issues with some shim processes being left behind after k8s testing. And because those issues were real issues introduced by this PR (not some random failures), now the master branch is broken and new pull requests cannot get the CI passing. That's the reason why this commit revert the changes introduced by this PR so that we can fix the master branch. Fixes #529 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
// Copyright (c) 2018 Huawei Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package api
|
|
|
|
import (
|
|
"github.com/kata-containers/runtime/virtcontainers/device/config"
|
|
)
|
|
|
|
// MockDeviceReceiver is a fake DeviceReceiver API implementation only used for test
|
|
type MockDeviceReceiver struct{}
|
|
|
|
// HotplugAddDevice adds a new device
|
|
func (mockDC *MockDeviceReceiver) HotplugAddDevice(Device, config.DeviceType) error {
|
|
return nil
|
|
}
|
|
|
|
// HotplugRemoveDevice removes a device
|
|
func (mockDC *MockDeviceReceiver) HotplugRemoveDevice(Device, config.DeviceType) error {
|
|
return nil
|
|
}
|
|
|
|
// GetAndSetSandboxBlockIndex is used for get and set virtio-blk indexes
|
|
func (mockDC *MockDeviceReceiver) GetAndSetSandboxBlockIndex() (int, error) {
|
|
return 0, nil
|
|
}
|
|
|
|
// DecrementSandboxBlockIndex decreases virtio-blk index by one
|
|
func (mockDC *MockDeviceReceiver) DecrementSandboxBlockIndex() error {
|
|
return nil
|
|
}
|
|
|
|
// AddVhostUserDevice adds new vhost user device
|
|
func (mockDC *MockDeviceReceiver) AddVhostUserDevice(VhostUserDevice, config.DeviceType) error {
|
|
return nil
|
|
}
|