diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md index 9be309b60b3f..0a40fd332df4 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md @@ -36,6 +36,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**CreateVM**](docs/DefaultApi.md#createvm) | **Put** /vm.create | Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created. *DefaultApi* | [**DeleteVM**](docs/DefaultApi.md#deletevm) | **Put** /vm.delete | Delete the cloud-hypervisor Virtual Machine (VM) instance. *DefaultApi* | [**PauseVM**](docs/DefaultApi.md#pausevm) | **Put** /vm.pause | Pause a previously booted VM instance. +*DefaultApi* | [**PowerButtonVM**](docs/DefaultApi.md#powerbuttonvm) | **Put** /vm.power-button | Trigger a power button in the VM *DefaultApi* | [**RebootVM**](docs/DefaultApi.md#rebootvm) | **Put** /vm.reboot | Reboot the VM instance. *DefaultApi* | [**ResumeVM**](docs/DefaultApi.md#resumevm) | **Put** /vm.resume | Resume a previously paused VM instance. *DefaultApi* | [**ShutdownVM**](docs/DefaultApi.md#shutdownvm) | **Put** /vm.shutdown | Shut the VM instance down. @@ -76,9 +77,11 @@ Class | Method | HTTP request | Description - [NumaDistance](docs/NumaDistance.md) - [PciDeviceInfo](docs/PciDeviceInfo.md) - [PmemConfig](docs/PmemConfig.md) + - [RateLimiterConfig](docs/RateLimiterConfig.md) - [RestoreConfig](docs/RestoreConfig.md) - [RngConfig](docs/RngConfig.md) - [SgxEpcConfig](docs/SgxEpcConfig.md) + - [TokenBucket](docs/TokenBucket.md) - [VmAddDevice](docs/VmAddDevice.md) - [VmConfig](docs/VmConfig.md) - [VmInfo](docs/VmInfo.md) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml index 87a354d4af22..bec5e1a7968b 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml @@ -123,6 +123,18 @@ paths: "405": description: The VM instance could not reboot because it is not booted. summary: Reboot the VM instance. + /vm.power-button: + put: + operationId: power-buttonVM + responses: + "204": + description: Power button successfully triggered in the VM + "404": + description: The button could not be triggered because it is not created + yet + "405": + description: The button could not be triggered because it is not booted. + summary: Trigger a power button in the VM /vm.resize: put: requestBody: @@ -332,7 +344,7 @@ components: VmInfo: description: Virtual Machine information example: - memory_actual_size: 2 + memory_actual_size: 3 state: Created config: console: @@ -340,54 +352,75 @@ components: file: file iommu: false balloon: - size: 4 + size: 9 memory: hugepages: false shared: false + hugepage_size: 4 mergeable: false size: 9 hotplugged_size: 2 zones: - hugepages: false shared: false + hugepage_size: 1 mergeable: false file: file - size: 4 - hotplugged_size: 1 - host_numa_node: 7 + size: 7 + hotplugged_size: 6 + host_numa_node: 1 id: id hotplug_size: 1 - hugepages: false shared: false + hugepage_size: 1 mergeable: false file: file - size: 4 - hotplugged_size: 1 - host_numa_node: 7 + size: 7 + hotplugged_size: 6 + host_numa_node: 1 id: id hotplug_size: 1 hotplug_size: 3 hotplug_method: acpi disks: - path: path - num_queues: 1 + num_queues: 7 readonly: false iommu: false - queue_size: 6 + queue_size: 1 vhost_socket: vhost_socket vhost_user: false direct: false poll_queue: true + rate_limiter_config: + ops: + size: 0 + one_time_burst: 0 + refill_time: 0 + bandwidth: + size: 0 + one_time_burst: 0 + refill_time: 0 id: id - path: path - num_queues: 1 + num_queues: 7 readonly: false iommu: false - queue_size: 6 + queue_size: 1 vhost_socket: vhost_socket vhost_user: false direct: false poll_queue: true + rate_limiter_config: + ops: + size: 0 + one_time_burst: 0 + refill_time: 0 + bandwidth: + size: 0 + one_time_burst: 0 + refill_time: 0 id: id cpus: topology: @@ -409,25 +442,25 @@ components: path: path numa: - distances: - - distance: 1 + - distance: 3 destination: 6 - - distance: 1 + - distance: 3 destination: 6 cpus: - - 3 - - 3 + - 5 + - 5 memory_zones: - memory_zones - memory_zones guest_numa_id: 6 - distances: - - distance: 1 + - distance: 3 destination: 6 - - distance: 1 + - distance: 3 destination: 6 cpus: - - 3 - - 3 + - 5 + - 5 memory_zones: - memory_zones - memory_zones @@ -437,20 +470,20 @@ components: src: /dev/urandom sgx_epc: - prefault: false - size: 9 + size: 6 - prefault: false - size: 9 + size: 6 fs: - - num_queues: 5 - queue_size: 9 - cache_size: 9 + - num_queues: 6 + queue_size: 3 + cache_size: 6 dax: true tag: tag socket: socket id: id - - num_queues: 5 - queue_size: 9 - cache_size: 9 + - num_queues: 6 + queue_size: 3 + cache_size: 6 dax: true tag: tag socket: socket @@ -463,13 +496,13 @@ components: pmem: - mergeable: false file: file - size: 6 + size: 1 iommu: false id: id discard_writes: false - mergeable: false file: file - size: 6 + size: 1 iommu: false id: id discard_writes: false @@ -485,31 +518,37 @@ components: path: path net: - tap: tap - num_queues: 7 + num_queues: 9 iommu: false - queue_size: 1 + queue_size: 6 vhost_socket: vhost_socket vhost_user: false ip: 192.168.249.1 id: id mac: mac + fd: + - 8 + - 8 mask: 255.255.255.0 - tap: tap - num_queues: 7 + num_queues: 9 iommu: false - queue_size: 1 + queue_size: 6 vhost_socket: vhost_socket vhost_user: false ip: 192.168.249.1 id: id mac: mac + fd: + - 8 + - 8 mask: 255.255.255.0 device_tree: key: children: - children - children - pci_bdf: 6 + pci_bdf: 7 resources: - '{}' - '{}' @@ -540,7 +579,7 @@ components: children: - children - children - pci_bdf: 6 + pci_bdf: 7 resources: - '{}' - '{}' @@ -589,54 +628,75 @@ components: file: file iommu: false balloon: - size: 4 + size: 9 memory: hugepages: false shared: false + hugepage_size: 4 mergeable: false size: 9 hotplugged_size: 2 zones: - hugepages: false shared: false + hugepage_size: 1 mergeable: false file: file - size: 4 - hotplugged_size: 1 - host_numa_node: 7 + size: 7 + hotplugged_size: 6 + host_numa_node: 1 id: id hotplug_size: 1 - hugepages: false shared: false + hugepage_size: 1 mergeable: false file: file - size: 4 - hotplugged_size: 1 - host_numa_node: 7 + size: 7 + hotplugged_size: 6 + host_numa_node: 1 id: id hotplug_size: 1 hotplug_size: 3 hotplug_method: acpi disks: - path: path - num_queues: 1 + num_queues: 7 readonly: false iommu: false - queue_size: 6 + queue_size: 1 vhost_socket: vhost_socket vhost_user: false direct: false poll_queue: true + rate_limiter_config: + ops: + size: 0 + one_time_burst: 0 + refill_time: 0 + bandwidth: + size: 0 + one_time_burst: 0 + refill_time: 0 id: id - path: path - num_queues: 1 + num_queues: 7 readonly: false iommu: false - queue_size: 6 + queue_size: 1 vhost_socket: vhost_socket vhost_user: false direct: false poll_queue: true + rate_limiter_config: + ops: + size: 0 + one_time_burst: 0 + refill_time: 0 + bandwidth: + size: 0 + one_time_burst: 0 + refill_time: 0 id: id cpus: topology: @@ -658,25 +718,25 @@ components: path: path numa: - distances: - - distance: 1 + - distance: 3 destination: 6 - - distance: 1 + - distance: 3 destination: 6 cpus: - - 3 - - 3 + - 5 + - 5 memory_zones: - memory_zones - memory_zones guest_numa_id: 6 - distances: - - distance: 1 + - distance: 3 destination: 6 - - distance: 1 + - distance: 3 destination: 6 cpus: - - 3 - - 3 + - 5 + - 5 memory_zones: - memory_zones - memory_zones @@ -686,20 +746,20 @@ components: src: /dev/urandom sgx_epc: - prefault: false - size: 9 + size: 6 - prefault: false - size: 9 + size: 6 fs: - - num_queues: 5 - queue_size: 9 - cache_size: 9 + - num_queues: 6 + queue_size: 3 + cache_size: 6 dax: true tag: tag socket: socket id: id - - num_queues: 5 - queue_size: 9 - cache_size: 9 + - num_queues: 6 + queue_size: 3 + cache_size: 6 dax: true tag: tag socket: socket @@ -712,13 +772,13 @@ components: pmem: - mergeable: false file: file - size: 6 + size: 1 iommu: false id: id discard_writes: false - mergeable: false file: file - size: 6 + size: 1 iommu: false id: id discard_writes: false @@ -734,24 +794,30 @@ components: path: path net: - tap: tap - num_queues: 7 + num_queues: 9 iommu: false - queue_size: 1 + queue_size: 6 vhost_socket: vhost_socket vhost_user: false ip: 192.168.249.1 id: id mac: mac + fd: + - 8 + - 8 mask: 255.255.255.0 - tap: tap - num_queues: 7 + num_queues: 9 iommu: false - queue_size: 1 + queue_size: 6 vhost_socket: vhost_socket vhost_user: false ip: 192.168.249.1 id: id mac: mac + fd: + - 8 + - 8 mask: 255.255.255.0 properties: cpus: @@ -858,11 +924,12 @@ components: example: hugepages: false shared: false + hugepage_size: 1 mergeable: false file: file - size: 4 - hotplugged_size: 1 - host_numa_node: 7 + size: 7 + hotplugged_size: 6 + host_numa_node: 1 id: id hotplug_size: 1 properties: @@ -882,6 +949,9 @@ components: hugepages: default: false type: boolean + hugepage_size: + format: int64 + type: integer host_numa_node: format: int32 type: integer @@ -899,26 +969,29 @@ components: example: hugepages: false shared: false + hugepage_size: 4 mergeable: false size: 9 hotplugged_size: 2 zones: - hugepages: false shared: false + hugepage_size: 1 mergeable: false file: file - size: 4 - hotplugged_size: 1 - host_numa_node: 7 + size: 7 + hotplugged_size: 6 + host_numa_node: 1 id: id hotplug_size: 1 - hugepages: false shared: false + hugepage_size: 1 mergeable: false file: file - size: 4 - hotplugged_size: 1 - host_numa_node: 7 + size: 7 + hotplugged_size: 6 + host_numa_node: 1 id: id hotplug_size: 1 hotplug_size: 3 @@ -945,6 +1018,9 @@ components: hugepages: default: false type: boolean + hugepage_size: + format: int64 + type: integer zones: items: $ref: '#/components/schemas/MemoryZoneConfig' @@ -980,17 +1056,78 @@ components: required: - args type: object + TokenBucket: + description: Defines a token bucket with a maximum capacity (_size_), an initial + burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). + The refill-rate is derived from _size_ and _refill_time_, and it is the constant + rate at which the tokens replenish. The refill process only starts happening + after the initial burst budget is consumed. Consumption from the token bucket + is unbounded in speed which allows for bursts bound in size by the amount + of tokens available. Once the token bucket is empty, consumption speed is + bound by the refill-rate. + example: + size: 0 + one_time_burst: 0 + refill_time: 0 + properties: + size: + description: The total number of tokens this bucket can hold. + format: int64 + minimum: 0 + type: integer + one_time_burst: + description: The initial size of a token bucket. + format: int64 + minimum: 0 + type: integer + refill_time: + description: The amount of milliseconds it takes for the bucket to refill. + format: int64 + minimum: 0 + type: integer + required: + - refill_time + - size + type: object + RateLimiterConfig: + description: Defines an IO rate limiter with independent bytes/s and ops/s limits. + Limits are defined by configuring each of the _bandwidth_ and _ops_ token + buckets. + example: + ops: + size: 0 + one_time_burst: 0 + refill_time: 0 + bandwidth: + size: 0 + one_time_burst: 0 + refill_time: 0 + properties: + bandwidth: + $ref: '#/components/schemas/TokenBucket' + ops: + $ref: '#/components/schemas/TokenBucket' + type: object DiskConfig: example: path: path - num_queues: 1 + num_queues: 7 readonly: false iommu: false - queue_size: 6 + queue_size: 1 vhost_socket: vhost_socket vhost_user: false direct: false poll_queue: true + rate_limiter_config: + ops: + size: 0 + one_time_burst: 0 + refill_time: 0 + bandwidth: + size: 0 + one_time_burst: 0 + refill_time: 0 id: id properties: path: @@ -1018,6 +1155,8 @@ components: poll_queue: default: true type: boolean + rate_limiter_config: + $ref: '#/components/schemas/RateLimiterConfig' id: type: string required: @@ -1026,14 +1165,17 @@ components: NetConfig: example: tap: tap - num_queues: 7 + num_queues: 9 iommu: false - queue_size: 1 + queue_size: 6 vhost_socket: vhost_socket vhost_user: false ip: 192.168.249.1 id: id mac: mac + fd: + - 8 + - 8 mask: 255.255.255.0 properties: tap: @@ -1063,6 +1205,11 @@ components: type: string id: type: string + fd: + items: + format: int32 + type: integer + type: array type: object RngConfig: example: @@ -1080,7 +1227,7 @@ components: type: object BalloonConfig: example: - size: 4 + size: 9 properties: size: format: int64 @@ -1090,9 +1237,9 @@ components: type: object FsConfig: example: - num_queues: 5 - queue_size: 9 - cache_size: 9 + num_queues: 6 + queue_size: 3 + cache_size: 6 dax: true tag: tag socket: socket @@ -1128,7 +1275,7 @@ components: example: mergeable: false file: file - size: 6 + size: 1 iommu: false id: id discard_writes: false @@ -1163,6 +1310,7 @@ components: mode: enum: - "false" + - Pty - Tty - File - null @@ -1216,7 +1364,7 @@ components: SgxEpcConfig: example: prefault: false - size: 9 + size: 6 properties: size: format: int64 @@ -1229,7 +1377,7 @@ components: type: object NumaDistance: example: - distance: 1 + distance: 3 destination: 6 properties: destination: @@ -1245,13 +1393,13 @@ components: NumaConfig: example: distances: - - distance: 1 + - distance: 3 destination: 6 - - distance: 1 + - distance: 3 destination: 6 cpus: - - 3 - - 3 + - 5 + - 5 memory_zones: - memory_zones - memory_zones diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api_default.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api_default.go index 216e03e55b43..77cc2cca0525 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api_default.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api_default.go @@ -279,6 +279,69 @@ func (a *DefaultApiService) PauseVM(ctx _context.Context) (*_nethttp.Response, e return localVarHTTPResponse, nil } +/* +PowerButtonVM Trigger a power button in the VM + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +*/ +func (a *DefaultApiService) PowerButtonVM(ctx _context.Context) (*_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.power-button" + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // 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 + } + 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 +} + /* RebootVM Reboot the VM instance. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go index ece0784d892d..b435e963f285 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go @@ -157,12 +157,13 @@ func parameterToJson(obj interface{}) (string, error) { return string(jsonBuf), err } + // callAPI do the request. func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) + dump, err := httputil.DumpRequestOut(request, true) if err != nil { - return nil, err + return nil, err } log.Printf("\n%s\n", string(dump)) } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/configuration.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/configuration.go index 4dd597fcc59a..57ccf85697a7 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/configuration.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/configuration.go @@ -37,6 +37,7 @@ var ( // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") + ) // BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth @@ -51,6 +52,7 @@ type APIKey struct { Prefix string } + // ServerVariable stores the information about a server variable type ServerVariable struct { Description string @@ -60,9 +62,9 @@ type ServerVariable struct { // ServerConfiguration stores the information about a server type ServerConfiguration struct { - Url string + Url string Description string - Variables map[string]ServerVariable + Variables map[string]ServerVariable } // Configuration stores the configuration of the API client @@ -84,9 +86,9 @@ func NewConfiguration() *Configuration { DefaultHeader: make(map[string]string), UserAgent: "OpenAPI-Generator/1.0.0/go", Debug: false, - Servers: []ServerConfiguration{ + Servers: []ServerConfiguration{ { - Url: "http://localhost/api/v1", + Url: "http://localhost/api/v1", Description: "No description provided", }, }, @@ -102,7 +104,7 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { // 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) + return "", fmt.Errorf("Index %v out of range %v", index, len(c.Servers) - 1) } server := c.Servers[index] url := server.Url diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DefaultApi.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DefaultApi.md index e84fcf38af67..8f95b4b0e51e 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DefaultApi.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DefaultApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**CreateVM**](DefaultApi.md#CreateVM) | **Put** /vm.create | Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created. [**DeleteVM**](DefaultApi.md#DeleteVM) | **Put** /vm.delete | Delete the cloud-hypervisor Virtual Machine (VM) instance. [**PauseVM**](DefaultApi.md#PauseVM) | **Put** /vm.pause | Pause a previously booted VM instance. +[**PowerButtonVM**](DefaultApi.md#PowerButtonVM) | **Put** /vm.power-button | Trigger a power button in the VM [**RebootVM**](DefaultApi.md#RebootVM) | **Put** /vm.reboot | Reboot the VM instance. [**ResumeVM**](DefaultApi.md#ResumeVM) | **Put** /vm.resume | Resume a previously paused VM instance. [**ShutdownVM**](DefaultApi.md#ShutdownVM) | **Put** /vm.shutdown | Shut the VM instance down. @@ -145,6 +146,34 @@ No authorization required [[Back to README]](../README.md) +## PowerButtonVM + +> PowerButtonVM(ctx, ) + +Trigger a power button in the VM + +### Required Parameters + +This endpoint does not need any parameter. + +### 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]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## RebootVM > RebootVM(ctx, ) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DiskConfig.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DiskConfig.md index db7a7441a0f6..540a11ea53f1 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DiskConfig.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DiskConfig.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **VhostUser** | **bool** | | [optional] [default to false] **VhostSocket** | **string** | | [optional] **PollQueue** | **bool** | | [optional] [default to true] +**RateLimiterConfig** | [**RateLimiterConfig**](RateLimiterConfig.md) | | [optional] **Id** | **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) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryConfig.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryConfig.md index f692554a67d3..07c8a380f2ef 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryConfig.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryConfig.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **HotplugMethod** | **string** | | [optional] [default to acpi] **Shared** | **bool** | | [optional] [default to false] **Hugepages** | **bool** | | [optional] [default to false] +**HugepageSize** | **int64** | | [optional] **Zones** | [**[]MemoryZoneConfig**](MemoryZoneConfig.md) | | [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) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryZoneConfig.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryZoneConfig.md index ad1393defe50..9a62777a4698 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryZoneConfig.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/MemoryZoneConfig.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **Mergeable** | **bool** | | [optional] [default to false] **Shared** | **bool** | | [optional] [default to false] **Hugepages** | **bool** | | [optional] [default to false] +**HugepageSize** | **int64** | | [optional] **HostNumaNode** | **int32** | | [optional] **HotplugSize** | **int64** | | [optional] **HotpluggedSize** | **int64** | | [optional] diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/NetConfig.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/NetConfig.md index ef0fc9df9e85..4d1cece7ed8c 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/NetConfig.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/NetConfig.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **VhostUser** | **bool** | | [optional] [default to false] **VhostSocket** | **string** | | [optional] **Id** | **string** | | [optional] +**Fd** | **[]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) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/RateLimiterConfig.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/RateLimiterConfig.md new file mode 100644 index 000000000000..16dda7ca1906 --- /dev/null +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/RateLimiterConfig.md @@ -0,0 +1,12 @@ +# RateLimiterConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bandwidth** | [**TokenBucket**](TokenBucket.md) | | [optional] +**Ops** | [**TokenBucket**](TokenBucket.md) | | [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) + + diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/TokenBucket.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/TokenBucket.md new file mode 100644 index 000000000000..e754fa771ab3 --- /dev/null +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/TokenBucket.md @@ -0,0 +1,13 @@ +# TokenBucket + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Size** | **int64** | The total number of tokens this bucket can hold. | +**OneTimeBurst** | **int64** | The initial size of a token bucket. | [optional] +**RefillTime** | **int64** | The amount of milliseconds it takes for the bucket to refill. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_balloon_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_balloon_config.go index 96de345d35e2..999f669de44a 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_balloon_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_balloon_config.go @@ -8,7 +8,6 @@ */ package openapi - // BalloonConfig struct for BalloonConfig type BalloonConfig struct { Size int64 `json:"size"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cmd_line_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cmd_line_config.go index e924de7118f5..62d23ce3fb05 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cmd_line_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cmd_line_config.go @@ -8,7 +8,6 @@ */ package openapi - // CmdLineConfig struct for CmdLineConfig type CmdLineConfig struct { Args string `json:"args"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_console_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_console_config.go index 6de0c247a31c..af23bcf48ec1 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_console_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_console_config.go @@ -8,10 +8,9 @@ */ package openapi - // ConsoleConfig struct for ConsoleConfig type ConsoleConfig struct { - File string `json:"file,omitempty"` - Mode string `json:"mode"` - Iommu bool `json:"iommu,omitempty"` + File string `json:"file,omitempty"` + Mode string `json:"mode"` + Iommu bool `json:"iommu,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_topology.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_topology.go index 110801dbdc75..3c8bf4b0d361 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_topology.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_topology.go @@ -8,11 +8,10 @@ */ package openapi - // CpuTopology struct for CpuTopology type CpuTopology struct { ThreadsPerCore int32 `json:"threads_per_core,omitempty"` - CoresPerDie int32 `json:"cores_per_die,omitempty"` + CoresPerDie int32 `json:"cores_per_die,omitempty"` DiesPerPackage int32 `json:"dies_per_package,omitempty"` - Packages int32 `json:"packages,omitempty"` + Packages int32 `json:"packages,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpus_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpus_config.go index b67daeec04d2..6bf2245cf72a 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpus_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpus_config.go @@ -8,11 +8,10 @@ */ package openapi - // CpusConfig struct for CpusConfig type CpusConfig struct { - BootVcpus int32 `json:"boot_vcpus"` - MaxVcpus int32 `json:"max_vcpus"` - Topology CpuTopology `json:"topology,omitempty"` - MaxPhysBits int32 `json:"max_phys_bits,omitempty"` + BootVcpus int32 `json:"boot_vcpus"` + MaxVcpus int32 `json:"max_vcpus"` + Topology CpuTopology `json:"topology,omitempty"` + MaxPhysBits int32 `json:"max_phys_bits,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_config.go index a1e283633148..d0fa7d6e1a96 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_config.go @@ -8,10 +8,9 @@ */ package openapi - // DeviceConfig struct for DeviceConfig type DeviceConfig struct { - Path string `json:"path"` - Iommu bool `json:"iommu,omitempty"` - Id string `json:"id,omitempty"` + Path string `json:"path"` + Iommu bool `json:"iommu,omitempty"` + Id string `json:"id,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_node.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_node.go index bb49a9fcc09d..f584d9a3f905 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_node.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_node.go @@ -8,11 +8,10 @@ */ package openapi - // DeviceNode struct for DeviceNode type DeviceNode struct { - Id string `json:"id,omitempty"` + Id string `json:"id,omitempty"` Resources []map[string]interface{} `json:"resources,omitempty"` - Children []string `json:"children,omitempty"` - PciBdf int32 `json:"pci_bdf,omitempty"` + Children []string `json:"children,omitempty"` + PciBdf int32 `json:"pci_bdf,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_disk_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_disk_config.go index 7c1da3ce5435..5df23de77bf0 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_disk_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_disk_config.go @@ -8,17 +8,17 @@ */ package openapi - // DiskConfig struct for DiskConfig type DiskConfig struct { - Path string `json:"path"` - Readonly bool `json:"readonly,omitempty"` - Direct bool `json:"direct,omitempty"` - Iommu bool `json:"iommu,omitempty"` - NumQueues int32 `json:"num_queues,omitempty"` - QueueSize int32 `json:"queue_size,omitempty"` - VhostUser bool `json:"vhost_user,omitempty"` + Path string `json:"path"` + Readonly bool `json:"readonly,omitempty"` + Direct bool `json:"direct,omitempty"` + Iommu bool `json:"iommu,omitempty"` + NumQueues int32 `json:"num_queues,omitempty"` + QueueSize int32 `json:"queue_size,omitempty"` + VhostUser bool `json:"vhost_user,omitempty"` VhostSocket string `json:"vhost_socket,omitempty"` - PollQueue bool `json:"poll_queue,omitempty"` - Id string `json:"id,omitempty"` + PollQueue bool `json:"poll_queue,omitempty"` + RateLimiterConfig RateLimiterConfig `json:"rate_limiter_config,omitempty"` + Id string `json:"id,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_fs_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_fs_config.go index a5ea4f446dae..6b1ccb864451 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_fs_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_fs_config.go @@ -8,14 +8,13 @@ */ package openapi - // FsConfig struct for FsConfig type FsConfig struct { - Tag string `json:"tag"` - Socket string `json:"socket"` - NumQueues int32 `json:"num_queues"` - QueueSize int32 `json:"queue_size"` - Dax bool `json:"dax"` - CacheSize int64 `json:"cache_size"` - Id string `json:"id,omitempty"` + Tag string `json:"tag"` + Socket string `json:"socket"` + NumQueues int32 `json:"num_queues"` + QueueSize int32 `json:"queue_size"` + Dax bool `json:"dax"` + CacheSize int64 `json:"cache_size"` + Id string `json:"id,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_initramfs_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_initramfs_config.go index 9b335569ba28..3b361c126808 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_initramfs_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_initramfs_config.go @@ -8,7 +8,6 @@ */ package openapi - // InitramfsConfig struct for InitramfsConfig type InitramfsConfig struct { Path string `json:"path"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_kernel_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_kernel_config.go index fe1285214226..ce35f47f6baf 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_kernel_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_kernel_config.go @@ -8,7 +8,6 @@ */ package openapi - // KernelConfig struct for KernelConfig type KernelConfig struct { Path string `json:"path"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_config.go index 86408200b8ba..8aedcd1450b8 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_config.go @@ -8,15 +8,15 @@ */ package openapi - // MemoryConfig struct for MemoryConfig type MemoryConfig struct { - Size int64 `json:"size"` - HotplugSize int64 `json:"hotplug_size,omitempty"` - HotpluggedSize int64 `json:"hotplugged_size,omitempty"` - Mergeable bool `json:"mergeable,omitempty"` - HotplugMethod string `json:"hotplug_method,omitempty"` - Shared bool `json:"shared,omitempty"` - Hugepages bool `json:"hugepages,omitempty"` - Zones []MemoryZoneConfig `json:"zones,omitempty"` + Size int64 `json:"size"` + HotplugSize int64 `json:"hotplug_size,omitempty"` + HotpluggedSize int64 `json:"hotplugged_size,omitempty"` + Mergeable bool `json:"mergeable,omitempty"` + HotplugMethod string `json:"hotplug_method,omitempty"` + Shared bool `json:"shared,omitempty"` + Hugepages bool `json:"hugepages,omitempty"` + HugepageSize int64 `json:"hugepage_size,omitempty"` + Zones []MemoryZoneConfig `json:"zones,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_zone_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_zone_config.go index 8ded3360be5c..26e191a480f3 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_zone_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_zone_config.go @@ -8,16 +8,16 @@ */ package openapi - // MemoryZoneConfig struct for MemoryZoneConfig type MemoryZoneConfig struct { - Id string `json:"id"` - Size int64 `json:"size"` - File string `json:"file,omitempty"` - Mergeable bool `json:"mergeable,omitempty"` - Shared bool `json:"shared,omitempty"` - Hugepages bool `json:"hugepages,omitempty"` - HostNumaNode int32 `json:"host_numa_node,omitempty"` - HotplugSize int64 `json:"hotplug_size,omitempty"` - HotpluggedSize int64 `json:"hotplugged_size,omitempty"` + Id string `json:"id"` + Size int64 `json:"size"` + File string `json:"file,omitempty"` + Mergeable bool `json:"mergeable,omitempty"` + Shared bool `json:"shared,omitempty"` + Hugepages bool `json:"hugepages,omitempty"` + HugepageSize int64 `json:"hugepage_size,omitempty"` + HostNumaNode int32 `json:"host_numa_node,omitempty"` + HotplugSize int64 `json:"hotplug_size,omitempty"` + HotpluggedSize int64 `json:"hotplugged_size,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_net_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_net_config.go index c9d2da688cb2..cb3618333494 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_net_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_net_config.go @@ -8,17 +8,17 @@ */ package openapi - // NetConfig struct for NetConfig type NetConfig struct { - Tap string `json:"tap,omitempty"` - Ip string `json:"ip,omitempty"` - Mask string `json:"mask,omitempty"` - Mac string `json:"mac,omitempty"` - Iommu bool `json:"iommu,omitempty"` - NumQueues int32 `json:"num_queues,omitempty"` - QueueSize int32 `json:"queue_size,omitempty"` - VhostUser bool `json:"vhost_user,omitempty"` + Tap string `json:"tap,omitempty"` + Ip string `json:"ip,omitempty"` + Mask string `json:"mask,omitempty"` + Mac string `json:"mac,omitempty"` + Iommu bool `json:"iommu,omitempty"` + NumQueues int32 `json:"num_queues,omitempty"` + QueueSize int32 `json:"queue_size,omitempty"` + VhostUser bool `json:"vhost_user,omitempty"` VhostSocket string `json:"vhost_socket,omitempty"` - Id string `json:"id,omitempty"` + Id string `json:"id,omitempty"` + Fd []int32 `json:"fd,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_config.go index e4e247d6296e..378b92fd447d 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_config.go @@ -8,11 +8,10 @@ */ package openapi - // NumaConfig struct for NumaConfig type NumaConfig struct { - GuestNumaId int32 `json:"guest_numa_id"` - Cpus []int32 `json:"cpus,omitempty"` - Distances []NumaDistance `json:"distances,omitempty"` - MemoryZones []string `json:"memory_zones,omitempty"` + GuestNumaId int32 `json:"guest_numa_id"` + Cpus []int32 `json:"cpus,omitempty"` + Distances []NumaDistance `json:"distances,omitempty"` + MemoryZones []string `json:"memory_zones,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_distance.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_distance.go index 1f4f3560cea6..4b96816970a5 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_distance.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_numa_distance.go @@ -8,9 +8,8 @@ */ package openapi - // NumaDistance struct for NumaDistance type NumaDistance struct { Destination int32 `json:"destination"` - Distance int32 `json:"distance"` + Distance int32 `json:"distance"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pci_device_info.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pci_device_info.go index 47b3302e6329..308386207d33 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pci_device_info.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pci_device_info.go @@ -8,9 +8,8 @@ */ package openapi - // PciDeviceInfo Information about a PCI device type PciDeviceInfo struct { - Id string `json:"id"` + Id string `json:"id"` Bdf string `json:"bdf"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pmem_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pmem_config.go index 85cac5564f0d..600238f83668 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pmem_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_pmem_config.go @@ -8,13 +8,12 @@ */ package openapi - // PmemConfig struct for PmemConfig type PmemConfig struct { - File string `json:"file"` - Size int64 `json:"size,omitempty"` - Iommu bool `json:"iommu,omitempty"` - Mergeable bool `json:"mergeable,omitempty"` - DiscardWrites bool `json:"discard_writes,omitempty"` - Id string `json:"id,omitempty"` + File string `json:"file"` + Size int64 `json:"size,omitempty"` + Iommu bool `json:"iommu,omitempty"` + Mergeable bool `json:"mergeable,omitempty"` + DiscardWrites bool `json:"discard_writes,omitempty"` + Id string `json:"id,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rate_limiter_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rate_limiter_config.go new file mode 100644 index 000000000000..23960ac14edf --- /dev/null +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rate_limiter_config.go @@ -0,0 +1,15 @@ +/* + * Cloud Hypervisor API + * + * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine. + * + * API version: 0.3.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// RateLimiterConfig Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets. +type RateLimiterConfig struct { + Bandwidth TokenBucket `json:"bandwidth,omitempty"` + Ops TokenBucket `json:"ops,omitempty"` +} diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_restore_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_restore_config.go index 490a34d60f6f..713cf1b3c3c7 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_restore_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_restore_config.go @@ -8,9 +8,8 @@ */ package openapi - // RestoreConfig struct for RestoreConfig type RestoreConfig struct { SourceUrl string `json:"source_url"` - Prefault bool `json:"prefault,omitempty"` + Prefault bool `json:"prefault,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rng_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rng_config.go index 2bd1c15875b8..3a928cd2a8d8 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rng_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rng_config.go @@ -8,9 +8,8 @@ */ package openapi - // RngConfig struct for RngConfig type RngConfig struct { - Src string `json:"src"` - Iommu bool `json:"iommu,omitempty"` + Src string `json:"src"` + Iommu bool `json:"iommu,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_sgx_epc_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_sgx_epc_config.go index a0562558f92d..692122c387c6 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_sgx_epc_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_sgx_epc_config.go @@ -8,9 +8,8 @@ */ package openapi - // SgxEpcConfig struct for SgxEpcConfig type SgxEpcConfig struct { - Size int64 `json:"size"` - Prefault bool `json:"prefault,omitempty"` + Size int64 `json:"size"` + Prefault bool `json:"prefault,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_token_bucket.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_token_bucket.go new file mode 100644 index 000000000000..de35273744d1 --- /dev/null +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_token_bucket.go @@ -0,0 +1,19 @@ +/* + * Cloud Hypervisor API + * + * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine. + * + * API version: 0.3.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TokenBucket Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate. +type TokenBucket struct { + // The total number of tokens this bucket can hold. + Size int64 `json:"size"` + // The initial size of a token bucket. + OneTimeBurst int64 `json:"one_time_burst,omitempty"` + // The amount of milliseconds it takes for the bucket to refill. + RefillTime int64 `json:"refill_time"` +} diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_add_device.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_add_device.go index 749bbf139c8d..f644fa60a23d 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_add_device.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_add_device.go @@ -8,10 +8,9 @@ */ package openapi - // VmAddDevice struct for VmAddDevice type VmAddDevice struct { - Path string `json:"path,omitempty"` - Iommu bool `json:"iommu,omitempty"` - Id string `json:"id,omitempty"` + Path string `json:"path,omitempty"` + Iommu bool `json:"iommu,omitempty"` + Id string `json:"id,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_config.go index 7c8f09b396db..158ef3b2fe08 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_config.go @@ -8,26 +8,25 @@ */ package openapi - // VmConfig Virtual machine configuration type VmConfig struct { - Cpus CpusConfig `json:"cpus,omitempty"` - Memory MemoryConfig `json:"memory,omitempty"` - Kernel KernelConfig `json:"kernel"` + Cpus CpusConfig `json:"cpus,omitempty"` + Memory MemoryConfig `json:"memory,omitempty"` + Kernel KernelConfig `json:"kernel"` Initramfs *InitramfsConfig `json:"initramfs,omitempty"` - Cmdline CmdLineConfig `json:"cmdline,omitempty"` - Disks []DiskConfig `json:"disks,omitempty"` - Net []NetConfig `json:"net,omitempty"` - Rng RngConfig `json:"rng,omitempty"` - Balloon BalloonConfig `json:"balloon,omitempty"` - Fs []FsConfig `json:"fs,omitempty"` - Pmem []PmemConfig `json:"pmem,omitempty"` - Serial ConsoleConfig `json:"serial,omitempty"` - Console ConsoleConfig `json:"console,omitempty"` - Devices []DeviceConfig `json:"devices,omitempty"` - Vsock VsockConfig `json:"vsock,omitempty"` - SgxEpc []SgxEpcConfig `json:"sgx_epc,omitempty"` - Numa []NumaConfig `json:"numa,omitempty"` - Iommu bool `json:"iommu,omitempty"` - Watchdog bool `json:"watchdog,omitempty"` + Cmdline CmdLineConfig `json:"cmdline,omitempty"` + Disks []DiskConfig `json:"disks,omitempty"` + Net []NetConfig `json:"net,omitempty"` + Rng RngConfig `json:"rng,omitempty"` + Balloon BalloonConfig `json:"balloon,omitempty"` + Fs []FsConfig `json:"fs,omitempty"` + Pmem []PmemConfig `json:"pmem,omitempty"` + Serial ConsoleConfig `json:"serial,omitempty"` + Console ConsoleConfig `json:"console,omitempty"` + Devices []DeviceConfig `json:"devices,omitempty"` + Vsock VsockConfig `json:"vsock,omitempty"` + SgxEpc []SgxEpcConfig `json:"sgx_epc,omitempty"` + Numa []NumaConfig `json:"numa,omitempty"` + Iommu bool `json:"iommu,omitempty"` + Watchdog bool `json:"watchdog,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go index 83a0159c87a0..0f1597286b73 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go @@ -8,11 +8,10 @@ */ package openapi - // VmInfo Virtual Machine information type VmInfo struct { - Config VmConfig `json:"config"` - State string `json:"state"` - MemoryActualSize int64 `json:"memory_actual_size,omitempty"` - DeviceTree map[string]DeviceNode `json:"device_tree,omitempty"` + Config VmConfig `json:"config"` + State string `json:"state"` + MemoryActualSize int64 `json:"memory_actual_size,omitempty"` + DeviceTree map[string]DeviceNode `json:"device_tree,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_remove_device.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_remove_device.go index 65bab16fc375..4a0cb6cf2c1a 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_remove_device.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_remove_device.go @@ -8,7 +8,6 @@ */ package openapi - // VmRemoveDevice struct for VmRemoveDevice type VmRemoveDevice struct { Id string `json:"id,omitempty"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize.go index 4e60fbfa4a04..492b00a500ae 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize.go @@ -8,7 +8,6 @@ */ package openapi - // VmResize struct for VmResize type VmResize struct { DesiredVcpus int32 `json:"desired_vcpus,omitempty"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize_zone.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize_zone.go index aac120760463..c86e02f0ff11 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize_zone.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_resize_zone.go @@ -8,7 +8,6 @@ */ package openapi - // VmResizeZone struct for VmResizeZone type VmResizeZone struct { Id string `json:"id,omitempty"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_snapshot_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_snapshot_config.go index 58d848792cde..b029fff39201 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_snapshot_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_snapshot_config.go @@ -8,7 +8,6 @@ */ package openapi - // VmSnapshotConfig struct for VmSnapshotConfig type VmSnapshotConfig struct { DestinationUrl string `json:"destination_url,omitempty"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vmm_ping_response.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vmm_ping_response.go index abbcf0346450..4ab8cf1c1bd3 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vmm_ping_response.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vmm_ping_response.go @@ -8,7 +8,6 @@ */ package openapi - // VmmPingResponse Virtual Machine Monitor information type VmmPingResponse struct { Version string `json:"version"` diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vsock_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vsock_config.go index 98745fa77bb5..2fed17461a25 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vsock_config.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vsock_config.go @@ -8,13 +8,12 @@ */ package openapi - // VsockConfig struct for VsockConfig type VsockConfig struct { // Guest Vsock CID Cid int64 `json:"cid"` // Path to UNIX domain socket, used to proxy vsock connections. Socket string `json:"socket"` - Iommu bool `json:"iommu,omitempty"` - Id string `json:"id,omitempty"` + Iommu bool `json:"iommu,omitempty"` + Id string `json:"id,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml b/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml index dbadba734a5e..d1f344b15f55 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml @@ -134,6 +134,18 @@ paths: 405: description: The VM instance could not reboot because it is not booted. + /vm.power-button: + put: + summary: Trigger a power button in the VM + operationId: power-buttonVM + responses: + 204: + description: Power button successfully triggered in the VM + 404: + description: The button could not be triggered because it is not created yet + 405: + description: The button could not be triggered because it is not booted. + /vm.resize: put: summary: Resize the VM @@ -386,7 +398,7 @@ components: pci_bdf: type: integer format: int32 - + VmCounters: type: object additionalProperties: @@ -522,6 +534,9 @@ components: hugepages: type: boolean default: false + hugepage_size: + type: integer + format: int64 host_numa_node: type: integer format: int32 @@ -559,6 +574,9 @@ components: hugepages: type: boolean default: false + hugepage_size: + type: integer + format: int64 zones: type: array items: @@ -589,6 +607,48 @@ components: args: type: string + TokenBucket: + required: + - size + - refill_time + type: object + properties: + size: + type: integer + format: int64 + minimum: 0 + description: The total number of tokens this bucket can hold. + one_time_burst: + type: integer + format: int64 + minimum: 0 + description: The initial size of a token bucket. + refill_time: + type: integer + format: int64 + minimum: 0 + description: The amount of milliseconds it takes for the bucket to refill. + description: + Defines a token bucket with a maximum capacity (_size_), an initial burst size + (_one_time_burst_) and an interval for refilling purposes (_refill_time_). + The refill-rate is derived from _size_ and _refill_time_, and it is the constant + rate at which the tokens replenish. The refill process only starts happening after + the initial burst budget is consumed. + Consumption from the token bucket is unbounded in speed which allows for bursts + bound in size by the amount of tokens available. + Once the token bucket is empty, consumption speed is bound by the refill-rate. + + RateLimiterConfig: + type: object + properties: + bandwidth: + $ref: '#/components/schemas/TokenBucket' + ops: + $ref: '#/components/schemas/TokenBucket' + description: + Defines an IO rate limiter with independent bytes/s and ops/s limits. + Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets. + DiskConfig: required: - path @@ -619,6 +679,8 @@ components: poll_queue: type: boolean default: true + rate_limiter_config: + $ref: '#/components/schemas/RateLimiterConfig' id: type: string @@ -652,6 +714,11 @@ components: type: string id: type: string + fd: + type: array + items: + type: integer + format: int32 RngConfig: required: @@ -735,7 +802,7 @@ components: type: string mode: type: string - enum: [Off, Tty, File, Null] + enum: [Off, Pty, Tty, File, Null] iommu: type: boolean default: false diff --git a/versions.yaml b/versions.yaml index f351fd7cff82..47eb125e9f17 100644 --- a/versions.yaml +++ b/versions.yaml @@ -75,7 +75,7 @@ assets: url: "https://github.com/cloud-hypervisor/cloud-hypervisor" uscan-url: >- https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz - version: "v0.12.0" + version: "v0.14.1" firecracker: description: "Firecracker micro-VMM"