vc: hypervisor: remove setSandbox

The hypervisor interface implementation should not know a thing about
sandboxes.

Fixes: #2882

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
Eric Ernst 2021-11-11 17:50:13 -08:00
parent 2227c46c25
commit ce92cadc7d
6 changed files with 0 additions and 16 deletions

View File

@ -1271,6 +1271,3 @@ func (clh *cloudHypervisor) vmInfo() (chclient.VmInfo, error) {
func (clh *cloudHypervisor) IsRateLimiterBuiltin() bool {
return false
}
func (clh *cloudHypervisor) setSandbox(sandbox *Sandbox) {
}

View File

@ -1274,6 +1274,3 @@ func revertBytes(num uint64) uint64 {
}
return 1024*revertBytes(a) + b
}
func (fc *firecracker) setSandbox(sandbox *Sandbox) {
}

View File

@ -945,6 +945,4 @@ type Hypervisor interface {
// check if hypervisor supports built-in rate limiter.
IsRateLimiterBuiltin() bool
setSandbox(sandbox *Sandbox)
}

View File

@ -149,6 +149,3 @@ func (m *mockHypervisor) GenerateSocket(id string) (interface{}, error) {
func (m *mockHypervisor) IsRateLimiterBuiltin() bool {
return false
}
func (m *mockHypervisor) setSandbox(sandbox *Sandbox) {
}

View File

@ -2541,6 +2541,3 @@ func (q *qemu) GenerateSocket(id string) (interface{}, error) {
func (q *qemu) IsRateLimiterBuiltin() bool {
return false
}
func (q *qemu) setSandbox(sandbox *Sandbox) {
}

View File

@ -525,8 +525,6 @@ func newSandbox(ctx context.Context, sandboxConfig SandboxConfig, factory Factor
swapDevices: []*config.BlockDrive{},
}
hypervisor.setSandbox(s)
if s.store, err = persist.GetDriver(); err != nil || s.store == nil {
return nil, fmt.Errorf("failed to get fs persist driver: %v", err)
}