mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
hypervisor: saveSandbox is SaveVM
rename Signed-off-by: Manohar Castelino <mcastelino@apple.com>
This commit is contained in:
parent
7308610c41
commit
73b4f27c46
@ -642,7 +642,7 @@ func (a *Acrn) GetVMConsole(ctx context.Context, id string) (string, string, err
|
|||||||
return consoleProtoUnix, consoleURL, nil
|
return consoleProtoUnix, consoleURL, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Acrn) saveSandbox() error {
|
func (a *Acrn) SaveVM() error {
|
||||||
a.Logger().Info("Save sandbox")
|
a.Logger().Info("Save sandbox")
|
||||||
|
|
||||||
// Not supported. return success
|
// Not supported. return success
|
||||||
|
@ -721,7 +721,7 @@ func (clh *cloudHypervisor) PauseVM(ctx context.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (clh *cloudHypervisor) saveSandbox() error {
|
func (clh *cloudHypervisor) SaveVM() error {
|
||||||
clh.Logger().WithField("function", "saveSandboxC").Info("Save Sandbox")
|
clh.Logger().WithField("function", "saveSandboxC").Info("Save Sandbox")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -889,7 +889,7 @@ func (fc *firecracker) PauseVM(ctx context.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fc *firecracker) saveSandbox() error {
|
func (fc *firecracker) SaveVM() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -903,7 +903,7 @@ type hypervisor interface {
|
|||||||
// just perform cleanup.
|
// just perform cleanup.
|
||||||
stopSandbox(ctx context.Context, waitOnly bool) error
|
stopSandbox(ctx context.Context, waitOnly bool) error
|
||||||
PauseVM(ctx context.Context) error
|
PauseVM(ctx context.Context) error
|
||||||
saveSandbox() error
|
SaveVM() error
|
||||||
resumeSandbox(ctx context.Context) error
|
resumeSandbox(ctx context.Context) error
|
||||||
AddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) error
|
AddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) error
|
||||||
HotplugAddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) (interface{}, error)
|
HotplugAddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) (interface{}, error)
|
||||||
|
@ -62,7 +62,7 @@ func (m *mockHypervisor) resumeSandbox(ctx context.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *mockHypervisor) saveSandbox() error {
|
func (m *mockHypervisor) SaveVM() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ func TestMockHypervisorGetSandboxConsole(t *testing.T) {
|
|||||||
func TestMockHypervisorSaveSandbox(t *testing.T) {
|
func TestMockHypervisorSaveSandbox(t *testing.T) {
|
||||||
var m *mockHypervisor
|
var m *mockHypervisor
|
||||||
|
|
||||||
assert.NoError(t, m.saveSandbox())
|
assert.NoError(t, m.SaveVM())
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMockHypervisorDisconnect(t *testing.T) {
|
func TestMockHypervisorDisconnect(t *testing.T) {
|
||||||
|
@ -2038,7 +2038,7 @@ func (q *qemu) GetVMConsole(ctx context.Context, id string) (string, string, err
|
|||||||
return consoleProtoUnix, consoleURL, nil
|
return consoleProtoUnix, consoleURL, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *qemu) saveSandbox() error {
|
func (q *qemu) SaveVM() error {
|
||||||
q.Logger().Info("Save sandbox")
|
q.Logger().Info("Save sandbox")
|
||||||
|
|
||||||
if err := q.qmpSetup(); err != nil {
|
if err := q.qmpSetup(); err != nil {
|
||||||
|
@ -221,7 +221,7 @@ func (v *VM) Pause(ctx context.Context) error {
|
|||||||
// Save saves a VM to persistent disk.
|
// Save saves a VM to persistent disk.
|
||||||
func (v *VM) Save() error {
|
func (v *VM) Save() error {
|
||||||
v.logger().Info("Save vm")
|
v.logger().Info("Save vm")
|
||||||
return v.hypervisor.saveSandbox()
|
return v.hypervisor.SaveVM()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resume resumes a paused VM.
|
// Resume resumes a paused VM.
|
||||||
|
Loading…
Reference in New Issue
Block a user