Skip to content

Commit

Permalink
runtime: clh: Re-generate the client code
Browse files Browse the repository at this point in the history
This patch re-generates the client code for Cloud Hypervisor v37.0.
Note: The client code of cloud-hypervisor's OpenAPI is automatically
generated by openapi-generator.

Fixes: kata-containers#8694

Signed-off-by: Bo Chen <chen.bo@intel.com>
  • Loading branch information
likebreath committed Mar 7, 2024
1 parent c6da548 commit 71dd40d
Show file tree
Hide file tree
Showing 8 changed files with 398 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ docs/SgxEpcConfig.md
docs/TokenBucket.md
docs/TpmConfig.md
docs/VdpaConfig.md
docs/VmAddUserDevice.md
docs/VmConfig.md
docs/VmCoredumpData.md
docs/VmInfo.md
Expand Down Expand Up @@ -75,6 +76,7 @@ model_sgx_epc_config.go
model_token_bucket.go
model_tpm_config.go
model_vdpa_config.go
model_vm_add_user_device.go
model_vm_config.go
model_vm_coredump_data.go
model_vm_info.go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**VmAddFsPut**](docs/DefaultApi.md#vmaddfsput) | **Put** /vm.add-fs | Add a new virtio-fs device to the VM
*DefaultApi* | [**VmAddNetPut**](docs/DefaultApi.md#vmaddnetput) | **Put** /vm.add-net | Add a new network device to the VM
*DefaultApi* | [**VmAddPmemPut**](docs/DefaultApi.md#vmaddpmemput) | **Put** /vm.add-pmem | Add a new pmem device to the VM
*DefaultApi* | [**VmAddUserDevicePut**](docs/DefaultApi.md#vmadduserdeviceput) | **Put** /vm.add-user-device | Add a new userspace device to the VM
*DefaultApi* | [**VmAddVdpaPut**](docs/DefaultApi.md#vmaddvdpaput) | **Put** /vm.add-vdpa | Add a new vDPA device to the VM
*DefaultApi* | [**VmAddVsockPut**](docs/DefaultApi.md#vmaddvsockput) | **Put** /vm.add-vsock | Add a new vsock device to the VM
*DefaultApi* | [**VmCoredumpPut**](docs/DefaultApi.md#vmcoredumpput) | **Put** /vm.coredump | Takes a VM coredump.
Expand Down Expand Up @@ -137,6 +138,7 @@ Class | Method | HTTP request | Description
- [TokenBucket](docs/TokenBucket.md)
- [TpmConfig](docs/TpmConfig.md)
- [VdpaConfig](docs/VdpaConfig.md)
- [VmAddUserDevice](docs/VmAddUserDevice.md)
- [VmConfig](docs/VmConfig.md)
- [VmCoredumpData](docs/VmCoredumpData.md)
- [VmInfo](docs/VmInfo.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,27 @@ paths:
"500":
description: The new vDPA device could not be added to the VM instance.
summary: Add a new vDPA device to the VM
/vm.add-user-device:
put:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VmAddUserDevice'
description: The path of the new device
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/PciDeviceInfo'
description: The new device was successfully added to the VM instance.
"204":
description: The new device was successfully (cold) added to the VM instance.
"404":
description: The new device could not be added to the VM instance.
summary: Add a new userspace device to the VM
/vm.snapshot:
put:
requestBody:
Expand Down Expand Up @@ -1935,3 +1956,12 @@ components:
required:
- destination_url
type: object
VmAddUserDevice:
example:
socket: socket
properties:
socket:
type: string
required:
- socket
type: object
112 changes: 112 additions & 0 deletions src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api_default.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Method | HTTP request | Description
[**VmAddFsPut**](DefaultApi.md#VmAddFsPut) | **Put** /vm.add-fs | Add a new virtio-fs device to the VM
[**VmAddNetPut**](DefaultApi.md#VmAddNetPut) | **Put** /vm.add-net | Add a new network device to the VM
[**VmAddPmemPut**](DefaultApi.md#VmAddPmemPut) | **Put** /vm.add-pmem | Add a new pmem device to the VM
[**VmAddUserDevicePut**](DefaultApi.md#VmAddUserDevicePut) | **Put** /vm.add-user-device | Add a new userspace device to the VM
[**VmAddVdpaPut**](DefaultApi.md#VmAddVdpaPut) | **Put** /vm.add-vdpa | Add a new vDPA device to the VM
[**VmAddVsockPut**](DefaultApi.md#VmAddVsockPut) | **Put** /vm.add-vsock | Add a new vsock device to the VM
[**VmCoredumpPut**](DefaultApi.md#VmCoredumpPut) | **Put** /vm.coredump | Takes a VM coredump.
Expand Down Expand Up @@ -872,6 +873,70 @@ No authorization required
[[Back to README]](../README.md)


## VmAddUserDevicePut

> PciDeviceInfo VmAddUserDevicePut(ctx).VmAddUserDevice(vmAddUserDevice).Execute()
Add a new userspace device to the VM

### Example

```go
package main

import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)

func main() {
vmAddUserDevice := *openapiclient.NewVmAddUserDevice("Socket_example") // VmAddUserDevice | The path of the new device

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.VmAddUserDevicePut(context.Background()).VmAddUserDevice(vmAddUserDevice).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddUserDevicePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VmAddUserDevicePut`: PciDeviceInfo
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddUserDevicePut`: %v\n", resp)
}
```

### Path Parameters



### Other Parameters

Other parameters are passed through a pointer to a apiVmAddUserDevicePutRequest struct via the builder pattern


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vmAddUserDevice** | [**VmAddUserDevice**](VmAddUserDevice.md) | The path of the new device |

### Return type

[**PciDeviceInfo**](PciDeviceInfo.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)


## VmAddVdpaPut

> PciDeviceInfo VmAddVdpaPut(ctx).VdpaConfig(vdpaConfig).Execute()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# VmAddUserDevice

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Socket** | **string** | |

## Methods

### NewVmAddUserDevice

`func NewVmAddUserDevice(socket string, ) *VmAddUserDevice`

NewVmAddUserDevice instantiates a new VmAddUserDevice 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

### NewVmAddUserDeviceWithDefaults

`func NewVmAddUserDeviceWithDefaults() *VmAddUserDevice`

NewVmAddUserDeviceWithDefaults instantiates a new VmAddUserDevice 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

### GetSocket

`func (o *VmAddUserDevice) GetSocket() string`

GetSocket returns the Socket field if non-nil, zero value otherwise.

### GetSocketOk

`func (o *VmAddUserDevice) GetSocketOk() (*string, bool)`

GetSocketOk returns a tuple with the Socket field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetSocket

`func (o *VmAddUserDevice) SetSocket(v string)`

SetSocket sets Socket field to given value.



[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


0 comments on commit 71dd40d

Please sign in to comment.