Let's bump the Cloud Hypervisor version to 5343e09e7b8db, as that brings a few fixes we're interested in, such as: * hypervisor, vmm: Handle TDX hypercalls with INVALID_OPERAND - https://github.com/cloud-hypervisor/cloud-hypervisor/pull/3723 - This is needed for the TDX support on the cloud hypervisor driver, which is part of this very same series. * openapi: Update the PciBdf types - https://github.com/cloud-hypervisor/cloud-hypervisor/pull/3748 - This is needed due to a change in a DeviceNode field, which would cause a marshalling / demarshalling error when running with a version of cloud-hypervisor that includes the TDX fixes mentioned above. * scripts: dev_cli: Don't quote $features_build * scripts: dev_cli: Add --features option - https://github.com/cloud-hypervisor/cloud-hypervisor/pull/3773 - This is needed due to changes in the scripts used to build Cloud Hypervisor, which are used as part of Kata Containers CIs and github actions. Due to this change, we're also adapting the build scripts as part of this very same commit. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
37 KiB
\DefaultApi
All URIs are relative to http://localhost/api/v1
| Method | HTTP request | Description |
|---|---|---|
| BootVM | Put /vm.boot | Boot the previously created VM instance. |
| CreateVM | Put /vm.create | Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created. |
| DeleteVM | Put /vm.delete | Delete the cloud-hypervisor Virtual Machine (VM) instance. |
| PauseVM | Put /vm.pause | Pause a previously booted VM instance. |
| PowerButtonVM | Put /vm.power-button | Trigger a power button in the VM |
| RebootVM | Put /vm.reboot | Reboot the VM instance. |
| ResumeVM | Put /vm.resume | Resume a previously paused VM instance. |
| ShutdownVM | Put /vm.shutdown | Shut the VM instance down. |
| ShutdownVMM | Put /vmm.shutdown | Shuts the cloud-hypervisor VMM. |
| VmAddDevicePut | Put /vm.add-device | Add a new device to the VM |
| VmAddDiskPut | Put /vm.add-disk | Add a new disk to the VM |
| VmAddFsPut | Put /vm.add-fs | Add a new virtio-fs device to the VM |
| VmAddNetPut | Put /vm.add-net | Add a new network device to the VM |
| VmAddPmemPut | Put /vm.add-pmem | Add a new pmem device to the VM |
| VmAddVsockPut | Put /vm.add-vsock | Add a new vsock device to the VM |
| VmCountersGet | Get /vm.counters | Get counters from the VM |
| VmInfoGet | Get /vm.info | Returns general information about the cloud-hypervisor Virtual Machine (VM) instance. |
| VmReceiveMigrationPut | Put /vm.receive-migration | Receive a VM migration from URL |
| VmRemoveDevicePut | Put /vm.remove-device | Remove a device from the VM |
| VmResizePut | Put /vm.resize | Resize the VM |
| VmResizeZonePut | Put /vm.resize-zone | Resize a memory zone |
| VmRestorePut | Put /vm.restore | Restore a VM from a snapshot. |
| VmSendMigrationPut | Put /vm.send-migration | Send a VM migration to URL |
| VmSnapshotPut | Put /vm.snapshot | Returns a VM snapshot. |
| VmmPingGet | Get /vmm.ping | Ping the VMM to check for API server availability |
BootVM
BootVM(ctx).Execute()
Boot the previously created VM instance.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.BootVM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BootVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiBootVMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateVM
CreateVM(ctx).VmConfig(vmConfig).Execute()
Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
vmConfig := *openapiclient.NewVmConfig(*openapiclient.NewKernelConfig("Path_example")) // VmConfig | The VM configuration
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.CreateVM(context.Background()).VmConfig(vmConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCreateVMRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| vmConfig | VmConfig | The VM configuration |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteVM
DeleteVM(ctx).Execute()
Delete the cloud-hypervisor Virtual Machine (VM) instance.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.DeleteVM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiDeleteVMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PauseVM
PauseVM(ctx).Execute()
Pause a previously booted VM instance.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.PauseVM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PauseVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiPauseVMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PowerButtonVM
PowerButtonVM(ctx).Execute()
Trigger a power button in the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.PowerButtonVM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PowerButtonVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiPowerButtonVMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RebootVM
RebootVM(ctx).Execute()
Reboot the VM instance.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.RebootVM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RebootVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiRebootVMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResumeVM
ResumeVM(ctx).Execute()
Resume a previously paused VM instance.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.ResumeVM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ResumeVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiResumeVMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShutdownVM
ShutdownVM(ctx).Execute()
Shut the VM instance down.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.ShutdownVM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ShutdownVM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiShutdownVMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShutdownVMM
ShutdownVMM(ctx).Execute()
Shuts the cloud-hypervisor VMM.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.ShutdownVMM(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ShutdownVMM``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiShutdownVMMRequest struct via the builder pattern
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmAddDevicePut
PciDeviceInfo VmAddDevicePut(ctx).VmAddDevice(vmAddDevice).Execute()
Add a new device to the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
vmAddDevice := *openapiclient.NewVmAddDevice() // VmAddDevice | The path of the new device
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmAddDevicePut(context.Background()).VmAddDevice(vmAddDevice).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddDevicePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmAddDevicePut`: PciDeviceInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddDevicePut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmAddDevicePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| vmAddDevice | VmAddDevice | The path of the new device |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmAddDiskPut
PciDeviceInfo VmAddDiskPut(ctx).DiskConfig(diskConfig).Execute()
Add a new disk to the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
diskConfig := *openapiclient.NewDiskConfig("Path_example") // DiskConfig | The details of the new disk
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmAddDiskPut(context.Background()).DiskConfig(diskConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddDiskPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmAddDiskPut`: PciDeviceInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddDiskPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmAddDiskPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| diskConfig | DiskConfig | The details of the new disk |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmAddFsPut
PciDeviceInfo VmAddFsPut(ctx).FsConfig(fsConfig).Execute()
Add a new virtio-fs device to the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
fsConfig := *openapiclient.NewFsConfig("Tag_example", "Socket_example", int32(123), int32(123), false, int64(123)) // FsConfig | The details of the new virtio-fs
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmAddFsPut(context.Background()).FsConfig(fsConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddFsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmAddFsPut`: PciDeviceInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddFsPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmAddFsPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| fsConfig | FsConfig | The details of the new virtio-fs |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmAddNetPut
PciDeviceInfo VmAddNetPut(ctx).NetConfig(netConfig).Execute()
Add a new network device to the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
netConfig := *openapiclient.NewNetConfig() // NetConfig | The details of the new network device
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmAddNetPut(context.Background()).NetConfig(netConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddNetPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmAddNetPut`: PciDeviceInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddNetPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmAddNetPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| netConfig | NetConfig | The details of the new network device |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmAddPmemPut
PciDeviceInfo VmAddPmemPut(ctx).PmemConfig(pmemConfig).Execute()
Add a new pmem device to the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
pmemConfig := *openapiclient.NewPmemConfig("File_example") // PmemConfig | The details of the new pmem device
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmAddPmemPut(context.Background()).PmemConfig(pmemConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddPmemPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmAddPmemPut`: PciDeviceInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddPmemPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmAddPmemPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| pmemConfig | PmemConfig | The details of the new pmem device |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmAddVsockPut
PciDeviceInfo VmAddVsockPut(ctx).VsockConfig(vsockConfig).Execute()
Add a new vsock device to the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
vsockConfig := *openapiclient.NewVsockConfig(int64(123), "Socket_example") // VsockConfig | The details of the new vsock device
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmAddVsockPut(context.Background()).VsockConfig(vsockConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddVsockPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmAddVsockPut`: PciDeviceInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddVsockPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmAddVsockPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| vsockConfig | VsockConfig | The details of the new vsock device |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmCountersGet
map[string]map[string]int64 VmCountersGet(ctx).Execute()
Get counters from the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmCountersGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmCountersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmCountersGet`: map[string]map[string]int64
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmCountersGet`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiVmCountersGetRequest struct via the builder pattern
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmInfoGet
VmInfo VmInfoGet(ctx).Execute()
Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmInfoGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmInfoGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmInfoGet`: VmInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmInfoGet`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiVmInfoGetRequest struct via the builder pattern
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmReceiveMigrationPut
VmReceiveMigrationPut(ctx).ReceiveMigrationData(receiveMigrationData).Execute()
Receive a VM migration from URL
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
receiveMigrationData := *openapiclient.NewReceiveMigrationData("ReceiverUrl_example") // ReceiveMigrationData | The URL for the reception of migration state
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmReceiveMigrationPut(context.Background()).ReceiveMigrationData(receiveMigrationData).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmReceiveMigrationPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmReceiveMigrationPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| receiveMigrationData | ReceiveMigrationData | The URL for the reception of migration state |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmRemoveDevicePut
VmRemoveDevicePut(ctx).VmRemoveDevice(vmRemoveDevice).Execute()
Remove a device from the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
vmRemoveDevice := *openapiclient.NewVmRemoveDevice() // VmRemoveDevice | The identifier of the device
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmRemoveDevicePut(context.Background()).VmRemoveDevice(vmRemoveDevice).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmRemoveDevicePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmRemoveDevicePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| vmRemoveDevice | VmRemoveDevice | The identifier of the device |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmResizePut
VmResizePut(ctx).VmResize(vmResize).Execute()
Resize the VM
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
vmResize := *openapiclient.NewVmResize() // VmResize | The target size for the VM
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmResizePut(context.Background()).VmResize(vmResize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmResizePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmResizePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| vmResize | VmResize | The target size for the VM |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmResizeZonePut
VmResizeZonePut(ctx).VmResizeZone(vmResizeZone).Execute()
Resize a memory zone
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
vmResizeZone := *openapiclient.NewVmResizeZone() // VmResizeZone | The target size for the memory zone
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmResizeZonePut(context.Background()).VmResizeZone(vmResizeZone).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmResizeZonePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmResizeZonePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| vmResizeZone | VmResizeZone | The target size for the memory zone |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmRestorePut
VmRestorePut(ctx).RestoreConfig(restoreConfig).Execute()
Restore a VM from a snapshot.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
restoreConfig := *openapiclient.NewRestoreConfig("SourceUrl_example") // RestoreConfig | The restore configuration
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmRestorePut(context.Background()).RestoreConfig(restoreConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmRestorePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmRestorePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| restoreConfig | RestoreConfig | The restore configuration |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmSendMigrationPut
VmSendMigrationPut(ctx).SendMigrationData(sendMigrationData).Execute()
Send a VM migration to URL
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
sendMigrationData := *openapiclient.NewSendMigrationData("DestinationUrl_example") // SendMigrationData | The URL for sending the migration state
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmSendMigrationPut(context.Background()).SendMigrationData(sendMigrationData).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmSendMigrationPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmSendMigrationPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| sendMigrationData | SendMigrationData | The URL for sending the migration state |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmSnapshotPut
VmSnapshotPut(ctx).VmSnapshotConfig(vmSnapshotConfig).Execute()
Returns a VM snapshot.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
vmSnapshotConfig := *openapiclient.NewVmSnapshotConfig() // VmSnapshotConfig | The snapshot configuration
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmSnapshotPut(context.Background()).VmSnapshotConfig(vmSnapshotConfig).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmSnapshotPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiVmSnapshotPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| vmSnapshotConfig | VmSnapshotConfig | The snapshot configuration |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmmPingGet
VmmPingResponse VmmPingGet(ctx).Execute()
Ping the VMM to check for API server availability
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmmPingGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmmPingGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmmPingGet`: VmmPingResponse
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmmPingGet`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiVmmPingGetRequest struct via the builder pattern
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]