hypervisor: saveSandbox is SaveVM

rename

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
This commit is contained in:
Manohar Castelino 2021-09-20 16:15:56 -07:00 committed by Eric Ernst
parent 7308610c41
commit 73b4f27c46
8 changed files with 8 additions and 8 deletions

View File

@ -642,7 +642,7 @@ func (a *Acrn) GetVMConsole(ctx context.Context, id string) (string, string, err
return consoleProtoUnix, consoleURL, nil
}
func (a *Acrn) saveSandbox() error {
func (a *Acrn) SaveVM() error {
a.Logger().Info("Save sandbox")
// Not supported. return success

View File

@ -721,7 +721,7 @@ func (clh *cloudHypervisor) PauseVM(ctx context.Context) error {
return nil
}
func (clh *cloudHypervisor) saveSandbox() error {
func (clh *cloudHypervisor) SaveVM() error {
clh.Logger().WithField("function", "saveSandboxC").Info("Save Sandbox")
return nil
}

View File

@ -889,7 +889,7 @@ func (fc *firecracker) PauseVM(ctx context.Context) error {
return nil
}
func (fc *firecracker) saveSandbox() error {
func (fc *firecracker) SaveVM() error {
return nil
}

View File

@ -903,7 +903,7 @@ type hypervisor interface {
// just perform cleanup.
stopSandbox(ctx context.Context, waitOnly bool) error
PauseVM(ctx context.Context) error
saveSandbox() error
SaveVM() error
resumeSandbox(ctx context.Context) error
AddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) error
HotplugAddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) (interface{}, error)

View File

@ -62,7 +62,7 @@ func (m *mockHypervisor) resumeSandbox(ctx context.Context) error {
return nil
}
func (m *mockHypervisor) saveSandbox() error {
func (m *mockHypervisor) SaveVM() error {
return nil
}

View File

@ -76,7 +76,7 @@ func TestMockHypervisorGetSandboxConsole(t *testing.T) {
func TestMockHypervisorSaveSandbox(t *testing.T) {
var m *mockHypervisor
assert.NoError(t, m.saveSandbox())
assert.NoError(t, m.SaveVM())
}
func TestMockHypervisorDisconnect(t *testing.T) {

View File

@ -2038,7 +2038,7 @@ func (q *qemu) GetVMConsole(ctx context.Context, id string) (string, string, err
return consoleProtoUnix, consoleURL, nil
}
func (q *qemu) saveSandbox() error {
func (q *qemu) SaveVM() error {
q.Logger().Info("Save sandbox")
if err := q.qmpSetup(); err != nil {

View File

@ -221,7 +221,7 @@ func (v *VM) Pause(ctx context.Context) error {
// Save saves a VM to persistent disk.
func (v *VM) Save() error {
v.logger().Info("Save vm")
return v.hypervisor.saveSandbox()
return v.hypervisor.SaveVM()
}
// Resume resumes a paused VM.