diff --git a/src/runtime/virtcontainers/acrn.go b/src/runtime/virtcontainers/acrn.go index 6b2679201..2d93970c7 100644 --- a/src/runtime/virtcontainers/acrn.go +++ b/src/runtime/virtcontainers/acrn.go @@ -426,7 +426,7 @@ func (a *Acrn) CreateVM(ctx context.Context, id string, network Network, hypervi return nil } -// startSandbox will start the Sandbox's VM. +// StartVM will start the Sandbox's VM. func (a *Acrn) StartVM(ctx context.Context, timeoutSecs int) error { span, ctx := katatrace.Trace(ctx, a.Logger(), "StartVM", acrnTracingTags, map[string]string{"sandbox_id": a.id}) defer span.End() @@ -486,7 +486,7 @@ func (a *Acrn) waitVM(ctx context.Context, timeoutSecs int) error { return nil } -// stopSandbox will stop the Sandbox's VM. +// StopVM will stop the Sandbox's VM. func (a *Acrn) StopVM(ctx context.Context, waitOnly bool) (err error) { span, _ := katatrace.Trace(ctx, a.Logger(), "StopVM", acrnTracingTags, map[string]string{"sandbox_id": a.id}) defer span.End() @@ -600,7 +600,7 @@ func (a *Acrn) ResumeVM(ctx context.Context) error { return nil } -// addDevice will add extra devices to acrn command line. +// AddDevice will add extra devices to acrn command line. func (a *Acrn) AddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) error { var err error span, _ := katatrace.Trace(ctx, a.Logger(), "AddDevice", acrnTracingTags, map[string]string{"sandbox_id": a.id}) @@ -633,8 +633,8 @@ func (a *Acrn) AddDevice(ctx context.Context, devInfo interface{}, devType Devic return err } -// getSandboxConsole builds the path of the console where we can read -// logs coming from the sandbox. +// GetVMConsole builds the path of the console where we can read logs coming +// from the sandbox. func (a *Acrn) GetVMConsole(ctx context.Context, id string) (string, string, error) { span, _ := katatrace.Trace(ctx, a.Logger(), "GetVMConsole", acrnTracingTags, map[string]string{"sandbox_id": a.id}) defer span.End() diff --git a/src/runtime/virtcontainers/clh.go b/src/runtime/virtcontainers/clh.go index c82d0d42c..2dd848047 100644 --- a/src/runtime/virtcontainers/clh.go +++ b/src/runtime/virtcontainers/clh.go @@ -538,7 +538,7 @@ func (clh *cloudHypervisor) CreateVM(ctx context.Context, id string, network Net return nil } -// startSandbox will start the VMM and boot the virtual machine for the given sandbox. +// StartVM will start the VMM and boot the virtual machine for the given sandbox. func (clh *cloudHypervisor) StartVM(ctx context.Context, timeout int) error { span, _ := katatrace.Trace(ctx, clh.Logger(), "StartVM", clhTracingTags, map[string]string{"sandbox_id": clh.id}) defer span.End() @@ -592,8 +592,8 @@ func (clh *cloudHypervisor) StartVM(ctx context.Context, timeout int) error { return nil } -// getSandboxConsole builds the path of the console where we can read -// logs coming from the sandbox. +// GetVMConsole builds the path of the console where we can read logs coming +// from the sandbox. func (clh *cloudHypervisor) GetVMConsole(ctx context.Context, id string) (string, string, error) { clh.Logger().WithField("function", "GetVMConsole").WithField("id", id).Info("Get Sandbox Console") master, slave, err := console.NewPty() @@ -907,7 +907,7 @@ func (clh *cloudHypervisor) ResumeVM(ctx context.Context) error { return nil } -// stopSandbox will stop the Sandbox's VM. +// StopVM will stop the Sandbox's VM. func (clh *cloudHypervisor) StopVM(ctx context.Context, waitOnly bool) (err error) { span, _ := katatrace.Trace(ctx, clh.Logger(), "StopVM", clhTracingTags, map[string]string{"sandbox_id": clh.id}) defer span.End() diff --git a/src/runtime/virtcontainers/fc.go b/src/runtime/virtcontainers/fc.go index 384ce15a1..3a89c7fa4 100644 --- a/src/runtime/virtcontainers/fc.go +++ b/src/runtime/virtcontainers/fc.go @@ -200,7 +200,7 @@ func (fc *firecracker) setConfig(config *HypervisorConfig) error { } // CreateVM For firecracker this call only sets the internal structure up. -// The sandbox will be created and started through startSandbox(). +// The sandbox will be created and started through StartVM(). func (fc *firecracker) CreateVM(ctx context.Context, id string, network Network, hypervisorConfig *HypervisorConfig) error { fc.ctx = ctx @@ -763,7 +763,7 @@ func (fc *firecracker) fcInitConfiguration(ctx context.Context) error { return nil } -// startSandbox will start the hypervisor for the given sandbox. +// StartVM will start the hypervisor for the given sandbox. // In the context of firecracker, this will start the hypervisor, // for configuration, but not yet start the actual virtual machine func (fc *firecracker) StartVM(ctx context.Context, timeout int) error { @@ -881,7 +881,7 @@ func (fc *firecracker) cleanupJail(ctx context.Context) { } } -// stopSandbox will stop the Sandbox's VM. +// StopVM will stop the Sandbox's VM. func (fc *firecracker) StopVM(ctx context.Context, waitOnly bool) (err error) { span, _ := katatrace.Trace(ctx, fc.Logger(), "StopVM", fcTracingTags, map[string]string{"sandbox_id": fc.id}) defer span.End() @@ -1025,7 +1025,7 @@ func (fc *firecracker) fcUpdateBlockDrive(ctx context.Context, path, id string) return nil } -// addDevice will add extra devices to firecracker. Limited to configure before the +// AddDevice will add extra devices to firecracker. Limited to configure before the // virtual machine starts. Devices include drivers and network interfaces only. func (fc *firecracker) AddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) error { span, _ := katatrace.Trace(ctx, fc.Logger(), "AddDevice", fcTracingTags, map[string]string{"sandbox_id": fc.id}) @@ -1128,8 +1128,8 @@ func (fc *firecracker) HotplugRemoveDevice(ctx context.Context, devInfo interfac } } -// getSandboxConsole builds the path of the console where we can read -// logs coming from the sandbox. +// GetVMConsole builds the path of the console where we can read logs coming +// from the sandbox. func (fc *firecracker) GetVMConsole(ctx context.Context, id string) (string, string, error) { master, slave, err := console.NewPty() if err != nil { diff --git a/src/runtime/virtcontainers/qemu.go b/src/runtime/virtcontainers/qemu.go index 070ace1e7..2fc51cdf3 100644 --- a/src/runtime/virtcontainers/qemu.go +++ b/src/runtime/virtcontainers/qemu.go @@ -798,7 +798,7 @@ func (q *qemu) setupVirtioMem(ctx context.Context) error { return err } -// startSandbox will start the Sandbox's VM. +// StartVM will start the Sandbox's VM. func (q *qemu) StartVM(ctx context.Context, timeout int) error { span, ctx := katatrace.Trace(ctx, q.Logger(), "StartVM", qemuTracingTags, map[string]string{"sandbox_id": q.id}) defer span.End() @@ -970,7 +970,7 @@ func (q *qemu) waitVM(ctx context.Context, timeout int) error { return nil } -// stopSandbox will stop the Sandbox's VM. +// StopVM will stop the Sandbox's VM. func (q *qemu) StopVM(ctx context.Context, waitOnly bool) error { span, _ := katatrace.Trace(ctx, q.Logger(), "StopVM", qemuTracingTags, map[string]string{"sandbox_id": q.id}) defer span.End() @@ -2040,7 +2040,7 @@ func (q *qemu) ResumeVM(ctx context.Context) error { return q.togglePauseSandbox(ctx, false) } -// addDevice will add extra devices to Qemu command line. +// AddDevice will add extra devices to Qemu command line. func (q *qemu) AddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) error { var err error span, _ := katatrace.Trace(ctx, q.Logger(), "AddDevice", qemuTracingTags) @@ -2099,8 +2099,8 @@ func (q *qemu) AddDevice(ctx context.Context, devInfo interface{}, devType Devic return err } -// getSandboxConsole builds the path of the console where we can read -// logs coming from the sandbox. +// GetVMConsole builds the path of the console where we can read logs coming +// from the sandbox. func (q *qemu) GetVMConsole(ctx context.Context, id string) (string, string, error) { span, _ := katatrace.Trace(ctx, q.Logger(), "GetVMConsole", qemuTracingTags, map[string]string{"sandbox_id": q.id}) defer span.End() @@ -2173,7 +2173,7 @@ func (q *qemu) Disconnect(ctx context.Context) { q.qmpShutdown() } -// resizeMemory get a request to update the VM memory to reqMemMB +// ResizeMemory gets a request to update the VM memory to reqMemMB // Memory update is managed with two approaches // Add memory to VM: // When memory is required to be added we hotplug memory