mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 07:22:20 +00:00
clh: update client
update api based latest master. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
553237884a
commit
1a7539c1f5
@ -1 +1 @@
|
|||||||
4.2.2-SNAPSHOT
|
4.2.3-SNAPSHOT
|
@ -41,6 +41,7 @@ Class | Method | HTTP request | Description
|
|||||||
*DefaultApi* | [**ShutdownVM**](docs/DefaultApi.md#shutdownvm) | **Put** /vm.shutdown | Shut the VM instance down.
|
*DefaultApi* | [**ShutdownVM**](docs/DefaultApi.md#shutdownvm) | **Put** /vm.shutdown | Shut the VM instance down.
|
||||||
*DefaultApi* | [**ShutdownVMM**](docs/DefaultApi.md#shutdownvmm) | **Put** /vmm.shutdown | Shuts the cloud-hypervisor VMM.
|
*DefaultApi* | [**ShutdownVMM**](docs/DefaultApi.md#shutdownvmm) | **Put** /vmm.shutdown | Shuts the cloud-hypervisor VMM.
|
||||||
*DefaultApi* | [**VmInfoGet**](docs/DefaultApi.md#vminfoget) | **Get** /vm.info | Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
|
*DefaultApi* | [**VmInfoGet**](docs/DefaultApi.md#vminfoget) | **Get** /vm.info | Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
|
||||||
|
*DefaultApi* | [**VmResizePut**](docs/DefaultApi.md#vmresizeput) | **Put** /vm.resize | Resize the VM
|
||||||
*DefaultApi* | [**VmmPingGet**](docs/DefaultApi.md#vmmpingget) | **Get** /vmm.ping | Ping the VMM to check for API server availability
|
*DefaultApi* | [**VmmPingGet**](docs/DefaultApi.md#vmmpingget) | **Get** /vmm.ping | Ping the VMM to check for API server availability
|
||||||
|
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
- [CmdLineConfig](docs/CmdLineConfig.md)
|
- [CmdLineConfig](docs/CmdLineConfig.md)
|
||||||
- [ConsoleConfig](docs/ConsoleConfig.md)
|
- [ConsoleConfig](docs/ConsoleConfig.md)
|
||||||
- [CpuConfig](docs/CpuConfig.md)
|
- [CpusConfig](docs/CpusConfig.md)
|
||||||
- [DeviceConfig](docs/DeviceConfig.md)
|
- [DeviceConfig](docs/DeviceConfig.md)
|
||||||
- [DiskConfig](docs/DiskConfig.md)
|
- [DiskConfig](docs/DiskConfig.md)
|
||||||
- [FsConfig](docs/FsConfig.md)
|
- [FsConfig](docs/FsConfig.md)
|
||||||
@ -58,10 +59,10 @@ Class | Method | HTTP request | Description
|
|||||||
- [PmemConfig](docs/PmemConfig.md)
|
- [PmemConfig](docs/PmemConfig.md)
|
||||||
- [RngConfig](docs/RngConfig.md)
|
- [RngConfig](docs/RngConfig.md)
|
||||||
- [VhostUserBlkConfig](docs/VhostUserBlkConfig.md)
|
- [VhostUserBlkConfig](docs/VhostUserBlkConfig.md)
|
||||||
- [VhostUserConfig](docs/VhostUserConfig.md)
|
|
||||||
- [VhostUserNetConfig](docs/VhostUserNetConfig.md)
|
- [VhostUserNetConfig](docs/VhostUserNetConfig.md)
|
||||||
- [VmConfig](docs/VmConfig.md)
|
- [VmConfig](docs/VmConfig.md)
|
||||||
- [VmInfo](docs/VmInfo.md)
|
- [VmInfo](docs/VmInfo.md)
|
||||||
|
- [VmResize](docs/VmResize.md)
|
||||||
- [VmmPingResponse](docs/VmmPingResponse.md)
|
- [VmmPingResponse](docs/VmmPingResponse.md)
|
||||||
- [VsockConfig](docs/VsockConfig.md)
|
- [VsockConfig](docs/VsockConfig.md)
|
||||||
|
|
||||||
|
@ -113,6 +113,21 @@ paths:
|
|||||||
405:
|
405:
|
||||||
description: The VM instance could not reboot because it is not booted.
|
description: The VM instance could not reboot because it is not booted.
|
||||||
summary: Reboot the VM instance.
|
summary: Reboot the VM instance.
|
||||||
|
/vm.resize:
|
||||||
|
put:
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/VmResize'
|
||||||
|
description: The target size for the VM
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
204:
|
||||||
|
description: The VM instance was successfully resized.
|
||||||
|
404:
|
||||||
|
description: The VM instance could not be resized because it is not created.
|
||||||
|
summary: Resize the VM
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
VmmPingResponse:
|
VmmPingResponse:
|
||||||
@ -137,14 +152,15 @@ components:
|
|||||||
memory:
|
memory:
|
||||||
mergeable: false
|
mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 6
|
size: 1
|
||||||
disks:
|
disks:
|
||||||
- path: path
|
- path: path
|
||||||
iommu: false
|
iommu: false
|
||||||
- path: path
|
- path: path
|
||||||
iommu: false
|
iommu: false
|
||||||
cpus:
|
cpus:
|
||||||
cpu_count: 1
|
boot_vcpus: 1
|
||||||
|
max_vcpus: 1
|
||||||
devices:
|
devices:
|
||||||
- path: path
|
- path: path
|
||||||
iommu: false
|
iommu: false
|
||||||
@ -153,40 +169,38 @@ components:
|
|||||||
kernel:
|
kernel:
|
||||||
path: path
|
path: path
|
||||||
vhost_user_blk:
|
vhost_user_blk:
|
||||||
- wce: true
|
- sock: sock
|
||||||
vu_cfg:
|
num_queues: 2
|
||||||
sock: sock
|
queue_size: 4
|
||||||
num_queues: 7
|
wce: true
|
||||||
queue:size: 9
|
- sock: sock
|
||||||
- wce: true
|
num_queues: 2
|
||||||
vu_cfg:
|
queue_size: 4
|
||||||
sock: sock
|
wce: true
|
||||||
num_queues: 7
|
|
||||||
queue:size: 9
|
|
||||||
rng:
|
rng:
|
||||||
iommu: false
|
iommu: false
|
||||||
src: /dev/urandom
|
src: /dev/urandom
|
||||||
fs:
|
fs:
|
||||||
- sock: sock
|
- sock: sock
|
||||||
num_queues: 1
|
num_queues: 5
|
||||||
queue_size: 5
|
queue_size: 5
|
||||||
cache_size: 5
|
cache_size: 2
|
||||||
|
dax: true
|
||||||
tag: tag
|
tag: tag
|
||||||
- sock: sock
|
- sock: sock
|
||||||
num_queues: 1
|
num_queues: 5
|
||||||
queue_size: 5
|
queue_size: 5
|
||||||
cache_size: 5
|
cache_size: 2
|
||||||
|
dax: true
|
||||||
tag: tag
|
tag: tag
|
||||||
vhost_user_net:
|
vhost_user_net:
|
||||||
- vu_cfg:
|
- sock: sock
|
||||||
sock: sock
|
num_queues: 9
|
||||||
num_queues: 7
|
queue_size: 3
|
||||||
queue:size: 9
|
|
||||||
mac: mac
|
mac: mac
|
||||||
- vu_cfg:
|
- sock: sock
|
||||||
sock: sock
|
num_queues: 9
|
||||||
num_queues: 7
|
queue_size: 3
|
||||||
queue:size: 9
|
|
||||||
mac: mac
|
mac: mac
|
||||||
vsock:
|
vsock:
|
||||||
- sock: sock
|
- sock: sock
|
||||||
@ -198,11 +212,11 @@ components:
|
|||||||
pmem:
|
pmem:
|
||||||
- mergeable: false
|
- mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 2
|
size: 7
|
||||||
iommu: false
|
iommu: false
|
||||||
- mergeable: false
|
- mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 2
|
size: 7
|
||||||
iommu: false
|
iommu: false
|
||||||
cmdline:
|
cmdline:
|
||||||
args: args
|
args: args
|
||||||
@ -214,14 +228,14 @@ components:
|
|||||||
net:
|
net:
|
||||||
- tap: tap
|
- tap: tap
|
||||||
iommu: false
|
iommu: false
|
||||||
ip: ip
|
ip: 192.168.249.1
|
||||||
mac: mac
|
mac: mac
|
||||||
mask: mask
|
mask: 255.255.255.0
|
||||||
- tap: tap
|
- tap: tap
|
||||||
iommu: false
|
iommu: false
|
||||||
ip: ip
|
ip: 192.168.249.1
|
||||||
mac: mac
|
mac: mac
|
||||||
mask: mask
|
mask: 255.255.255.0
|
||||||
properties:
|
properties:
|
||||||
config:
|
config:
|
||||||
$ref: '#/components/schemas/VmConfig'
|
$ref: '#/components/schemas/VmConfig'
|
||||||
@ -245,14 +259,15 @@ components:
|
|||||||
memory:
|
memory:
|
||||||
mergeable: false
|
mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 6
|
size: 1
|
||||||
disks:
|
disks:
|
||||||
- path: path
|
- path: path
|
||||||
iommu: false
|
iommu: false
|
||||||
- path: path
|
- path: path
|
||||||
iommu: false
|
iommu: false
|
||||||
cpus:
|
cpus:
|
||||||
cpu_count: 1
|
boot_vcpus: 1
|
||||||
|
max_vcpus: 1
|
||||||
devices:
|
devices:
|
||||||
- path: path
|
- path: path
|
||||||
iommu: false
|
iommu: false
|
||||||
@ -261,40 +276,38 @@ components:
|
|||||||
kernel:
|
kernel:
|
||||||
path: path
|
path: path
|
||||||
vhost_user_blk:
|
vhost_user_blk:
|
||||||
- wce: true
|
- sock: sock
|
||||||
vu_cfg:
|
num_queues: 2
|
||||||
sock: sock
|
queue_size: 4
|
||||||
num_queues: 7
|
wce: true
|
||||||
queue:size: 9
|
- sock: sock
|
||||||
- wce: true
|
num_queues: 2
|
||||||
vu_cfg:
|
queue_size: 4
|
||||||
sock: sock
|
wce: true
|
||||||
num_queues: 7
|
|
||||||
queue:size: 9
|
|
||||||
rng:
|
rng:
|
||||||
iommu: false
|
iommu: false
|
||||||
src: /dev/urandom
|
src: /dev/urandom
|
||||||
fs:
|
fs:
|
||||||
- sock: sock
|
- sock: sock
|
||||||
num_queues: 1
|
num_queues: 5
|
||||||
queue_size: 5
|
queue_size: 5
|
||||||
cache_size: 5
|
cache_size: 2
|
||||||
|
dax: true
|
||||||
tag: tag
|
tag: tag
|
||||||
- sock: sock
|
- sock: sock
|
||||||
num_queues: 1
|
num_queues: 5
|
||||||
queue_size: 5
|
queue_size: 5
|
||||||
cache_size: 5
|
cache_size: 2
|
||||||
|
dax: true
|
||||||
tag: tag
|
tag: tag
|
||||||
vhost_user_net:
|
vhost_user_net:
|
||||||
- vu_cfg:
|
- sock: sock
|
||||||
sock: sock
|
num_queues: 9
|
||||||
num_queues: 7
|
queue_size: 3
|
||||||
queue:size: 9
|
|
||||||
mac: mac
|
mac: mac
|
||||||
- vu_cfg:
|
- sock: sock
|
||||||
sock: sock
|
num_queues: 9
|
||||||
num_queues: 7
|
queue_size: 3
|
||||||
queue:size: 9
|
|
||||||
mac: mac
|
mac: mac
|
||||||
vsock:
|
vsock:
|
||||||
- sock: sock
|
- sock: sock
|
||||||
@ -306,11 +319,11 @@ components:
|
|||||||
pmem:
|
pmem:
|
||||||
- mergeable: false
|
- mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 2
|
size: 7
|
||||||
iommu: false
|
iommu: false
|
||||||
- mergeable: false
|
- mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 2
|
size: 7
|
||||||
iommu: false
|
iommu: false
|
||||||
cmdline:
|
cmdline:
|
||||||
args: args
|
args: args
|
||||||
@ -322,17 +335,17 @@ components:
|
|||||||
net:
|
net:
|
||||||
- tap: tap
|
- tap: tap
|
||||||
iommu: false
|
iommu: false
|
||||||
ip: ip
|
ip: 192.168.249.1
|
||||||
mac: mac
|
mac: mac
|
||||||
mask: mask
|
mask: 255.255.255.0
|
||||||
- tap: tap
|
- tap: tap
|
||||||
iommu: false
|
iommu: false
|
||||||
ip: ip
|
ip: 192.168.249.1
|
||||||
mac: mac
|
mac: mac
|
||||||
mask: mask
|
mask: 255.255.255.0
|
||||||
properties:
|
properties:
|
||||||
cpus:
|
cpus:
|
||||||
$ref: '#/components/schemas/CpuConfig'
|
$ref: '#/components/schemas/CpusConfig'
|
||||||
memory:
|
memory:
|
||||||
$ref: '#/components/schemas/MemoryConfig'
|
$ref: '#/components/schemas/MemoryConfig'
|
||||||
kernel:
|
kernel:
|
||||||
@ -384,22 +397,28 @@ components:
|
|||||||
- cmdline
|
- cmdline
|
||||||
- kernel
|
- kernel
|
||||||
type: object
|
type: object
|
||||||
CpuConfig:
|
CpusConfig:
|
||||||
example:
|
example:
|
||||||
cpu_count: 1
|
boot_vcpus: 1
|
||||||
|
max_vcpus: 1
|
||||||
properties:
|
properties:
|
||||||
cpu_count:
|
boot_vcpus:
|
||||||
|
default: 1
|
||||||
|
minimum: 1
|
||||||
|
type: integer
|
||||||
|
max_vcpus:
|
||||||
default: 1
|
default: 1
|
||||||
minimum: 1
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
required:
|
required:
|
||||||
- cpu_count
|
- boot_vcpus
|
||||||
|
- max_vcpus
|
||||||
type: object
|
type: object
|
||||||
MemoryConfig:
|
MemoryConfig:
|
||||||
example:
|
example:
|
||||||
mergeable: false
|
mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 6
|
size: 1
|
||||||
properties:
|
properties:
|
||||||
size:
|
size:
|
||||||
format: int64
|
format: int64
|
||||||
@ -447,25 +466,24 @@ components:
|
|||||||
example:
|
example:
|
||||||
tap: tap
|
tap: tap
|
||||||
iommu: false
|
iommu: false
|
||||||
ip: ip
|
ip: 192.168.249.1
|
||||||
mac: mac
|
mac: mac
|
||||||
mask: mask
|
mask: 255.255.255.0
|
||||||
properties:
|
properties:
|
||||||
tap:
|
tap:
|
||||||
|
default: ""
|
||||||
type: string
|
type: string
|
||||||
ip:
|
ip:
|
||||||
|
default: 192.168.249.1
|
||||||
type: string
|
type: string
|
||||||
mask:
|
mask:
|
||||||
|
default: 255.255.255.0
|
||||||
type: string
|
type: string
|
||||||
mac:
|
mac:
|
||||||
type: string
|
type: string
|
||||||
iommu:
|
iommu:
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
required:
|
|
||||||
- ip
|
|
||||||
- mac
|
|
||||||
- mask
|
|
||||||
type: object
|
type: object
|
||||||
RngConfig:
|
RngConfig:
|
||||||
example:
|
example:
|
||||||
@ -484,9 +502,10 @@ components:
|
|||||||
FsConfig:
|
FsConfig:
|
||||||
example:
|
example:
|
||||||
sock: sock
|
sock: sock
|
||||||
num_queues: 1
|
num_queues: 5
|
||||||
queue_size: 5
|
queue_size: 5
|
||||||
cache_size: 5
|
cache_size: 2
|
||||||
|
dax: true
|
||||||
tag: tag
|
tag: tag
|
||||||
properties:
|
properties:
|
||||||
tag:
|
tag:
|
||||||
@ -494,15 +513,18 @@ components:
|
|||||||
sock:
|
sock:
|
||||||
type: string
|
type: string
|
||||||
num_queues:
|
num_queues:
|
||||||
|
default: 1
|
||||||
type: integer
|
type: integer
|
||||||
queue_size:
|
queue_size:
|
||||||
|
default: 1024
|
||||||
type: integer
|
type: integer
|
||||||
|
dax:
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
cache_size:
|
cache_size:
|
||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
required:
|
required:
|
||||||
- num_queues
|
|
||||||
- queue_size
|
|
||||||
- sock
|
- sock
|
||||||
- tag
|
- tag
|
||||||
type: object
|
type: object
|
||||||
@ -510,7 +532,7 @@ components:
|
|||||||
example:
|
example:
|
||||||
mergeable: false
|
mergeable: false
|
||||||
file: file
|
file: file
|
||||||
size: 2
|
size: 7
|
||||||
iommu: false
|
iommu: false
|
||||||
properties:
|
properties:
|
||||||
file:
|
file:
|
||||||
@ -562,54 +584,46 @@ components:
|
|||||||
required:
|
required:
|
||||||
- path
|
- path
|
||||||
type: object
|
type: object
|
||||||
VhostUserConfig:
|
VhostUserNetConfig:
|
||||||
example:
|
example:
|
||||||
sock: sock
|
sock: sock
|
||||||
num_queues: 7
|
num_queues: 9
|
||||||
queue:size: 9
|
queue_size: 3
|
||||||
|
mac: mac
|
||||||
properties:
|
properties:
|
||||||
sock:
|
sock:
|
||||||
type: string
|
type: string
|
||||||
num_queues:
|
num_queues:
|
||||||
|
default: 2
|
||||||
type: integer
|
type: integer
|
||||||
queue:size:
|
queue_size:
|
||||||
|
default: 256
|
||||||
type: integer
|
type: integer
|
||||||
required:
|
|
||||||
- num_queues
|
|
||||||
- queue_size
|
|
||||||
- sock
|
|
||||||
type: object
|
|
||||||
VhostUserNetConfig:
|
|
||||||
example:
|
|
||||||
vu_cfg:
|
|
||||||
sock: sock
|
|
||||||
num_queues: 7
|
|
||||||
queue:size: 9
|
|
||||||
mac: mac
|
|
||||||
properties:
|
|
||||||
mac:
|
mac:
|
||||||
type: string
|
type: string
|
||||||
vu_cfg:
|
|
||||||
$ref: '#/components/schemas/VhostUserConfig'
|
|
||||||
required:
|
required:
|
||||||
- mac
|
- sock
|
||||||
- vu_cfg
|
|
||||||
type: object
|
type: object
|
||||||
VhostUserBlkConfig:
|
VhostUserBlkConfig:
|
||||||
example:
|
example:
|
||||||
wce: true
|
|
||||||
vu_cfg:
|
|
||||||
sock: sock
|
sock: sock
|
||||||
num_queues: 7
|
num_queues: 2
|
||||||
queue:size: 9
|
queue_size: 4
|
||||||
|
wce: true
|
||||||
properties:
|
properties:
|
||||||
|
sock:
|
||||||
|
type: string
|
||||||
|
num_queues:
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
queue_size:
|
||||||
|
default: 128
|
||||||
|
type: integer
|
||||||
wce:
|
wce:
|
||||||
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
vu_cfg:
|
|
||||||
$ref: '#/components/schemas/VhostUserConfig'
|
|
||||||
required:
|
required:
|
||||||
- vu_cfg
|
- sock
|
||||||
- wce
|
|
||||||
type: object
|
type: object
|
||||||
VsockConfig:
|
VsockConfig:
|
||||||
example:
|
example:
|
||||||
@ -632,3 +646,14 @@ components:
|
|||||||
- cid
|
- cid
|
||||||
- sock
|
- sock
|
||||||
type: object
|
type: object
|
||||||
|
VmResize:
|
||||||
|
example:
|
||||||
|
desired_vcpus: 1
|
||||||
|
properties:
|
||||||
|
desired_vcpus:
|
||||||
|
default: 1
|
||||||
|
minimum: 1
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- desired_vcpus
|
||||||
|
type: object
|
||||||
|
@ -623,6 +623,73 @@ func (a *DefaultApiService) VmInfoGet(ctx _context.Context) (VmInfo, *_nethttp.R
|
|||||||
return localVarReturnValue, localVarHTTPResponse, nil
|
return localVarReturnValue, localVarHTTPResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
VmResizePut Resize the VM
|
||||||
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param vmResize The target size for the VM
|
||||||
|
*/
|
||||||
|
func (a *DefaultApiService) VmResizePut(ctx _context.Context, vmResize VmResize) (*_nethttp.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = _nethttp.MethodPut
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/vm.resize"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := _neturl.Values{}
|
||||||
|
localVarFormParams := _neturl.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{"application/json"}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
// body params
|
||||||
|
localVarPostBody = &vmResize
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
VmmPingGet Ping the VMM to check for API server availability
|
VmmPingGet Ping the VMM to check for API server availability
|
||||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@ -17,8 +17,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -157,7 +159,28 @@ func parameterToJson(obj interface{}) (string, error) {
|
|||||||
|
|
||||||
// callAPI do the request.
|
// callAPI do the request.
|
||||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
return c.cfg.HTTPClient.Do(request)
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpRequestOut(request, true)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := c.cfg.HTTPClient.Do(request)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpResponse(resp, true)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChangeBasePath changes base path to allow switching to mocks
|
// ChangeBasePath changes base path to allow switching to mocks
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
package openapi
|
package openapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// contextKeys are used to identify the type of value in the context.
|
// contextKeys are used to identify the type of value in the context.
|
||||||
@ -49,6 +51,20 @@ type APIKey struct {
|
|||||||
Prefix string
|
Prefix string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ServerVariable stores the information about a server variable
|
||||||
|
type ServerVariable struct {
|
||||||
|
Description string
|
||||||
|
DefaultValue string
|
||||||
|
EnumValues []string
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServerConfiguration stores the information about a server
|
||||||
|
type ServerConfiguration struct {
|
||||||
|
Url string
|
||||||
|
Description string
|
||||||
|
Variables map[string]ServerVariable
|
||||||
|
}
|
||||||
|
|
||||||
// Configuration stores the configuration of the API client
|
// Configuration stores the configuration of the API client
|
||||||
type Configuration struct {
|
type Configuration struct {
|
||||||
BasePath string `json:"basePath,omitempty"`
|
BasePath string `json:"basePath,omitempty"`
|
||||||
@ -56,6 +72,8 @@ type Configuration struct {
|
|||||||
Scheme string `json:"scheme,omitempty"`
|
Scheme string `json:"scheme,omitempty"`
|
||||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||||
UserAgent string `json:"userAgent,omitempty"`
|
UserAgent string `json:"userAgent,omitempty"`
|
||||||
|
Debug bool `json:"debug,omitempty"`
|
||||||
|
Servers []ServerConfiguration
|
||||||
HTTPClient *http.Client
|
HTTPClient *http.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,6 +83,12 @@ func NewConfiguration() *Configuration {
|
|||||||
BasePath: "http://localhost/api/v1",
|
BasePath: "http://localhost/api/v1",
|
||||||
DefaultHeader: make(map[string]string),
|
DefaultHeader: make(map[string]string),
|
||||||
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Servers: []ServerConfiguration{{
|
||||||
|
Url: "http://localhost/api/v1",
|
||||||
|
Description: "No description provided",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
@ -73,3 +97,31 @@ func NewConfiguration() *Configuration {
|
|||||||
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||||
c.DefaultHeader[key] = value
|
c.DefaultHeader[key] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ServerUrl returns URL based on server settings
|
||||||
|
func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error) {
|
||||||
|
if index < 0 || len(c.Servers) <= index {
|
||||||
|
return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1)
|
||||||
|
}
|
||||||
|
server := c.Servers[index]
|
||||||
|
url := server.Url
|
||||||
|
|
||||||
|
// go through variables and replace placeholders
|
||||||
|
for name, variable := range server.Variables {
|
||||||
|
if value, ok := variables[name]; ok {
|
||||||
|
found := bool(len(variable.EnumValues) == 0)
|
||||||
|
for _, enumValue := range variable.EnumValues {
|
||||||
|
if value == enumValue {
|
||||||
|
found = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
|
||||||
|
}
|
||||||
|
url = strings.Replace(url, "{"+name+"}", value, -1)
|
||||||
|
} else {
|
||||||
|
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return url, nil
|
||||||
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
# VhostUserConfig
|
# CpusConfig
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Sock** | **string** | |
|
**BootVcpus** | **int32** | | [default to 1]
|
||||||
**NumQueues** | **int32** | |
|
**MaxVcpus** | **int32** | | [default to 1]
|
||||||
**Queuesize** | **int32** | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -13,6 +13,7 @@ Method | HTTP request | Description
|
|||||||
[**ShutdownVM**](DefaultApi.md#ShutdownVM) | **Put** /vm.shutdown | Shut the VM instance down.
|
[**ShutdownVM**](DefaultApi.md#ShutdownVM) | **Put** /vm.shutdown | Shut the VM instance down.
|
||||||
[**ShutdownVMM**](DefaultApi.md#ShutdownVMM) | **Put** /vmm.shutdown | Shuts the cloud-hypervisor VMM.
|
[**ShutdownVMM**](DefaultApi.md#ShutdownVMM) | **Put** /vmm.shutdown | Shuts the cloud-hypervisor VMM.
|
||||||
[**VmInfoGet**](DefaultApi.md#VmInfoGet) | **Get** /vm.info | Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
|
[**VmInfoGet**](DefaultApi.md#VmInfoGet) | **Get** /vm.info | Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
|
||||||
|
[**VmResizePut**](DefaultApi.md#VmResizePut) | **Put** /vm.resize | Resize the VM
|
||||||
[**VmmPingGet**](DefaultApi.md#VmmPingGet) | **Get** /vmm.ping | Ping the VMM to check for API server availability
|
[**VmmPingGet**](DefaultApi.md#VmmPingGet) | **Get** /vmm.ping | Ping the VMM to check for API server availability
|
||||||
|
|
||||||
|
|
||||||
@ -273,6 +274,38 @@ No authorization required
|
|||||||
[[Back to README]](../README.md)
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## VmResizePut
|
||||||
|
|
||||||
|
> VmResizePut(ctx, vmResize)
|
||||||
|
|
||||||
|
Resize the VM
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**vmResize** | [**VmResize**](VmResize.md)| 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]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
## VmmPingGet
|
## VmmPingGet
|
||||||
|
|
||||||
> VmmPingResponse VmmPingGet(ctx, )
|
> VmmPingResponse VmmPingGet(ctx, )
|
||||||
|
@ -6,8 +6,9 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Tag** | **string** | |
|
**Tag** | **string** | |
|
||||||
**Sock** | **string** | |
|
**Sock** | **string** | |
|
||||||
**NumQueues** | **int32** | |
|
**NumQueues** | **int32** | | [optional] [default to 1]
|
||||||
**QueueSize** | **int32** | |
|
**QueueSize** | **int32** | | [optional] [default to 1024]
|
||||||
|
**Dax** | **bool** | | [optional] [default to true]
|
||||||
**CacheSize** | **int64** | | [optional]
|
**CacheSize** | **int64** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Tap** | **string** | | [optional]
|
**Tap** | **string** | | [optional] [default to ]
|
||||||
**Ip** | **string** | |
|
**Ip** | **string** | | [optional] [default to 192.168.249.1]
|
||||||
**Mask** | **string** | |
|
**Mask** | **string** | | [optional] [default to 255.255.255.0]
|
||||||
**Mac** | **string** | |
|
**Mac** | **string** | | [optional]
|
||||||
**Iommu** | **bool** | | [optional] [default to false]
|
**Iommu** | **bool** | | [optional] [default to false]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Wce** | **bool** | |
|
**Sock** | **string** | |
|
||||||
**VuCfg** | [**VhostUserConfig**](VhostUserConfig.md) | |
|
**NumQueues** | **int32** | | [optional] [default to 1]
|
||||||
|
**QueueSize** | **int32** | | [optional] [default to 128]
|
||||||
|
**Wce** | **bool** | | [optional] [default to true]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Mac** | **string** | |
|
**Sock** | **string** | |
|
||||||
**VuCfg** | [**VhostUserConfig**](VhostUserConfig.md) | |
|
**NumQueues** | **int32** | | [optional] [default to 2]
|
||||||
|
**QueueSize** | **int32** | | [optional] [default to 256]
|
||||||
|
**Mac** | **string** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Cpus** | [**CpuConfig**](CpuConfig.md) | | [optional]
|
**Cpus** | [**CpusConfig**](CpusConfig.md) | | [optional]
|
||||||
**Memory** | [**MemoryConfig**](MemoryConfig.md) | | [optional]
|
**Memory** | [**MemoryConfig**](MemoryConfig.md) | | [optional]
|
||||||
**Kernel** | [**KernelConfig**](KernelConfig.md) | |
|
**Kernel** | [**KernelConfig**](KernelConfig.md) | |
|
||||||
**Cmdline** | [**CmdLineConfig**](CmdLineConfig.md) | |
|
**Cmdline** | [**CmdLineConfig**](CmdLineConfig.md) | |
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# CpuConfig
|
# VmResize
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**CpuCount** | **int32** | | [default to 1]
|
**DesiredVcpus** | **int32** | | [default to 1]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
@ -8,9 +8,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package openapi
|
package openapi
|
||||||
// VhostUserConfig struct for VhostUserConfig
|
// CpusConfig struct for CpusConfig
|
||||||
type VhostUserConfig struct {
|
type CpusConfig struct {
|
||||||
Sock string `json:"sock"`
|
BootVcpus int32 `json:"boot_vcpus"`
|
||||||
NumQueues int32 `json:"num_queues"`
|
MaxVcpus int32 `json:"max_vcpus"`
|
||||||
Queuesize int32 `json:"queue:size,omitempty"`
|
|
||||||
}
|
}
|
@ -12,7 +12,8 @@ package openapi
|
|||||||
type FsConfig struct {
|
type FsConfig struct {
|
||||||
Tag string `json:"tag"`
|
Tag string `json:"tag"`
|
||||||
Sock string `json:"sock"`
|
Sock string `json:"sock"`
|
||||||
NumQueues int32 `json:"num_queues"`
|
NumQueues int32 `json:"num_queues,omitempty"`
|
||||||
QueueSize int32 `json:"queue_size"`
|
QueueSize int32 `json:"queue_size,omitempty"`
|
||||||
|
Dax bool `json:"dax,omitempty"`
|
||||||
CacheSize int64 `json:"cache_size,omitempty"`
|
CacheSize int64 `json:"cache_size,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ package openapi
|
|||||||
// NetConfig struct for NetConfig
|
// NetConfig struct for NetConfig
|
||||||
type NetConfig struct {
|
type NetConfig struct {
|
||||||
Tap string `json:"tap,omitempty"`
|
Tap string `json:"tap,omitempty"`
|
||||||
Ip string `json:"ip"`
|
Ip string `json:"ip,omitempty"`
|
||||||
Mask string `json:"mask"`
|
Mask string `json:"mask,omitempty"`
|
||||||
Mac string `json:"mac"`
|
Mac string `json:"mac,omitempty"`
|
||||||
Iommu bool `json:"iommu,omitempty"`
|
Iommu bool `json:"iommu,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
package openapi
|
package openapi
|
||||||
// VhostUserBlkConfig struct for VhostUserBlkConfig
|
// VhostUserBlkConfig struct for VhostUserBlkConfig
|
||||||
type VhostUserBlkConfig struct {
|
type VhostUserBlkConfig struct {
|
||||||
Wce bool `json:"wce"`
|
Sock string `json:"sock"`
|
||||||
VuCfg VhostUserConfig `json:"vu_cfg"`
|
NumQueues int32 `json:"num_queues,omitempty"`
|
||||||
|
QueueSize int32 `json:"queue_size,omitempty"`
|
||||||
|
Wce bool `json:"wce,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
package openapi
|
package openapi
|
||||||
// VhostUserNetConfig struct for VhostUserNetConfig
|
// VhostUserNetConfig struct for VhostUserNetConfig
|
||||||
type VhostUserNetConfig struct {
|
type VhostUserNetConfig struct {
|
||||||
Mac string `json:"mac"`
|
Sock string `json:"sock"`
|
||||||
VuCfg VhostUserConfig `json:"vu_cfg"`
|
NumQueues int32 `json:"num_queues,omitempty"`
|
||||||
|
QueueSize int32 `json:"queue_size,omitempty"`
|
||||||
|
Mac string `json:"mac,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
package openapi
|
package openapi
|
||||||
// VmConfig Virtual machine configuration
|
// VmConfig Virtual machine configuration
|
||||||
type VmConfig struct {
|
type VmConfig struct {
|
||||||
Cpus CpuConfig `json:"cpus,omitempty"`
|
Cpus CpusConfig `json:"cpus,omitempty"`
|
||||||
Memory MemoryConfig `json:"memory,omitempty"`
|
Memory MemoryConfig `json:"memory,omitempty"`
|
||||||
Kernel KernelConfig `json:"kernel"`
|
Kernel KernelConfig `json:"kernel"`
|
||||||
Cmdline CmdLineConfig `json:"cmdline"`
|
Cmdline CmdLineConfig `json:"cmdline"`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package openapi
|
package openapi
|
||||||
// CpuConfig struct for CpuConfig
|
// VmResize struct for VmResize
|
||||||
type CpuConfig struct {
|
type VmResize struct {
|
||||||
CpuCount int32 `json:"cpu_count"`
|
DesiredVcpus int32 `json:"desired_vcpus"`
|
||||||
}
|
}
|
@ -123,6 +123,22 @@ paths:
|
|||||||
405:
|
405:
|
||||||
description: The VM instance could not reboot because it is not booted.
|
description: The VM instance could not reboot because it is not booted.
|
||||||
|
|
||||||
|
/vm.resize:
|
||||||
|
put:
|
||||||
|
summary: Resize the VM
|
||||||
|
requestBody:
|
||||||
|
description: The target size for the VM
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/VmResize'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
204:
|
||||||
|
description: The VM instance was successfully resized.
|
||||||
|
404:
|
||||||
|
description: The VM instance could not be resized because it is not created.
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
|
||||||
@ -155,7 +171,7 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
cpus:
|
cpus:
|
||||||
$ref: '#/components/schemas/CpuConfig'
|
$ref: '#/components/schemas/CpusConfig'
|
||||||
memory:
|
memory:
|
||||||
$ref: '#/components/schemas/MemoryConfig'
|
$ref: '#/components/schemas/MemoryConfig'
|
||||||
kernel:
|
kernel:
|
||||||
@ -205,12 +221,17 @@ components:
|
|||||||
default: false
|
default: false
|
||||||
description: Virtual machine configuration
|
description: Virtual machine configuration
|
||||||
|
|
||||||
CpuConfig:
|
CpusConfig:
|
||||||
required:
|
required:
|
||||||
- cpu_count
|
- boot_vcpus
|
||||||
|
- max_vcpus
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
cpu_count:
|
boot_vcpus:
|
||||||
|
minimum: 1
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
max_vcpus:
|
||||||
minimum: 1
|
minimum: 1
|
||||||
default: 1
|
default: 1
|
||||||
type: integer
|
type: integer
|
||||||
@ -258,18 +279,17 @@ components:
|
|||||||
default: false
|
default: false
|
||||||
|
|
||||||
NetConfig:
|
NetConfig:
|
||||||
required:
|
|
||||||
- ip
|
|
||||||
- mask
|
|
||||||
- mac
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
tap:
|
tap:
|
||||||
type: string
|
type: string
|
||||||
|
default: ""
|
||||||
ip:
|
ip:
|
||||||
type: string
|
type: string
|
||||||
|
default: "192.168.249.1"
|
||||||
mask:
|
mask:
|
||||||
type: string
|
type: string
|
||||||
|
default: "255.255.255.0"
|
||||||
mac:
|
mac:
|
||||||
type: string
|
type: string
|
||||||
iommu:
|
iommu:
|
||||||
@ -292,8 +312,6 @@ components:
|
|||||||
required:
|
required:
|
||||||
- tag
|
- tag
|
||||||
- sock
|
- sock
|
||||||
- num_queues
|
|
||||||
- queue_size
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
tag:
|
tag:
|
||||||
@ -302,11 +320,17 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
num_queues:
|
num_queues:
|
||||||
type: integer
|
type: integer
|
||||||
|
default: 1
|
||||||
queue_size:
|
queue_size:
|
||||||
type: integer
|
type: integer
|
||||||
|
default: 1024
|
||||||
|
dax:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
cache_size:
|
cache_size:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
default: 8589934592
|
||||||
|
|
||||||
PmemConfig:
|
PmemConfig:
|
||||||
required:
|
required:
|
||||||
@ -351,41 +375,38 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
VhostUserConfig:
|
VhostUserNetConfig:
|
||||||
required:
|
required:
|
||||||
- sock
|
- sock
|
||||||
- num_queues
|
|
||||||
- queue_size
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
sock:
|
sock:
|
||||||
type: string
|
type: string
|
||||||
num_queues:
|
num_queues:
|
||||||
type: integer
|
type: integer
|
||||||
queue:size:
|
default: 2
|
||||||
|
queue_size:
|
||||||
type: integer
|
type: integer
|
||||||
|
default: 256
|
||||||
VhostUserNetConfig:
|
|
||||||
required:
|
|
||||||
- mac
|
|
||||||
- vu_cfg
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
mac:
|
mac:
|
||||||
type: string
|
type: string
|
||||||
vu_cfg:
|
|
||||||
$ref: '#/components/schemas/VhostUserConfig'
|
|
||||||
|
|
||||||
VhostUserBlkConfig:
|
VhostUserBlkConfig:
|
||||||
required:
|
required:
|
||||||
- wce
|
- sock
|
||||||
- vu_cfg
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
sock:
|
||||||
|
type: string
|
||||||
|
num_queues:
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
|
queue_size:
|
||||||
|
type: integer
|
||||||
|
default: 128
|
||||||
wce:
|
wce:
|
||||||
type: boolean
|
type: boolean
|
||||||
vu_cfg:
|
default: true
|
||||||
$ref: '#/components/schemas/VhostUserConfig'
|
|
||||||
|
|
||||||
VsockConfig:
|
VsockConfig:
|
||||||
required:
|
required:
|
||||||
@ -404,3 +425,13 @@ components:
|
|||||||
iommu:
|
iommu:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
VmResize:
|
||||||
|
required:
|
||||||
|
- desired_vcpus
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
desired_vcpus:
|
||||||
|
minimum: 1
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
Loading…
Reference in New Issue
Block a user