From 7a5ccd12641c5ef63d4c13eb0269380684452771 Mon Sep 17 00:00:00 2001 From: Rafael Fonseca Date: Wed, 18 May 2022 21:55:28 +0200 Subject: [PATCH] runtime: sync docstrings with function names The functions were renamed but their docstrings were not. Fixes #4006 Signed-off-by: Rafael Fonseca --- src/runtime/virtcontainers/acrn.go | 10 +++++----- src/runtime/virtcontainers/clh.go | 8 ++++---- src/runtime/virtcontainers/fc.go | 12 ++++++------ src/runtime/virtcontainers/qemu.go | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/runtime/virtcontainers/acrn.go b/src/runtime/virtcontainers/acrn.go index 6b26792019..2d93970c7f 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 c82d0d42c1..2dd848047e 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 384ce15a12..3a89c7fa44 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 a910c580ff..495214eb32 100644 --- a/src/runtime/virtcontainers/qemu.go +++ b/src/runtime/virtcontainers/qemu.go @@ -797,7 +797,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() @@ -969,7 +969,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() @@ -2039,7 +2039,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) @@ -2098,8 +2098,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() @@ -2172,7 +2172,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