mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-22 13:38:26 +00:00
versions: Update Cloud Hypervisor to b4e39427080
An API change, done a long time ago, has been exposed on Cloud
Hypervisor and we should update it on the Kata Containers side to ensure
it doesn't affect Cloud Hypervisor CI and because the change is needed
for an upcoming work to get QAT working with Cloud Hypervisor.
Fixes: #5492
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit 9d286af7b4
)
This commit is contained in:
parent
9a0ab92f65
commit
9141acd94c
@ -100,7 +100,7 @@ type clhClient interface {
|
|||||||
// Add/remove CPUs to/from the VM
|
// Add/remove CPUs to/from the VM
|
||||||
VmResizePut(ctx context.Context, vmResize chclient.VmResize) (*http.Response, error)
|
VmResizePut(ctx context.Context, vmResize chclient.VmResize) (*http.Response, error)
|
||||||
// Add VFIO PCI device to the VM
|
// Add VFIO PCI device to the VM
|
||||||
VmAddDevicePut(ctx context.Context, vmAddDevice chclient.VmAddDevice) (chclient.PciDeviceInfo, *http.Response, error)
|
VmAddDevicePut(ctx context.Context, deviceConfig chclient.DeviceConfig) (chclient.PciDeviceInfo, *http.Response, error)
|
||||||
// Add a new disk device to the VM
|
// Add a new disk device to the VM
|
||||||
VmAddDiskPut(ctx context.Context, diskConfig chclient.DiskConfig) (chclient.PciDeviceInfo, *http.Response, error)
|
VmAddDiskPut(ctx context.Context, diskConfig chclient.DiskConfig) (chclient.PciDeviceInfo, *http.Response, error)
|
||||||
// Remove a device from the VM
|
// Remove a device from the VM
|
||||||
@ -136,8 +136,8 @@ func (c *clhClientApi) VmResizePut(ctx context.Context, vmResize chclient.VmResi
|
|||||||
return c.ApiInternal.VmResizePut(ctx).VmResize(vmResize).Execute()
|
return c.ApiInternal.VmResizePut(ctx).VmResize(vmResize).Execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *clhClientApi) VmAddDevicePut(ctx context.Context, vmAddDevice chclient.VmAddDevice) (chclient.PciDeviceInfo, *http.Response, error) {
|
func (c *clhClientApi) VmAddDevicePut(ctx context.Context, deviceConfig chclient.DeviceConfig) (chclient.PciDeviceInfo, *http.Response, error) {
|
||||||
return c.ApiInternal.VmAddDevicePut(ctx).VmAddDevice(vmAddDevice).Execute()
|
return c.ApiInternal.VmAddDevicePut(ctx).DeviceConfig(deviceConfig).Execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *clhClientApi) VmAddDiskPut(ctx context.Context, diskConfig chclient.DiskConfig) (chclient.PciDeviceInfo, *http.Response, error) {
|
func (c *clhClientApi) VmAddDiskPut(ctx context.Context, diskConfig chclient.DiskConfig) (chclient.PciDeviceInfo, *http.Response, error) {
|
||||||
@ -804,8 +804,7 @@ func (clh *cloudHypervisor) hotPlugVFIODevice(device *config.VFIODev) error {
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
// Create the clh device config via the constructor to ensure default values are properly assigned
|
// Create the clh device config via the constructor to ensure default values are properly assigned
|
||||||
clhDevice := *chclient.NewVmAddDevice()
|
clhDevice := *chclient.NewDeviceConfig(device.SysfsDev)
|
||||||
clhDevice.Path = &device.SysfsDev
|
|
||||||
pciInfo, _, err := cl.VmAddDevicePut(ctx, clhDevice)
|
pciInfo, _, err := cl.VmAddDevicePut(ctx, clhDevice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Failed to hotplug device %+v %s", device, openAPIClientError(err))
|
return fmt.Errorf("Failed to hotplug device %+v %s", device, openAPIClientError(err))
|
||||||
|
@ -103,7 +103,7 @@ func (c *clhClientMock) VmResizePut(ctx context.Context, vmResize chclient.VmRes
|
|||||||
}
|
}
|
||||||
|
|
||||||
//nolint:golint
|
//nolint:golint
|
||||||
func (c *clhClientMock) VmAddDevicePut(ctx context.Context, vmAddDevice chclient.VmAddDevice) (chclient.PciDeviceInfo, *http.Response, error) {
|
func (c *clhClientMock) VmAddDevicePut(ctx context.Context, deviceConfig chclient.DeviceConfig) (chclient.PciDeviceInfo, *http.Response, error) {
|
||||||
return chclient.PciDeviceInfo{}, nil, nil
|
return chclient.PciDeviceInfo{}, nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ docs/SendMigrationData.md
|
|||||||
docs/SgxEpcConfig.md
|
docs/SgxEpcConfig.md
|
||||||
docs/TokenBucket.md
|
docs/TokenBucket.md
|
||||||
docs/VdpaConfig.md
|
docs/VdpaConfig.md
|
||||||
docs/VmAddDevice.md
|
|
||||||
docs/VmConfig.md
|
docs/VmConfig.md
|
||||||
docs/VmCoredumpData.md
|
docs/VmCoredumpData.md
|
||||||
docs/VmInfo.md
|
docs/VmInfo.md
|
||||||
@ -74,7 +73,6 @@ model_send_migration_data.go
|
|||||||
model_sgx_epc_config.go
|
model_sgx_epc_config.go
|
||||||
model_token_bucket.go
|
model_token_bucket.go
|
||||||
model_vdpa_config.go
|
model_vdpa_config.go
|
||||||
model_vm_add_device.go
|
|
||||||
model_vm_config.go
|
model_vm_config.go
|
||||||
model_vm_coredump_data.go
|
model_vm_coredump_data.go
|
||||||
model_vm_info.go
|
model_vm_info.go
|
||||||
|
@ -136,7 +136,6 @@ Class | Method | HTTP request | Description
|
|||||||
- [SgxEpcConfig](docs/SgxEpcConfig.md)
|
- [SgxEpcConfig](docs/SgxEpcConfig.md)
|
||||||
- [TokenBucket](docs/TokenBucket.md)
|
- [TokenBucket](docs/TokenBucket.md)
|
||||||
- [VdpaConfig](docs/VdpaConfig.md)
|
- [VdpaConfig](docs/VdpaConfig.md)
|
||||||
- [VmAddDevice](docs/VmAddDevice.md)
|
|
||||||
- [VmConfig](docs/VmConfig.md)
|
- [VmConfig](docs/VmConfig.md)
|
||||||
- [VmCoredumpData](docs/VmCoredumpData.md)
|
- [VmCoredumpData](docs/VmCoredumpData.md)
|
||||||
- [VmInfo](docs/VmInfo.md)
|
- [VmInfo](docs/VmInfo.md)
|
||||||
|
@ -171,7 +171,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/VmAddDevice'
|
$ref: '#/components/schemas/DeviceConfig'
|
||||||
description: The path of the new device
|
description: The path of the new device
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
@ -1808,20 +1808,6 @@ components:
|
|||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
VmAddDevice:
|
|
||||||
example:
|
|
||||||
path: path
|
|
||||||
iommu: false
|
|
||||||
id: id
|
|
||||||
properties:
|
|
||||||
path:
|
|
||||||
type: string
|
|
||||||
iommu:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
VmRemoveDevice:
|
VmRemoveDevice:
|
||||||
example:
|
example:
|
||||||
id: id
|
id: id
|
||||||
|
@ -833,12 +833,12 @@ func (a *DefaultApiService) ShutdownVMMExecute(r ApiShutdownVMMRequest) (*_netht
|
|||||||
type ApiVmAddDevicePutRequest struct {
|
type ApiVmAddDevicePutRequest struct {
|
||||||
ctx _context.Context
|
ctx _context.Context
|
||||||
ApiService *DefaultApiService
|
ApiService *DefaultApiService
|
||||||
vmAddDevice *VmAddDevice
|
deviceConfig *DeviceConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
// The path of the new device
|
// The path of the new device
|
||||||
func (r ApiVmAddDevicePutRequest) VmAddDevice(vmAddDevice VmAddDevice) ApiVmAddDevicePutRequest {
|
func (r ApiVmAddDevicePutRequest) DeviceConfig(deviceConfig DeviceConfig) ApiVmAddDevicePutRequest {
|
||||||
r.vmAddDevice = &vmAddDevice
|
r.deviceConfig = &deviceConfig
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -860,7 +860,6 @@ func (a *DefaultApiService) VmAddDevicePut(ctx _context.Context) ApiVmAddDeviceP
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return PciDeviceInfo
|
// @return PciDeviceInfo
|
||||||
func (a *DefaultApiService) VmAddDevicePutExecute(r ApiVmAddDevicePutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmAddDevicePutExecute(r ApiVmAddDevicePutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -882,8 +881,8 @@ func (a *DefaultApiService) VmAddDevicePutExecute(r ApiVmAddDevicePutRequest) (P
|
|||||||
localVarHeaderParams := make(map[string]string)
|
localVarHeaderParams := make(map[string]string)
|
||||||
localVarQueryParams := _neturl.Values{}
|
localVarQueryParams := _neturl.Values{}
|
||||||
localVarFormParams := _neturl.Values{}
|
localVarFormParams := _neturl.Values{}
|
||||||
if r.vmAddDevice == nil {
|
if r.deviceConfig == nil {
|
||||||
return localVarReturnValue, nil, reportError("vmAddDevice is required and must be specified")
|
return localVarReturnValue, nil, reportError("deviceConfig is required and must be specified")
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
@ -904,7 +903,7 @@ func (a *DefaultApiService) VmAddDevicePutExecute(r ApiVmAddDevicePutRequest) (P
|
|||||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = r.vmAddDevice
|
localVarPostBody = r.deviceConfig
|
||||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return localVarReturnValue, nil, err
|
return localVarReturnValue, nil, err
|
||||||
@ -972,7 +971,6 @@ func (a *DefaultApiService) VmAddDiskPut(ctx _context.Context) ApiVmAddDiskPutRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return PciDeviceInfo
|
// @return PciDeviceInfo
|
||||||
func (a *DefaultApiService) VmAddDiskPutExecute(r ApiVmAddDiskPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmAddDiskPutExecute(r ApiVmAddDiskPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -1084,7 +1082,6 @@ func (a *DefaultApiService) VmAddFsPut(ctx _context.Context) ApiVmAddFsPutReques
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return PciDeviceInfo
|
// @return PciDeviceInfo
|
||||||
func (a *DefaultApiService) VmAddFsPutExecute(r ApiVmAddFsPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmAddFsPutExecute(r ApiVmAddFsPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -1196,7 +1193,6 @@ func (a *DefaultApiService) VmAddNetPut(ctx _context.Context) ApiVmAddNetPutRequ
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return PciDeviceInfo
|
// @return PciDeviceInfo
|
||||||
func (a *DefaultApiService) VmAddNetPutExecute(r ApiVmAddNetPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmAddNetPutExecute(r ApiVmAddNetPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -1308,7 +1304,6 @@ func (a *DefaultApiService) VmAddPmemPut(ctx _context.Context) ApiVmAddPmemPutRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return PciDeviceInfo
|
// @return PciDeviceInfo
|
||||||
func (a *DefaultApiService) VmAddPmemPutExecute(r ApiVmAddPmemPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmAddPmemPutExecute(r ApiVmAddPmemPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -1420,7 +1415,6 @@ func (a *DefaultApiService) VmAddVdpaPut(ctx _context.Context) ApiVmAddVdpaPutRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return PciDeviceInfo
|
// @return PciDeviceInfo
|
||||||
func (a *DefaultApiService) VmAddVdpaPutExecute(r ApiVmAddVdpaPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmAddVdpaPutExecute(r ApiVmAddVdpaPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -1532,7 +1526,6 @@ func (a *DefaultApiService) VmAddVsockPut(ctx _context.Context) ApiVmAddVsockPut
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return PciDeviceInfo
|
// @return PciDeviceInfo
|
||||||
func (a *DefaultApiService) VmAddVsockPutExecute(r ApiVmAddVsockPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmAddVsockPutExecute(r ApiVmAddVsockPutRequest) (PciDeviceInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -1737,7 +1730,6 @@ func (a *DefaultApiService) VmCountersGet(ctx _context.Context) ApiVmCountersGet
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return map[string]map[string]int64
|
// @return map[string]map[string]int64
|
||||||
func (a *DefaultApiService) VmCountersGetExecute(r ApiVmCountersGetRequest) (map[string]map[string]int64, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmCountersGetExecute(r ApiVmCountersGetRequest) (map[string]map[string]int64, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -1837,7 +1829,6 @@ func (a *DefaultApiService) VmInfoGet(ctx _context.Context) ApiVmInfoGetRequest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return VmInfo
|
// @return VmInfo
|
||||||
func (a *DefaultApiService) VmInfoGetExecute(r ApiVmInfoGetRequest) (VmInfo, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmInfoGetExecute(r ApiVmInfoGetRequest) (VmInfo, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
@ -2637,7 +2628,6 @@ func (a *DefaultApiService) VmmPingGet(ctx _context.Context) ApiVmmPingGetReques
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the request
|
// Execute executes the request
|
||||||
//
|
|
||||||
// @return VmmPingResponse
|
// @return VmmPingResponse
|
||||||
func (a *DefaultApiService) VmmPingGetExecute(r ApiVmmPingGetRequest) (VmmPingResponse, *_nethttp.Response, error) {
|
func (a *DefaultApiService) VmmPingGetExecute(r ApiVmmPingGetRequest) (VmmPingResponse, *_nethttp.Response, error) {
|
||||||
var (
|
var (
|
||||||
|
@ -554,7 +554,7 @@ No authorization required
|
|||||||
|
|
||||||
## VmAddDevicePut
|
## VmAddDevicePut
|
||||||
|
|
||||||
> PciDeviceInfo VmAddDevicePut(ctx).VmAddDevice(vmAddDevice).Execute()
|
> PciDeviceInfo VmAddDevicePut(ctx).DeviceConfig(deviceConfig).Execute()
|
||||||
|
|
||||||
Add a new device to the VM
|
Add a new device to the VM
|
||||||
|
|
||||||
@ -571,11 +571,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
vmAddDevice := *openapiclient.NewVmAddDevice() // VmAddDevice | The path of the new device
|
deviceConfig := *openapiclient.NewDeviceConfig("Path_example") // DeviceConfig | The path of the new device
|
||||||
|
|
||||||
configuration := openapiclient.NewConfiguration()
|
configuration := openapiclient.NewConfiguration()
|
||||||
api_client := openapiclient.NewAPIClient(configuration)
|
api_client := openapiclient.NewAPIClient(configuration)
|
||||||
resp, r, err := api_client.DefaultApi.VmAddDevicePut(context.Background()).VmAddDevice(vmAddDevice).Execute()
|
resp, r, err := api_client.DefaultApi.VmAddDevicePut(context.Background()).DeviceConfig(deviceConfig).Execute()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddDevicePut``: %v\n", err)
|
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddDevicePut``: %v\n", err)
|
||||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
@ -596,7 +596,7 @@ Other parameters are passed through a pointer to a apiVmAddDevicePutRequest stru
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**vmAddDevice** | [**VmAddDevice**](VmAddDevice.md) | The path of the new device |
|
**deviceConfig** | [**DeviceConfig**](DeviceConfig.md) | The path of the new device |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -1,108 +0,0 @@
|
|||||||
# VmAddDevice
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**Path** | Pointer to **string** | | [optional]
|
|
||||||
**Iommu** | Pointer to **bool** | | [optional] [default to false]
|
|
||||||
**Id** | Pointer to **string** | | [optional]
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
### NewVmAddDevice
|
|
||||||
|
|
||||||
`func NewVmAddDevice() *VmAddDevice`
|
|
||||||
|
|
||||||
NewVmAddDevice instantiates a new VmAddDevice object
|
|
||||||
This constructor will assign default values to properties that have it defined,
|
|
||||||
and makes sure properties required by API are set, but the set of arguments
|
|
||||||
will change when the set of required properties is changed
|
|
||||||
|
|
||||||
### NewVmAddDeviceWithDefaults
|
|
||||||
|
|
||||||
`func NewVmAddDeviceWithDefaults() *VmAddDevice`
|
|
||||||
|
|
||||||
NewVmAddDeviceWithDefaults instantiates a new VmAddDevice object
|
|
||||||
This constructor will only assign default values to properties that have it defined,
|
|
||||||
but it doesn't guarantee that properties required by API are set
|
|
||||||
|
|
||||||
### GetPath
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) GetPath() string`
|
|
||||||
|
|
||||||
GetPath returns the Path field if non-nil, zero value otherwise.
|
|
||||||
|
|
||||||
### GetPathOk
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) GetPathOk() (*string, bool)`
|
|
||||||
|
|
||||||
GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise
|
|
||||||
and a boolean to check if the value has been set.
|
|
||||||
|
|
||||||
### SetPath
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) SetPath(v string)`
|
|
||||||
|
|
||||||
SetPath sets Path field to given value.
|
|
||||||
|
|
||||||
### HasPath
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) HasPath() bool`
|
|
||||||
|
|
||||||
HasPath returns a boolean if a field has been set.
|
|
||||||
|
|
||||||
### GetIommu
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) GetIommu() bool`
|
|
||||||
|
|
||||||
GetIommu returns the Iommu field if non-nil, zero value otherwise.
|
|
||||||
|
|
||||||
### GetIommuOk
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) GetIommuOk() (*bool, bool)`
|
|
||||||
|
|
||||||
GetIommuOk returns a tuple with the Iommu field if it's non-nil, zero value otherwise
|
|
||||||
and a boolean to check if the value has been set.
|
|
||||||
|
|
||||||
### SetIommu
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) SetIommu(v bool)`
|
|
||||||
|
|
||||||
SetIommu sets Iommu field to given value.
|
|
||||||
|
|
||||||
### HasIommu
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) HasIommu() bool`
|
|
||||||
|
|
||||||
HasIommu returns a boolean if a field has been set.
|
|
||||||
|
|
||||||
### GetId
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) GetId() string`
|
|
||||||
|
|
||||||
GetId returns the Id field if non-nil, zero value otherwise.
|
|
||||||
|
|
||||||
### GetIdOk
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) GetIdOk() (*string, bool)`
|
|
||||||
|
|
||||||
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
|
||||||
and a boolean to check if the value has been set.
|
|
||||||
|
|
||||||
### SetId
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) SetId(v string)`
|
|
||||||
|
|
||||||
SetId sets Id field to given value.
|
|
||||||
|
|
||||||
### HasId
|
|
||||||
|
|
||||||
`func (o *VmAddDevice) HasId() bool`
|
|
||||||
|
|
||||||
HasId returns a boolean if a field has been set.
|
|
||||||
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,189 +0,0 @@
|
|||||||
/*
|
|
||||||
Cloud Hypervisor API
|
|
||||||
|
|
||||||
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
|
|
||||||
|
|
||||||
API version: 0.3.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
||||||
|
|
||||||
package openapi
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
)
|
|
||||||
|
|
||||||
// VmAddDevice struct for VmAddDevice
|
|
||||||
type VmAddDevice struct {
|
|
||||||
Path *string `json:"path,omitempty"`
|
|
||||||
Iommu *bool `json:"iommu,omitempty"`
|
|
||||||
Id *string `json:"id,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewVmAddDevice instantiates a new VmAddDevice object
|
|
||||||
// This constructor will assign default values to properties that have it defined,
|
|
||||||
// and makes sure properties required by API are set, but the set of arguments
|
|
||||||
// will change when the set of required properties is changed
|
|
||||||
func NewVmAddDevice() *VmAddDevice {
|
|
||||||
this := VmAddDevice{}
|
|
||||||
var iommu bool = false
|
|
||||||
this.Iommu = &iommu
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewVmAddDeviceWithDefaults instantiates a new VmAddDevice object
|
|
||||||
// This constructor will only assign default values to properties that have it defined,
|
|
||||||
// but it doesn't guarantee that properties required by API are set
|
|
||||||
func NewVmAddDeviceWithDefaults() *VmAddDevice {
|
|
||||||
this := VmAddDevice{}
|
|
||||||
var iommu bool = false
|
|
||||||
this.Iommu = &iommu
|
|
||||||
return &this
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetPath returns the Path field value if set, zero value otherwise.
|
|
||||||
func (o *VmAddDevice) GetPath() string {
|
|
||||||
if o == nil || o.Path == nil {
|
|
||||||
var ret string
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
return *o.Path
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
|
|
||||||
// and a boolean to check if the value has been set.
|
|
||||||
func (o *VmAddDevice) GetPathOk() (*string, bool) {
|
|
||||||
if o == nil || o.Path == nil {
|
|
||||||
return nil, false
|
|
||||||
}
|
|
||||||
return o.Path, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasPath returns a boolean if a field has been set.
|
|
||||||
func (o *VmAddDevice) HasPath() bool {
|
|
||||||
if o != nil && o.Path != nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPath gets a reference to the given string and assigns it to the Path field.
|
|
||||||
func (o *VmAddDevice) SetPath(v string) {
|
|
||||||
o.Path = &v
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetIommu returns the Iommu field value if set, zero value otherwise.
|
|
||||||
func (o *VmAddDevice) GetIommu() bool {
|
|
||||||
if o == nil || o.Iommu == nil {
|
|
||||||
var ret bool
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
return *o.Iommu
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetIommuOk returns a tuple with the Iommu field value if set, nil otherwise
|
|
||||||
// and a boolean to check if the value has been set.
|
|
||||||
func (o *VmAddDevice) GetIommuOk() (*bool, bool) {
|
|
||||||
if o == nil || o.Iommu == nil {
|
|
||||||
return nil, false
|
|
||||||
}
|
|
||||||
return o.Iommu, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasIommu returns a boolean if a field has been set.
|
|
||||||
func (o *VmAddDevice) HasIommu() bool {
|
|
||||||
if o != nil && o.Iommu != nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetIommu gets a reference to the given bool and assigns it to the Iommu field.
|
|
||||||
func (o *VmAddDevice) SetIommu(v bool) {
|
|
||||||
o.Iommu = &v
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetId returns the Id field value if set, zero value otherwise.
|
|
||||||
func (o *VmAddDevice) GetId() string {
|
|
||||||
if o == nil || o.Id == nil {
|
|
||||||
var ret string
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
return *o.Id
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
||||||
// and a boolean to check if the value has been set.
|
|
||||||
func (o *VmAddDevice) GetIdOk() (*string, bool) {
|
|
||||||
if o == nil || o.Id == nil {
|
|
||||||
return nil, false
|
|
||||||
}
|
|
||||||
return o.Id, true
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasId returns a boolean if a field has been set.
|
|
||||||
func (o *VmAddDevice) HasId() bool {
|
|
||||||
if o != nil && o.Id != nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
||||||
func (o *VmAddDevice) SetId(v string) {
|
|
||||||
o.Id = &v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o VmAddDevice) MarshalJSON() ([]byte, error) {
|
|
||||||
toSerialize := map[string]interface{}{}
|
|
||||||
if o.Path != nil {
|
|
||||||
toSerialize["path"] = o.Path
|
|
||||||
}
|
|
||||||
if o.Iommu != nil {
|
|
||||||
toSerialize["iommu"] = o.Iommu
|
|
||||||
}
|
|
||||||
if o.Id != nil {
|
|
||||||
toSerialize["id"] = o.Id
|
|
||||||
}
|
|
||||||
return json.Marshal(toSerialize)
|
|
||||||
}
|
|
||||||
|
|
||||||
type NullableVmAddDevice struct {
|
|
||||||
value *VmAddDevice
|
|
||||||
isSet bool
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableVmAddDevice) Get() *VmAddDevice {
|
|
||||||
return v.value
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableVmAddDevice) Set(val *VmAddDevice) {
|
|
||||||
v.value = val
|
|
||||||
v.isSet = true
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableVmAddDevice) IsSet() bool {
|
|
||||||
return v.isSet
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableVmAddDevice) Unset() {
|
|
||||||
v.value = nil
|
|
||||||
v.isSet = false
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewNullableVmAddDevice(val *VmAddDevice) *NullableVmAddDevice {
|
|
||||||
return &NullableVmAddDevice{value: val, isSet: true}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v NullableVmAddDevice) MarshalJSON() ([]byte, error) {
|
|
||||||
return json.Marshal(v.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *NullableVmAddDevice) UnmarshalJSON(src []byte) error {
|
|
||||||
v.isSet = true
|
|
||||||
return json.Unmarshal(src, &v.value)
|
|
||||||
}
|
|
@ -185,7 +185,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/VmAddDevice"
|
$ref: "#/components/schemas/DeviceConfig"
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
@ -1077,17 +1077,6 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
|
||||||
VmAddDevice:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
path:
|
|
||||||
type: string
|
|
||||||
iommu:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
VmRemoveDevice:
|
VmRemoveDevice:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -75,7 +75,7 @@ assets:
|
|||||||
url: "https://github.com/cloud-hypervisor/cloud-hypervisor"
|
url: "https://github.com/cloud-hypervisor/cloud-hypervisor"
|
||||||
uscan-url: >-
|
uscan-url: >-
|
||||||
https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz
|
https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz
|
||||||
version: "2115a4156891804e5fc7bbd0d1831d2e92a0c50e"
|
version: "b4e39427080293c674b8db627ee6daf1f1b56806"
|
||||||
|
|
||||||
firecracker:
|
firecracker:
|
||||||
description: "Firecracker micro-VMM"
|
description: "Firecracker micro-VMM"
|
||||||
|
Loading…
Reference in New Issue
Block a user