mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-10 07:54:59 +00:00
runtime: sync docstrings with function names
The functions were renamed but their docstrings were not. Fixes #4006 Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
This commit is contained in:
parent
d7aded7238
commit
7a5ccd1264
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user