From ec0424e1538658a6dc8d08189e7d3f5f34dea880 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Wed, 31 Mar 2021 11:06:49 -0700 Subject: [PATCH 1/3] versions: Update cloud-hypervisor to release v0.14.1 Highlights for cloud-hypervisor version 0.14.0 include: 1) Structured event monitoring; 2) MSHV improvements; 3) Improved aarch64 platform; 4) Updated hotplug documentation; 6) PTY control for serial and virtio-console; 7) Block device rate limiting; 8) Plan to deprecate the support of "LinuxBoot" protocol and support PVH protocol only. Highlights for cloud-hypervisor version 0.13.0 include: 1) Wider VFIO device support; 2) Improve huge page support; 3) MACvTAP support; 4) VHD disk image support; 5) Improved Virtio device threading; 6) Clean shutdown support via synthetic power button. Details can be found: https://github.com/cloud-hypervisor/cloud-hypervisor/releases Note: The client code of cloud-hypervisor's OpenAPI is automatically generated by `openapi-generator` [1-2]. As the API changes do not impact usages in Kata, no additional changes in kata's runtime are needed to work with the latest version of cloud-hypervisor. [1] https://github.com/OpenAPITools/openapi-generator [2] https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/pkg/cloud-hypervisor/README.md Fixes: #1591 Signed-off-by: Bo Chen (cherry picked from commit 84b62dc3b1b68b65c089f9c0cd60cfdb8b92dd34) --- .../pkg/cloud-hypervisor/client/README.md | 3 + .../cloud-hypervisor/client/api/openapi.yaml | 334 +++++++++++++----- .../cloud-hypervisor/client/api_default.go | 63 ++++ .../client/docs/DefaultApi.md | 29 ++ .../client/docs/DiskConfig.md | 1 + .../client/docs/MemoryConfig.md | 1 + .../client/docs/MemoryZoneConfig.md | 1 + .../cloud-hypervisor/client/docs/NetConfig.md | 1 + .../client/docs/RateLimiterConfig.md | 12 + .../client/docs/TokenBucket.md | 13 + .../client/model_disk_config.go | 1 + .../client/model_memory_config.go | 1 + .../client/model_memory_zone_config.go | 1 + .../client/model_net_config.go | 1 + .../client/model_rate_limiter_config.go | 15 + .../client/model_token_bucket.go | 19 + .../cloud-hypervisor/cloud-hypervisor.yaml | 71 +++- versions.yaml | 2 +- 18 files changed, 473 insertions(+), 96 deletions(-) create mode 100644 src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/RateLimiterConfig.md create mode 100644 src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/TokenBucket.md create mode 100644 src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_rate_limiter_config.go create mode 100644 src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_token_bucket.go diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md index 9be309b60..0a40fd332 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 87a354d4a..bec5e1a79 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 216e03e55..77cc2cca0 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/docs/DefaultApi.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DefaultApi.md index e84fcf38a..8f95b4b0e 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 db7a7441a..540a11ea5 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 f692554a6..07c8a380f 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 ad1393def..9a62777a4 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 ef0fc9df9..4d1cece7e 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 000000000..16dda7ca1 --- /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 000000000..e754fa771 --- /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_disk_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_disk_config.go index 24bf8c11e..5df23de77 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 @@ -19,5 +19,6 @@ type DiskConfig struct { VhostUser bool `json:"vhost_user,omitempty"` VhostSocket string `json:"vhost_socket,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_memory_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_memory_config.go index 126a8ea6a..8aedcd145 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 @@ -17,5 +17,6 @@ type MemoryConfig struct { 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 aacd71833..26e191a48 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 @@ -16,6 +16,7 @@ type MemoryZoneConfig struct { 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 aea3efe7f..cb3618333 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 @@ -20,4 +20,5 @@ type NetConfig struct { VhostUser bool `json:"vhost_user,omitempty"` VhostSocket string `json:"vhost_socket,omitempty"` Id string `json:"id,omitempty"` + Fd []int32 `json:"fd,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 000000000..23960ac14 --- /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_token_bucket.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_token_bucket.go new file mode 100644 index 000000000..de3527374 --- /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/cloud-hypervisor.yaml b/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml index dbadba734..d1f344b15 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 3a91c0fa5..2779c0520 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" From 5a92333f4b8f09e0028e6209e25e07147db3853a Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Wed, 31 Mar 2021 14:30:29 -0700 Subject: [PATCH 2/3] runtime: Format auto-generated client code for cloud-hypervisor API This patch extends the current process of generating client code for cloud-hypervisor API with an additional step, `go-fmt`, which will remove the generated `client/go.mod` file and format all auto-generated code. Fixes: #1606 Signed-off-by: Bo Chen (cherry picked from commit 52cacf88386651ef67585b47e9ca0ffb05460cdd) --- src/runtime/virtcontainers/pkg/cloud-hypervisor/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/Makefile b/src/runtime/virtcontainers/pkg/cloud-hypervisor/Makefile index 73ca84e93..260ad19ff 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/Makefile +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/Makefile @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 # -all: | update-yaml generate-client-code +all: | update-yaml generate-client-code go-fmt MK_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) YQ_INSTALLER := "$(MK_DIR)/../../../../../ci/install_yq.sh" VERSIONS_FILE := "$(MK_DIR)/../../../../../versions.yaml" @@ -17,8 +17,9 @@ generate-client-code: clean-generated-code -i /local/cloud-hypervisor.yaml \ -g go \ -o /local/client - - +go-fmt: + rm client/go.mod; \ + go fmt ./... update-yaml: ifndef YQ From e3efcfd40f04ccc708e64c05eabf68315676594d Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Wed, 31 Mar 2021 14:37:18 -0700 Subject: [PATCH 3/3] runtime: Fix the format of the client code of cloud-hypervisor APIs Regenerate the client code with the added `go-fmt` step. No functional changes. Fixes: #1606 Signed-off-by: Bo Chen (cherry picked from commit 0c38d9ecc4f1bcb292eaee9275df7392d4db988d) --- .../pkg/cloud-hypervisor/client/client.go | 5 +-- .../cloud-hypervisor/client/configuration.go | 12 +++--- .../client/model_balloon_config.go | 1 + .../client/model_cmd_line_config.go | 1 + .../client/model_console_config.go | 7 ++-- .../client/model_cpu_topology.go | 5 ++- .../client/model_cpus_config.go | 9 +++-- .../client/model_device_config.go | 7 ++-- .../client/model_device_node.go | 7 ++-- .../client/model_disk_config.go | 21 ++++++----- .../client/model_fs_config.go | 15 ++++---- .../client/model_initramfs_config.go | 1 + .../client/model_kernel_config.go | 1 + .../client/model_memory_config.go | 19 +++++----- .../client/model_memory_zone_config.go | 21 ++++++----- .../client/model_net_config.go | 23 ++++++------ .../client/model_numa_config.go | 9 +++-- .../client/model_numa_distance.go | 3 +- .../client/model_pci_device_info.go | 3 +- .../client/model_pmem_config.go | 13 ++++--- .../client/model_rate_limiter_config.go | 3 +- .../client/model_restore_config.go | 3 +- .../client/model_rng_config.go | 5 ++- .../client/model_sgx_epc_config.go | 5 ++- .../client/model_token_bucket.go | 1 + .../client/model_vm_add_device.go | 7 ++-- .../client/model_vm_config.go | 37 ++++++++++--------- .../cloud-hypervisor/client/model_vm_info.go | 9 +++-- .../client/model_vm_remove_device.go | 1 + .../client/model_vm_resize.go | 1 + .../client/model_vm_resize_zone.go | 1 + .../client/model_vm_snapshot_config.go | 1 + .../client/model_vmm_ping_response.go | 1 + .../client/model_vsock_config.go | 5 ++- 34 files changed, 146 insertions(+), 117 deletions(-) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go index b435e963f..ece0784d8 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/client.go @@ -157,13 +157,12 @@ 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 57ccf8569..4dd597fcc 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/configuration.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/configuration.go @@ -37,7 +37,6 @@ 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 @@ -52,7 +51,6 @@ type APIKey struct { Prefix string } - // ServerVariable stores the information about a server variable type ServerVariable struct { Description string @@ -62,9 +60,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 @@ -86,9 +84,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", }, }, @@ -104,7 +102,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/model_balloon_config.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_balloon_config.go index 999f669de..96de345d3 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,6 +8,7 @@ */ 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 62d23ce3f..e924de711 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,6 +8,7 @@ */ 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 af23bcf48..6de0c247a 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,9 +8,10 @@ */ 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 3c8bf4b0d..110801dbd 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,10 +8,11 @@ */ 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 6bf2245cf..b67daeec0 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,10 +8,11 @@ */ 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 d0fa7d6e1..a1e283633 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,9 +8,10 @@ */ 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 f584d9a3f..bb49a9fcc 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,10 +8,11 @@ */ 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 5df23de77..ddb78bee1 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,18 @@ */ 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"` - VhostSocket string `json:"vhost_socket,omitempty"` - PollQueue bool `json:"poll_queue,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"` RateLimiterConfig RateLimiterConfig `json:"rate_limiter_config,omitempty"` - Id string `json:"id,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 6b1ccb864..a5ea4f446 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,13 +8,14 @@ */ 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 3b361c126..9b335569b 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,6 +8,7 @@ */ 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 ce35f47f6..fe1285214 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,6 +8,7 @@ */ 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 8aedcd145..00b9d2e34 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,16 @@ */ 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"` - HugepageSize int64 `json:"hugepage_size,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 26e191a48..ad19ed412 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,17 @@ */ 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"` - 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"` + 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 cb3618333..e6dab09f7 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,18 @@ */ 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"` - VhostSocket string `json:"vhost_socket,omitempty"` - Id string `json:"id,omitempty"` - Fd []int32 `json:"fd,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"` + 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 378b92fd4..e4e247d62 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,10 +8,11 @@ */ 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 4b9681697..1f4f3560c 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,8 +8,9 @@ */ 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 308386207..47b3302e6 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,8 +8,9 @@ */ 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 600238f83..85cac5564 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,12 +8,13 @@ */ 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 index 23960ac14..974dc19a4 100644 --- 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 @@ -8,8 +8,9 @@ */ 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"` + 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 713cf1b3c..490a34d60 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,8 +8,9 @@ */ 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 3a928cd2a..2bd1c1587 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,8 +8,9 @@ */ 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 692122c38..a0562558f 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,8 +8,9 @@ */ 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 index de3527374..c55682d56 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_token_bucket.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_token_bucket.go @@ -8,6 +8,7 @@ */ 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. 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 f644fa60a..749bbf139 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,9 +8,10 @@ */ 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 158ef3b2f..7c8f09b39 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,25 +8,26 @@ */ 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 0f1597286..83a0159c8 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,10 +8,11 @@ */ 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 4a0cb6cf2..65bab16fc 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,6 +8,7 @@ */ 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 492b00a50..4e60fbfa4 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,6 +8,7 @@ */ 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 c86e02f0f..aac120760 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,6 +8,7 @@ */ 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 b029fff39..58d848792 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,6 +8,7 @@ */ 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 4ab8cf1c1..abbcf0346 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,6 +8,7 @@ */ 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 2fed17461..98745fa77 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,12 +8,13 @@ */ 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"` }