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 750c1e725..d514ae7b8 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml @@ -1131,6 +1131,9 @@ components: items: type: integer type: array + required: + - host_cpus + - vcpu type: object CpuFeatures: example: diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/CpuAffinity.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/CpuAffinity.md index 300c7af1d..52eb24a18 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/CpuAffinity.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/CpuAffinity.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Vcpu** | Pointer to **int32** | | [optional] -**HostCpus** | Pointer to **[]int32** | | [optional] +**Vcpu** | **int32** | | +**HostCpus** | **[]int32** | | ## Methods ### NewCpuAffinity -`func NewCpuAffinity() *CpuAffinity` +`func NewCpuAffinity(vcpu int32, hostCpus []int32, ) *CpuAffinity` NewCpuAffinity instantiates a new CpuAffinity object This constructor will assign default values to properties that have it defined, @@ -45,11 +45,6 @@ and a boolean to check if the value has been set. SetVcpu sets Vcpu field to given value. -### HasVcpu - -`func (o *CpuAffinity) HasVcpu() bool` - -HasVcpu returns a boolean if a field has been set. ### GetHostCpus @@ -70,11 +65,6 @@ and a boolean to check if the value has been set. SetHostCpus sets HostCpus field to given value. -### HasHostCpus - -`func (o *CpuAffinity) HasHostCpus() bool` - -HasHostCpus 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) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_affinity.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_affinity.go index f0009699f..889c8364f 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_affinity.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_cpu_affinity.go @@ -16,16 +16,18 @@ import ( // CpuAffinity struct for CpuAffinity type CpuAffinity struct { - Vcpu *int32 `json:"vcpu,omitempty"` - HostCpus *[]int32 `json:"host_cpus,omitempty"` + Vcpu int32 `json:"vcpu"` + HostCpus []int32 `json:"host_cpus"` } // NewCpuAffinity instantiates a new CpuAffinity 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 NewCpuAffinity() *CpuAffinity { +func NewCpuAffinity(vcpu int32, hostCpus []int32) *CpuAffinity { this := CpuAffinity{} + this.Vcpu = vcpu + this.HostCpus = hostCpus return &this } @@ -37,76 +39,60 @@ func NewCpuAffinityWithDefaults() *CpuAffinity { return &this } -// GetVcpu returns the Vcpu field value if set, zero value otherwise. +// GetVcpu returns the Vcpu field value func (o *CpuAffinity) GetVcpu() int32 { - if o == nil || o.Vcpu == nil { + if o == nil { var ret int32 return ret } - return *o.Vcpu + + return o.Vcpu } -// GetVcpuOk returns a tuple with the Vcpu field value if set, nil otherwise +// GetVcpuOk returns a tuple with the Vcpu field value // and a boolean to check if the value has been set. func (o *CpuAffinity) GetVcpuOk() (*int32, bool) { - if o == nil || o.Vcpu == nil { + if o == nil { return nil, false } - return o.Vcpu, true + return &o.Vcpu, true } -// HasVcpu returns a boolean if a field has been set. -func (o *CpuAffinity) HasVcpu() bool { - if o != nil && o.Vcpu != nil { - return true - } - - return false -} - -// SetVcpu gets a reference to the given int32 and assigns it to the Vcpu field. +// SetVcpu sets field value func (o *CpuAffinity) SetVcpu(v int32) { - o.Vcpu = &v + o.Vcpu = v } -// GetHostCpus returns the HostCpus field value if set, zero value otherwise. +// GetHostCpus returns the HostCpus field value func (o *CpuAffinity) GetHostCpus() []int32 { - if o == nil || o.HostCpus == nil { + if o == nil { var ret []int32 return ret } - return *o.HostCpus + + return o.HostCpus } -// GetHostCpusOk returns a tuple with the HostCpus field value if set, nil otherwise +// GetHostCpusOk returns a tuple with the HostCpus field value // and a boolean to check if the value has been set. func (o *CpuAffinity) GetHostCpusOk() (*[]int32, bool) { - if o == nil || o.HostCpus == nil { + if o == nil { return nil, false } - return o.HostCpus, true + return &o.HostCpus, true } -// HasHostCpus returns a boolean if a field has been set. -func (o *CpuAffinity) HasHostCpus() bool { - if o != nil && o.HostCpus != nil { - return true - } - - return false -} - -// SetHostCpus gets a reference to the given []int32 and assigns it to the HostCpus field. +// SetHostCpus sets field value func (o *CpuAffinity) SetHostCpus(v []int32) { - o.HostCpus = &v + o.HostCpus = v } func (o CpuAffinity) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Vcpu != nil { + if true { toSerialize["vcpu"] = o.Vcpu } - if o.HostCpus != nil { + if true { toSerialize["host_cpus"] = o.HostCpus } return json.Marshal(toSerialize) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml b/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml index dee8bdbf0..a2392f988 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml @@ -578,6 +578,9 @@ components: description: Virtual machine configuration CpuAffinity: + required: + - vcpu + - host_cpus type: object properties: vcpu: diff --git a/versions.yaml b/versions.yaml index 0099bd3be..174162b99 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: "v29.0" + version: "v30.0" firecracker: description: "Firecracker micro-VMM"