mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-22 05:28:25 +00:00
clh: Add comments around clh api
To make easier to know what a method of API is expected to do without go to cloud-hypervisor documentation. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
6a4e667f9c
commit
f61eca8920
@ -72,13 +72,20 @@ const (
|
|||||||
// The main purpose is to hide the client in an interface to allow mock testing.
|
// The main purpose is to hide the client in an interface to allow mock testing.
|
||||||
// This is an interface that has to match with OpenAPI CLH client
|
// This is an interface that has to match with OpenAPI CLH client
|
||||||
type clhClient interface {
|
type clhClient interface {
|
||||||
|
// Check for the REST API availability
|
||||||
VmmPingGet(ctx context.Context) (chclient.VmmPingResponse, *http.Response, error)
|
VmmPingGet(ctx context.Context) (chclient.VmmPingResponse, *http.Response, error)
|
||||||
|
// Shut the VMM down
|
||||||
ShutdownVMM(ctx context.Context) (*http.Response, error)
|
ShutdownVMM(ctx context.Context) (*http.Response, error)
|
||||||
|
// Create the VM
|
||||||
CreateVM(ctx context.Context, vmConfig chclient.VmConfig) (*http.Response, error)
|
CreateVM(ctx context.Context, vmConfig chclient.VmConfig) (*http.Response, error)
|
||||||
|
// Dump the VM information
|
||||||
// No lint: golint suggest to rename to VMInfoGet.
|
// No lint: golint suggest to rename to VMInfoGet.
|
||||||
VmInfoGet(ctx context.Context) (chclient.VmInfo, *http.Response, error) //nolint:golint
|
VmInfoGet(ctx context.Context) (chclient.VmInfo, *http.Response, error) //nolint:golint
|
||||||
|
// Boot the VM
|
||||||
BootVM(ctx context.Context) (*http.Response, error)
|
BootVM(ctx context.Context) (*http.Response, error)
|
||||||
|
// Add/remove CPUs to/from the VM
|
||||||
VmResizePut(ctx context.Context, vmResize chclient.VmResize) (*http.Response, error)
|
VmResizePut(ctx context.Context, vmResize chclient.VmResize) (*http.Response, error)
|
||||||
|
// Add VFIO PCI device to the VM
|
||||||
VmAddDevicePut(ctx context.Context, vmAddDevice chclient.VmAddDevice) (*http.Response, error)
|
VmAddDevicePut(ctx context.Context, vmAddDevice chclient.VmAddDevice) (*http.Response, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user