DRA API: use DeviceCapacity struct instead of plain Quantity

This enables a future extension where capacity of a single device gets consumed
by different claims. The semantic without any additional fields is the same as
before: a capacity cannot be split up and is only an attribute of a device.

Because its semantically the same as before, two-way conversion to v1alpha3 is
possible.
This commit is contained in:
Patrick Ohly 2024-09-26 16:56:48 +02:00
parent 142319bd92
commit 81fd64256c
21 changed files with 638 additions and 192 deletions

View File

@ -214,7 +214,18 @@ type BasicDevice struct {
// The maximum number of attributes and capacities combined is 32. // The maximum number of attributes and capacities combined is 32.
// //
// +optional // +optional
Capacity map[QualifiedName]resource.Quantity Capacity map[QualifiedName]DeviceCapacity
}
// DeviceCapacity describes a quantity associated with a device.
type DeviceCapacity struct {
// Quantity defines how much of a certain device capacity is available.
//
// +required
Quantity resource.Quantity
// potential future addition: fields which define how to "consume"
// capacity (= share a single device between different consumers).
} }
// Limit for the sum of the number of entries in both attributes and capacity. // Limit for the sum of the number of entries in both attributes and capacity.

View File

@ -19,8 +19,10 @@ package v1alpha3
import ( import (
"fmt" "fmt"
resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/api/resource"
conversion "k8s.io/apimachinery/pkg/conversion"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
resourceapi "k8s.io/kubernetes/pkg/apis/resource"
) )
func addConversionFuncs(scheme *runtime.Scheme) error { func addConversionFuncs(scheme *runtime.Scheme) error {
@ -38,3 +40,13 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
return nil return nil
} }
func Convert_resource_DeviceCapacity_To_resource_Quantity(in *resourceapi.DeviceCapacity, out *resource.Quantity, s conversion.Scope) error {
*out = in.Quantity
return nil
}
func Convert_resource_Quantity_To_resource_DeviceCapacity(in *resource.Quantity, out *resourceapi.DeviceCapacity, s conversion.Scope) error {
out.Quantity = *in
return nil
}

View File

@ -351,6 +351,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddConversionFunc((*resource.DeviceCapacity)(nil), (*apiresource.Quantity)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_DeviceCapacity_To_resource_Quantity(a.(*resource.DeviceCapacity), b.(*apiresource.Quantity), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*apiresource.Quantity)(nil), (*resource.DeviceCapacity)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_Quantity_To_resource_DeviceCapacity(a.(*apiresource.Quantity), b.(*resource.DeviceCapacity), scope)
}); err != nil {
return err
}
return nil return nil
} }
@ -382,7 +392,19 @@ func Convert_resource_AllocationResult_To_v1alpha3_AllocationResult(in *resource
func autoConvert_v1alpha3_BasicDevice_To_resource_BasicDevice(in *resourcev1alpha3.BasicDevice, out *resource.BasicDevice, s conversion.Scope) error { func autoConvert_v1alpha3_BasicDevice_To_resource_BasicDevice(in *resourcev1alpha3.BasicDevice, out *resource.BasicDevice, s conversion.Scope) error {
out.Attributes = *(*map[resource.QualifiedName]resource.DeviceAttribute)(unsafe.Pointer(&in.Attributes)) out.Attributes = *(*map[resource.QualifiedName]resource.DeviceAttribute)(unsafe.Pointer(&in.Attributes))
out.Capacity = *(*map[resource.QualifiedName]apiresource.Quantity)(unsafe.Pointer(&in.Capacity)) if in.Capacity != nil {
in, out := &in.Capacity, &out.Capacity
*out = make(map[resource.QualifiedName]resource.DeviceCapacity, len(*in))
for key, val := range *in {
newVal := new(resource.DeviceCapacity)
if err := Convert_resource_Quantity_To_resource_DeviceCapacity(&val, newVal, s); err != nil {
return err
}
(*out)[resource.QualifiedName(key)] = *newVal
}
} else {
out.Capacity = nil
}
return nil return nil
} }
@ -393,7 +415,19 @@ func Convert_v1alpha3_BasicDevice_To_resource_BasicDevice(in *resourcev1alpha3.B
func autoConvert_resource_BasicDevice_To_v1alpha3_BasicDevice(in *resource.BasicDevice, out *resourcev1alpha3.BasicDevice, s conversion.Scope) error { func autoConvert_resource_BasicDevice_To_v1alpha3_BasicDevice(in *resource.BasicDevice, out *resourcev1alpha3.BasicDevice, s conversion.Scope) error {
out.Attributes = *(*map[resourcev1alpha3.QualifiedName]resourcev1alpha3.DeviceAttribute)(unsafe.Pointer(&in.Attributes)) out.Attributes = *(*map[resourcev1alpha3.QualifiedName]resourcev1alpha3.DeviceAttribute)(unsafe.Pointer(&in.Attributes))
out.Capacity = *(*map[resourcev1alpha3.QualifiedName]apiresource.Quantity)(unsafe.Pointer(&in.Capacity)) if in.Capacity != nil {
in, out := &in.Capacity, &out.Capacity
*out = make(map[resourcev1alpha3.QualifiedName]apiresource.Quantity, len(*in))
for key, val := range *in {
newVal := new(apiresource.Quantity)
if err := Convert_resource_DeviceCapacity_To_resource_Quantity(&val, newVal, s); err != nil {
return err
}
(*out)[resourcev1alpha3.QualifiedName(key)] = *newVal
}
} else {
out.Capacity = nil
}
return nil return nil
} }
@ -424,7 +458,15 @@ func Convert_resource_CELDeviceSelector_To_v1alpha3_CELDeviceSelector(in *resour
func autoConvert_v1alpha3_Device_To_resource_Device(in *resourcev1alpha3.Device, out *resource.Device, s conversion.Scope) error { func autoConvert_v1alpha3_Device_To_resource_Device(in *resourcev1alpha3.Device, out *resource.Device, s conversion.Scope) error {
out.Name = in.Name out.Name = in.Name
out.Basic = (*resource.BasicDevice)(unsafe.Pointer(in.Basic)) if in.Basic != nil {
in, out := &in.Basic, &out.Basic
*out = new(resource.BasicDevice)
if err := Convert_v1alpha3_BasicDevice_To_resource_BasicDevice(*in, *out, s); err != nil {
return err
}
} else {
out.Basic = nil
}
return nil return nil
} }
@ -435,7 +477,15 @@ func Convert_v1alpha3_Device_To_resource_Device(in *resourcev1alpha3.Device, out
func autoConvert_resource_Device_To_v1alpha3_Device(in *resource.Device, out *resourcev1alpha3.Device, s conversion.Scope) error { func autoConvert_resource_Device_To_v1alpha3_Device(in *resource.Device, out *resourcev1alpha3.Device, s conversion.Scope) error {
out.Name = in.Name out.Name = in.Name
out.Basic = (*resourcev1alpha3.BasicDevice)(unsafe.Pointer(in.Basic)) if in.Basic != nil {
in, out := &in.Basic, &out.Basic
*out = new(resourcev1alpha3.BasicDevice)
if err := Convert_resource_BasicDevice_To_v1alpha3_BasicDevice(*in, *out, s); err != nil {
return err
}
} else {
out.Basic = nil
}
return nil return nil
} }
@ -1058,7 +1108,17 @@ func Convert_resource_ResourceSlice_To_v1alpha3_ResourceSlice(in *resource.Resou
func autoConvert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList(in *resourcev1alpha3.ResourceSliceList, out *resource.ResourceSliceList, s conversion.Scope) error { func autoConvert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList(in *resourcev1alpha3.ResourceSliceList, out *resource.ResourceSliceList, s conversion.Scope) error {
out.ListMeta = in.ListMeta out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceSlice)(unsafe.Pointer(&in.Items)) if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]resource.ResourceSlice, len(*in))
for i := range *in {
if err := Convert_v1alpha3_ResourceSlice_To_resource_ResourceSlice(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil return nil
} }
@ -1069,7 +1129,17 @@ func Convert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList(in *resour
func autoConvert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(in *resource.ResourceSliceList, out *resourcev1alpha3.ResourceSliceList, s conversion.Scope) error { func autoConvert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(in *resource.ResourceSliceList, out *resourcev1alpha3.ResourceSliceList, s conversion.Scope) error {
out.ListMeta = in.ListMeta out.ListMeta = in.ListMeta
out.Items = *(*[]resourcev1alpha3.ResourceSlice)(unsafe.Pointer(&in.Items)) if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]resourcev1alpha3.ResourceSlice, len(*in))
for i := range *in {
if err := Convert_resource_ResourceSlice_To_v1alpha3_ResourceSlice(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil return nil
} }
@ -1086,7 +1156,17 @@ func autoConvert_v1alpha3_ResourceSliceSpec_To_resource_ResourceSliceSpec(in *re
out.NodeName = in.NodeName out.NodeName = in.NodeName
out.NodeSelector = (*core.NodeSelector)(unsafe.Pointer(in.NodeSelector)) out.NodeSelector = (*core.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.AllNodes = in.AllNodes out.AllNodes = in.AllNodes
out.Devices = *(*[]resource.Device)(unsafe.Pointer(&in.Devices)) if in.Devices != nil {
in, out := &in.Devices, &out.Devices
*out = make([]resource.Device, len(*in))
for i := range *in {
if err := Convert_v1alpha3_Device_To_resource_Device(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Devices = nil
}
return nil return nil
} }
@ -1103,7 +1183,17 @@ func autoConvert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(in *re
out.NodeName = in.NodeName out.NodeName = in.NodeName
out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector)) out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.AllNodes = in.AllNodes out.AllNodes = in.AllNodes
out.Devices = *(*[]resourcev1alpha3.Device)(unsafe.Pointer(&in.Devices)) if in.Devices != nil {
in, out := &in.Devices, &out.Devices
*out = make([]resourcev1alpha3.Device, len(*in))
for i := range *in {
if err := Convert_resource_Device_To_v1alpha3_Device(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Devices = nil
}
return nil return nil
} }

View File

@ -26,7 +26,6 @@ import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1beta1 "k8s.io/api/resource/v1beta1" resourcev1beta1 "k8s.io/api/resource/v1beta1"
apiresource "k8s.io/apimachinery/pkg/api/resource"
conversion "k8s.io/apimachinery/pkg/conversion" conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
@ -111,6 +110,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.DeviceCapacity)(nil), (*resource.DeviceCapacity)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_DeviceCapacity_To_resource_DeviceCapacity(a.(*resourcev1beta1.DeviceCapacity), b.(*resource.DeviceCapacity), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.DeviceCapacity)(nil), (*resourcev1beta1.DeviceCapacity)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_DeviceCapacity_To_v1beta1_DeviceCapacity(a.(*resource.DeviceCapacity), b.(*resourcev1beta1.DeviceCapacity), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.DeviceClaim)(nil), (*resource.DeviceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*resourcev1beta1.DeviceClaim)(nil), (*resource.DeviceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_DeviceClaim_To_resource_DeviceClaim(a.(*resourcev1beta1.DeviceClaim), b.(*resource.DeviceClaim), scope) return Convert_v1beta1_DeviceClaim_To_resource_DeviceClaim(a.(*resourcev1beta1.DeviceClaim), b.(*resource.DeviceClaim), scope)
}); err != nil { }); err != nil {
@ -382,7 +391,7 @@ func Convert_resource_AllocationResult_To_v1beta1_AllocationResult(in *resource.
func autoConvert_v1beta1_BasicDevice_To_resource_BasicDevice(in *resourcev1beta1.BasicDevice, out *resource.BasicDevice, s conversion.Scope) error { func autoConvert_v1beta1_BasicDevice_To_resource_BasicDevice(in *resourcev1beta1.BasicDevice, out *resource.BasicDevice, s conversion.Scope) error {
out.Attributes = *(*map[resource.QualifiedName]resource.DeviceAttribute)(unsafe.Pointer(&in.Attributes)) out.Attributes = *(*map[resource.QualifiedName]resource.DeviceAttribute)(unsafe.Pointer(&in.Attributes))
out.Capacity = *(*map[resource.QualifiedName]apiresource.Quantity)(unsafe.Pointer(&in.Capacity)) out.Capacity = *(*map[resource.QualifiedName]resource.DeviceCapacity)(unsafe.Pointer(&in.Capacity))
return nil return nil
} }
@ -393,7 +402,7 @@ func Convert_v1beta1_BasicDevice_To_resource_BasicDevice(in *resourcev1beta1.Bas
func autoConvert_resource_BasicDevice_To_v1beta1_BasicDevice(in *resource.BasicDevice, out *resourcev1beta1.BasicDevice, s conversion.Scope) error { func autoConvert_resource_BasicDevice_To_v1beta1_BasicDevice(in *resource.BasicDevice, out *resourcev1beta1.BasicDevice, s conversion.Scope) error {
out.Attributes = *(*map[resourcev1beta1.QualifiedName]resourcev1beta1.DeviceAttribute)(unsafe.Pointer(&in.Attributes)) out.Attributes = *(*map[resourcev1beta1.QualifiedName]resourcev1beta1.DeviceAttribute)(unsafe.Pointer(&in.Attributes))
out.Capacity = *(*map[resourcev1beta1.QualifiedName]apiresource.Quantity)(unsafe.Pointer(&in.Capacity)) out.Capacity = *(*map[resourcev1beta1.QualifiedName]resourcev1beta1.DeviceCapacity)(unsafe.Pointer(&in.Capacity))
return nil return nil
} }
@ -520,6 +529,26 @@ func Convert_resource_DeviceAttribute_To_v1beta1_DeviceAttribute(in *resource.De
return autoConvert_resource_DeviceAttribute_To_v1beta1_DeviceAttribute(in, out, s) return autoConvert_resource_DeviceAttribute_To_v1beta1_DeviceAttribute(in, out, s)
} }
func autoConvert_v1beta1_DeviceCapacity_To_resource_DeviceCapacity(in *resourcev1beta1.DeviceCapacity, out *resource.DeviceCapacity, s conversion.Scope) error {
out.Quantity = in.Quantity
return nil
}
// Convert_v1beta1_DeviceCapacity_To_resource_DeviceCapacity is an autogenerated conversion function.
func Convert_v1beta1_DeviceCapacity_To_resource_DeviceCapacity(in *resourcev1beta1.DeviceCapacity, out *resource.DeviceCapacity, s conversion.Scope) error {
return autoConvert_v1beta1_DeviceCapacity_To_resource_DeviceCapacity(in, out, s)
}
func autoConvert_resource_DeviceCapacity_To_v1beta1_DeviceCapacity(in *resource.DeviceCapacity, out *resourcev1beta1.DeviceCapacity, s conversion.Scope) error {
out.Quantity = in.Quantity
return nil
}
// Convert_resource_DeviceCapacity_To_v1beta1_DeviceCapacity is an autogenerated conversion function.
func Convert_resource_DeviceCapacity_To_v1beta1_DeviceCapacity(in *resource.DeviceCapacity, out *resourcev1beta1.DeviceCapacity, s conversion.Scope) error {
return autoConvert_resource_DeviceCapacity_To_v1beta1_DeviceCapacity(in, out, s)
}
func autoConvert_v1beta1_DeviceClaim_To_resource_DeviceClaim(in *resourcev1beta1.DeviceClaim, out *resource.DeviceClaim, s conversion.Scope) error { func autoConvert_v1beta1_DeviceClaim_To_resource_DeviceClaim(in *resourcev1beta1.DeviceClaim, out *resource.DeviceClaim, s conversion.Scope) error {
out.Requests = *(*[]resource.DeviceRequest)(unsafe.Pointer(&in.Requests)) out.Requests = *(*[]resource.DeviceRequest)(unsafe.Pointer(&in.Requests))
out.Constraints = *(*[]resource.DeviceConstraint)(unsafe.Pointer(&in.Constraints)) out.Constraints = *(*[]resource.DeviceConstraint)(unsafe.Pointer(&in.Constraints))

View File

@ -24,7 +24,6 @@ import (
"strings" "strings"
apiequality "k8s.io/apimachinery/pkg/api/equality" apiequality "k8s.io/apimachinery/pkg/api/equality"
apiresource "k8s.io/apimachinery/pkg/api/resource"
apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
@ -523,7 +522,7 @@ func validateBasicDevice(device resource.BasicDevice, fldPath *field.Path) field
// field is too large, then so is the combination. // field is too large, then so is the combination.
maxKeyLen := resource.DeviceMaxDomainLength + 1 + resource.DeviceMaxIDLength maxKeyLen := resource.DeviceMaxDomainLength + 1 + resource.DeviceMaxIDLength
allErrs = append(allErrs, validateMap(device.Attributes, -1, maxKeyLen, validateQualifiedName, validateDeviceAttribute, fldPath.Child("attributes"))...) allErrs = append(allErrs, validateMap(device.Attributes, -1, maxKeyLen, validateQualifiedName, validateDeviceAttribute, fldPath.Child("attributes"))...)
allErrs = append(allErrs, validateMap(device.Capacity, -1, maxKeyLen, validateQualifiedName, validateQuantity, fldPath.Child("capacity"))...) allErrs = append(allErrs, validateMap(device.Capacity, -1, maxKeyLen, validateQualifiedName, validateDeviceCapacity, fldPath.Child("capacity"))...)
if combinedLen, max := len(device.Attributes)+len(device.Capacity), resource.ResourceSliceMaxAttributesAndCapacitiesPerDevice; combinedLen > max { if combinedLen, max := len(device.Attributes)+len(device.Capacity), resource.ResourceSliceMaxAttributesAndCapacitiesPerDevice; combinedLen > max {
allErrs = append(allErrs, field.Invalid(fldPath, combinedLen, fmt.Sprintf("the total number of attributes and capacities must not exceed %d", max))) allErrs = append(allErrs, field.Invalid(fldPath, combinedLen, fmt.Sprintf("the total number of attributes and capacities must not exceed %d", max)))
} }
@ -587,7 +586,7 @@ func validateDeviceAttribute(attribute resource.DeviceAttribute, fldPath *field.
return allErrs return allErrs
} }
func validateQuantity(quantity apiresource.Quantity, fldPath *field.Path) field.ErrorList { func validateDeviceCapacity(capacity resource.DeviceCapacity, fldPath *field.Path) field.ErrorList {
// Any parsed quantity is valid. // Any parsed quantity is valid.
return nil return nil
} }

View File

@ -38,9 +38,9 @@ func testAttributes() map[resourceapi.QualifiedName]resourceapi.DeviceAttribute
} }
} }
func testCapacity() map[resourceapi.QualifiedName]resource.Quantity { func testCapacity() map[resourceapi.QualifiedName]resourceapi.DeviceCapacity {
return map[resourceapi.QualifiedName]resource.Quantity{ return map[resourceapi.QualifiedName]resourceapi.DeviceCapacity{
"memory": resource.MustParse("1Gi"), "memory": {Quantity: resource.MustParse("1Gi")},
} }
} }
@ -411,20 +411,21 @@ func TestValidateResourceSlice(t *testing.T) {
slice: func() *resourceapi.ResourceSlice { slice: func() *resourceapi.ResourceSlice {
slice := testResourceSlice(goodName, goodName, goodName, 3) slice := testResourceSlice(goodName, goodName, goodName, 3)
slice.Spec.Devices[0].Basic.Attributes = map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{} slice.Spec.Devices[0].Basic.Attributes = map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{}
slice.Spec.Devices[0].Basic.Capacity = map[resourceapi.QualifiedName]resource.Quantity{} slice.Spec.Devices[0].Basic.Capacity = map[resourceapi.QualifiedName]resourceapi.DeviceCapacity{}
for i := 0; i < resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice; i++ { for i := 0; i < resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice; i++ {
slice.Spec.Devices[0].Basic.Attributes[resourceapi.QualifiedName(fmt.Sprintf("attr_%d", i))] = resourceapi.DeviceAttribute{StringValue: ptr.To("x")} slice.Spec.Devices[0].Basic.Attributes[resourceapi.QualifiedName(fmt.Sprintf("attr_%d", i))] = resourceapi.DeviceAttribute{StringValue: ptr.To("x")}
} }
slice.Spec.Devices[1].Basic.Attributes = map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{} slice.Spec.Devices[1].Basic.Attributes = map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{}
slice.Spec.Devices[1].Basic.Capacity = map[resourceapi.QualifiedName]resource.Quantity{} slice.Spec.Devices[1].Basic.Capacity = map[resourceapi.QualifiedName]resourceapi.DeviceCapacity{}
quantity := resource.MustParse("1Gi") quantity := resource.MustParse("1Gi")
capacity := resourceapi.DeviceCapacity{Quantity: quantity}
for i := 0; i < resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice; i++ { for i := 0; i < resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice; i++ {
slice.Spec.Devices[1].Basic.Capacity[resourceapi.QualifiedName(fmt.Sprintf("cap_%d", i))] = quantity slice.Spec.Devices[1].Basic.Capacity[resourceapi.QualifiedName(fmt.Sprintf("cap_%d", i))] = capacity
} }
// Too large together by one. // Too large together by one.
slice.Spec.Devices[2].Basic.Attributes = slice.Spec.Devices[0].Basic.Attributes slice.Spec.Devices[2].Basic.Attributes = slice.Spec.Devices[0].Basic.Attributes
slice.Spec.Devices[2].Basic.Capacity = map[resourceapi.QualifiedName]resource.Quantity{ slice.Spec.Devices[2].Basic.Capacity = map[resourceapi.QualifiedName]resourceapi.DeviceCapacity{
"cap": quantity, "cap": capacity,
} }
return slice return slice
}(), }(),

View File

@ -22,7 +22,6 @@ limitations under the License.
package resource package resource
import ( import (
apiresource "k8s.io/apimachinery/pkg/api/resource"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
core "k8s.io/kubernetes/pkg/apis/core" core "k8s.io/kubernetes/pkg/apis/core"
) )
@ -61,9 +60,9 @@ func (in *BasicDevice) DeepCopyInto(out *BasicDevice) {
} }
if in.Capacity != nil { if in.Capacity != nil {
in, out := &in.Capacity, &out.Capacity in, out := &in.Capacity, &out.Capacity
*out = make(map[QualifiedName]apiresource.Quantity, len(*in)) *out = make(map[QualifiedName]DeviceCapacity, len(*in))
for key, val := range *in { for key, val := range *in {
(*out)[key] = val.DeepCopy() (*out)[key] = *val.DeepCopy()
} }
} }
return return
@ -204,6 +203,23 @@ func (in *DeviceAttribute) DeepCopy() *DeviceAttribute {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeviceCapacity) DeepCopyInto(out *DeviceCapacity) {
*out = *in
out.Quantity = in.Quantity.DeepCopy()
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCapacity.
func (in *DeviceCapacity) DeepCopy() *DeviceCapacity {
if in == nil {
return nil
}
out := new(DeviceCapacity)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) { func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) {
*out = *in *out = *in

View File

@ -938,6 +938,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/resource/v1beta1.DeviceAllocationConfiguration": schema_k8sio_api_resource_v1beta1_DeviceAllocationConfiguration(ref), "k8s.io/api/resource/v1beta1.DeviceAllocationConfiguration": schema_k8sio_api_resource_v1beta1_DeviceAllocationConfiguration(ref),
"k8s.io/api/resource/v1beta1.DeviceAllocationResult": schema_k8sio_api_resource_v1beta1_DeviceAllocationResult(ref), "k8s.io/api/resource/v1beta1.DeviceAllocationResult": schema_k8sio_api_resource_v1beta1_DeviceAllocationResult(ref),
"k8s.io/api/resource/v1beta1.DeviceAttribute": schema_k8sio_api_resource_v1beta1_DeviceAttribute(ref), "k8s.io/api/resource/v1beta1.DeviceAttribute": schema_k8sio_api_resource_v1beta1_DeviceAttribute(ref),
"k8s.io/api/resource/v1beta1.DeviceCapacity": schema_k8sio_api_resource_v1beta1_DeviceCapacity(ref),
"k8s.io/api/resource/v1beta1.DeviceClaim": schema_k8sio_api_resource_v1beta1_DeviceClaim(ref), "k8s.io/api/resource/v1beta1.DeviceClaim": schema_k8sio_api_resource_v1beta1_DeviceClaim(ref),
"k8s.io/api/resource/v1beta1.DeviceClaimConfiguration": schema_k8sio_api_resource_v1beta1_DeviceClaimConfiguration(ref), "k8s.io/api/resource/v1beta1.DeviceClaimConfiguration": schema_k8sio_api_resource_v1beta1_DeviceClaimConfiguration(ref),
"k8s.io/api/resource/v1beta1.DeviceClass": schema_k8sio_api_resource_v1beta1_DeviceClass(ref), "k8s.io/api/resource/v1beta1.DeviceClass": schema_k8sio_api_resource_v1beta1_DeviceClass(ref),
@ -47673,7 +47674,8 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback)
Allows: true, Allows: true,
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1beta1.DeviceCapacity"),
}, },
}, },
}, },
@ -47683,7 +47685,7 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback)
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1beta1.DeviceAttribute", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, "k8s.io/api/resource/v1beta1.DeviceAttribute", "k8s.io/api/resource/v1beta1.DeviceCapacity"},
} }
} }
@ -47883,6 +47885,28 @@ func schema_k8sio_api_resource_v1beta1_DeviceAttribute(ref common.ReferenceCallb
} }
} }
func schema_k8sio_api_resource_v1beta1_DeviceCapacity(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "DeviceCapacity describes a quantity associated with a device.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"quantity": {
SchemaProps: spec.SchemaProps{
Description: "Quantity defines how much of a certain device capacity is available.",
Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"),
},
},
},
Required: []string{"quantity"},
},
},
Dependencies: []string{
"k8s.io/apimachinery/pkg/api/resource.Quantity"},
}
}
func schema_k8sio_api_resource_v1beta1_DeviceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1beta1_DeviceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{

View File

@ -27,7 +27,6 @@ import (
proto "github.com/gogo/protobuf/proto" proto "github.com/gogo/protobuf/proto"
github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
math "math" math "math"
math_bits "math/bits" math_bits "math/bits"
@ -244,10 +243,38 @@ func (m *DeviceAttribute) XXX_DiscardUnknown() {
var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo
func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} }
func (*DeviceCapacity) ProtoMessage() {}
func (*DeviceCapacity) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{7}
}
func (m *DeviceCapacity) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DeviceCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *DeviceCapacity) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceCapacity.Merge(m, src)
}
func (m *DeviceCapacity) XXX_Size() int {
return m.Size()
}
func (m *DeviceCapacity) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceCapacity.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceCapacity proto.InternalMessageInfo
func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } func (m *DeviceClaim) Reset() { *m = DeviceClaim{} }
func (*DeviceClaim) ProtoMessage() {} func (*DeviceClaim) ProtoMessage() {}
func (*DeviceClaim) Descriptor() ([]byte, []int) { func (*DeviceClaim) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{7} return fileDescriptor_ba331e3ec6484c27, []int{8}
} }
func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { func (m *DeviceClaim) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -275,7 +302,7 @@ var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo
func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} }
func (*DeviceClaimConfiguration) ProtoMessage() {} func (*DeviceClaimConfiguration) ProtoMessage() {}
func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{8} return fileDescriptor_ba331e3ec6484c27, []int{9}
} }
func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -303,7 +330,7 @@ var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo
func (m *DeviceClass) Reset() { *m = DeviceClass{} } func (m *DeviceClass) Reset() { *m = DeviceClass{} }
func (*DeviceClass) ProtoMessage() {} func (*DeviceClass) ProtoMessage() {}
func (*DeviceClass) Descriptor() ([]byte, []int) { func (*DeviceClass) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{9} return fileDescriptor_ba331e3ec6484c27, []int{10}
} }
func (m *DeviceClass) XXX_Unmarshal(b []byte) error { func (m *DeviceClass) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -331,7 +358,7 @@ var xxx_messageInfo_DeviceClass proto.InternalMessageInfo
func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} }
func (*DeviceClassConfiguration) ProtoMessage() {} func (*DeviceClassConfiguration) ProtoMessage() {}
func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{10} return fileDescriptor_ba331e3ec6484c27, []int{11}
} }
func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -359,7 +386,7 @@ var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo
func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } func (m *DeviceClassList) Reset() { *m = DeviceClassList{} }
func (*DeviceClassList) ProtoMessage() {} func (*DeviceClassList) ProtoMessage() {}
func (*DeviceClassList) Descriptor() ([]byte, []int) { func (*DeviceClassList) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{11} return fileDescriptor_ba331e3ec6484c27, []int{12}
} }
func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { func (m *DeviceClassList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -387,7 +414,7 @@ var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo
func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} }
func (*DeviceClassSpec) ProtoMessage() {} func (*DeviceClassSpec) ProtoMessage() {}
func (*DeviceClassSpec) Descriptor() ([]byte, []int) { func (*DeviceClassSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{12} return fileDescriptor_ba331e3ec6484c27, []int{13}
} }
func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -415,7 +442,7 @@ var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo
func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} }
func (*DeviceConfiguration) ProtoMessage() {} func (*DeviceConfiguration) ProtoMessage() {}
func (*DeviceConfiguration) Descriptor() ([]byte, []int) { func (*DeviceConfiguration) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{13} return fileDescriptor_ba331e3ec6484c27, []int{14}
} }
func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -443,7 +470,7 @@ var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo
func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} }
func (*DeviceConstraint) ProtoMessage() {} func (*DeviceConstraint) ProtoMessage() {}
func (*DeviceConstraint) Descriptor() ([]byte, []int) { func (*DeviceConstraint) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{14} return fileDescriptor_ba331e3ec6484c27, []int{15}
} }
func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -471,7 +498,7 @@ var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo
func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } func (m *DeviceRequest) Reset() { *m = DeviceRequest{} }
func (*DeviceRequest) ProtoMessage() {} func (*DeviceRequest) ProtoMessage() {}
func (*DeviceRequest) Descriptor() ([]byte, []int) { func (*DeviceRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{15} return fileDescriptor_ba331e3ec6484c27, []int{16}
} }
func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { func (m *DeviceRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -499,7 +526,7 @@ var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo
func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} }
func (*DeviceRequestAllocationResult) ProtoMessage() {} func (*DeviceRequestAllocationResult) ProtoMessage() {}
func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{16} return fileDescriptor_ba331e3ec6484c27, []int{17}
} }
func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -527,7 +554,7 @@ var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo
func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } func (m *DeviceSelector) Reset() { *m = DeviceSelector{} }
func (*DeviceSelector) ProtoMessage() {} func (*DeviceSelector) ProtoMessage() {}
func (*DeviceSelector) Descriptor() ([]byte, []int) { func (*DeviceSelector) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{17} return fileDescriptor_ba331e3ec6484c27, []int{18}
} }
func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { func (m *DeviceSelector) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -555,7 +582,7 @@ var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo
func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} }
func (*OpaqueDeviceConfiguration) ProtoMessage() {} func (*OpaqueDeviceConfiguration) ProtoMessage() {}
func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{18} return fileDescriptor_ba331e3ec6484c27, []int{19}
} }
func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -583,7 +610,7 @@ var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo
func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (m *ResourceClaim) Reset() { *m = ResourceClaim{} }
func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) ProtoMessage() {}
func (*ResourceClaim) Descriptor() ([]byte, []int) { func (*ResourceClaim) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{19} return fileDescriptor_ba331e3ec6484c27, []int{20}
} }
func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { func (m *ResourceClaim) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -611,7 +638,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo
func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} }
func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) ProtoMessage() {}
func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{20} return fileDescriptor_ba331e3ec6484c27, []int{21}
} }
func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -639,7 +666,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo
func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} }
func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) ProtoMessage() {}
func (*ResourceClaimList) Descriptor() ([]byte, []int) { func (*ResourceClaimList) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{21} return fileDescriptor_ba331e3ec6484c27, []int{22}
} }
func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -667,7 +694,7 @@ var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo
func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} }
func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) ProtoMessage() {}
func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { func (*ResourceClaimSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{22} return fileDescriptor_ba331e3ec6484c27, []int{23}
} }
func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -695,7 +722,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo
func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} }
func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) ProtoMessage() {}
func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { func (*ResourceClaimStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{23} return fileDescriptor_ba331e3ec6484c27, []int{24}
} }
func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -723,7 +750,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo
func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} }
func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) ProtoMessage() {}
func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{24} return fileDescriptor_ba331e3ec6484c27, []int{25}
} }
func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -751,7 +778,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo
func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} }
func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) ProtoMessage() {}
func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{25} return fileDescriptor_ba331e3ec6484c27, []int{26}
} }
func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -779,7 +806,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo
func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} }
func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) ProtoMessage() {}
func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{26} return fileDescriptor_ba331e3ec6484c27, []int{27}
} }
func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -807,7 +834,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo
func (m *ResourcePool) Reset() { *m = ResourcePool{} } func (m *ResourcePool) Reset() { *m = ResourcePool{} }
func (*ResourcePool) ProtoMessage() {} func (*ResourcePool) ProtoMessage() {}
func (*ResourcePool) Descriptor() ([]byte, []int) { func (*ResourcePool) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{27} return fileDescriptor_ba331e3ec6484c27, []int{28}
} }
func (m *ResourcePool) XXX_Unmarshal(b []byte) error { func (m *ResourcePool) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -835,7 +862,7 @@ var xxx_messageInfo_ResourcePool proto.InternalMessageInfo
func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } func (m *ResourceSlice) Reset() { *m = ResourceSlice{} }
func (*ResourceSlice) ProtoMessage() {} func (*ResourceSlice) ProtoMessage() {}
func (*ResourceSlice) Descriptor() ([]byte, []int) { func (*ResourceSlice) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{28} return fileDescriptor_ba331e3ec6484c27, []int{29}
} }
func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { func (m *ResourceSlice) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -863,7 +890,7 @@ var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo
func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} }
func (*ResourceSliceList) ProtoMessage() {} func (*ResourceSliceList) ProtoMessage() {}
func (*ResourceSliceList) Descriptor() ([]byte, []int) { func (*ResourceSliceList) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{29} return fileDescriptor_ba331e3ec6484c27, []int{30}
} }
func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -891,7 +918,7 @@ var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo
func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} }
func (*ResourceSliceSpec) ProtoMessage() {} func (*ResourceSliceSpec) ProtoMessage() {}
func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { func (*ResourceSliceSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_ba331e3ec6484c27, []int{30} return fileDescriptor_ba331e3ec6484c27, []int{31}
} }
func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -920,12 +947,13 @@ func init() {
proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1beta1.AllocationResult") proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1beta1.AllocationResult")
proto.RegisterType((*BasicDevice)(nil), "k8s.io.api.resource.v1beta1.BasicDevice") proto.RegisterType((*BasicDevice)(nil), "k8s.io.api.resource.v1beta1.BasicDevice")
proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.AttributesEntry") proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.AttributesEntry")
proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.CapacityEntry") proto.RegisterMapType((map[QualifiedName]DeviceCapacity)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.CapacityEntry")
proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1beta1.CELDeviceSelector") proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1beta1.CELDeviceSelector")
proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1beta1.Device") proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1beta1.Device")
proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationConfiguration") proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationConfiguration")
proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationResult") proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationResult")
proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.DeviceAttribute") proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.DeviceAttribute")
proto.RegisterType((*DeviceCapacity)(nil), "k8s.io.api.resource.v1beta1.DeviceCapacity")
proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1beta1.DeviceClaim") proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1beta1.DeviceClaim")
proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceClaimConfiguration") proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceClaimConfiguration")
proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1beta1.DeviceClass") proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1beta1.DeviceClass")
@ -957,122 +985,124 @@ func init() {
} }
var fileDescriptor_ba331e3ec6484c27 = []byte{ var fileDescriptor_ba331e3ec6484c27 = []byte{
// 1832 bytes of a gzipped FileDescriptorProto // 1862 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x19, 0xcd, 0x6f, 0xdc, 0x58, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x6f, 0x1c, 0x49,
0x3d, 0x1e, 0x67, 0x26, 0xc9, 0x6f, 0xf2, 0xd5, 0x57, 0x58, 0xb2, 0xa9, 0x98, 0x69, 0x5d, 0x09, 0x19, 0x77, 0xbb, 0xed, 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, 0x98, 0xf9, 0xe8, 0x65, 0x63, 0xe6, 0x27, 0xa3, 0x86, 0x40, 0x04, 0x4e, 0xb1, 0x6d, 0x2e, 0x10, 0x03, 0xe4, 0x14, 0xa7, 0x48, 0x3a, 0x4e, 0x24, 0xd0,
0xf4, 0x62, 0xd4, 0x90, 0x3e, 0x1c, 0x35, 0xa4, 0x8f, 0x46, 0x0d, 0xe9, 0x9f, 0xa3, 0x86, 0xf4, 0x7e, 0xba, 0x39, 0x6b, 0xa2, 0x22, 0x57, 0x2b, 0x6c, 0xce, 0xf2, 0xa5, 0x69, 0x74, 0x9f, 0xbf,
0xb3, 0x8f, 0x1b, 0x33, 0x6f, 0xdf, 0x98, 0xf2, 0xc7, 0xdb, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x68, 0xce, 0x7d, 0xf8, 0xa2, 0x39, 0xf7, 0xd1, 0x8b, 0xe6, 0xdc, 0x4f, 0xc6, 0x4d, 0xe5, 0xf9,
0xb6, 0x94, 0xf6, 0xea, 0x96, 0x1b, 0x00, 0x00, 0xb8, 0xa9, 0x7c, 0x38, 0x6e, 0x2a, 0x1f, 0x8d, 0x9b, 0xca, 0x3f, 0xc7, 0x4d, 0xe5, 0x67, 0x1f,
0x37, 0xe7, 0xde, 0xbe, 0x34, 0xe3, 0x5f, 0xbe, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x42, 0x0c,
0x39, 0x8d, 0x03, 0x1c, 0x00, 0x00,
} }
func (m *AllocationResult) Marshal() (dAtA []byte, err error) { func (m *AllocationResult) Marshal() (dAtA []byte, err error) {
@ -1419,6 +1449,39 @@ func (m *DeviceAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *DeviceCapacity) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DeviceCapacity) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DeviceCapacity) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.Quantity.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *DeviceClaim) Marshal() (dAtA []byte, err error) { func (m *DeviceClaim) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
@ -2666,6 +2729,17 @@ func (m *DeviceAttribute) Size() (n int) {
return n return n
} }
func (m *DeviceCapacity) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.Quantity.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *DeviceClaim) Size() (n int) { func (m *DeviceClaim) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -3102,7 +3176,7 @@ func (this *BasicDevice) String() string {
keysForCapacity = append(keysForCapacity, string(k)) keysForCapacity = append(keysForCapacity, string(k))
} }
github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
mapStringForCapacity := "map[QualifiedName]resource.Quantity{" mapStringForCapacity := "map[QualifiedName]DeviceCapacity{"
for _, k := range keysForCapacity { for _, k := range keysForCapacity {
mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)])
} }
@ -3181,6 +3255,16 @@ func (this *DeviceAttribute) String() string {
}, "") }, "")
return s return s
} }
func (this *DeviceCapacity) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&DeviceCapacity{`,
`Quantity:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Quantity), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *DeviceClaim) String() string { func (this *DeviceClaim) String() string {
if this == nil { if this == nil {
return "nil" return "nil"
@ -3832,10 +3916,10 @@ func (m *BasicDevice) Unmarshal(dAtA []byte) error {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.Capacity == nil { if m.Capacity == nil {
m.Capacity = make(map[QualifiedName]resource.Quantity) m.Capacity = make(map[QualifiedName]DeviceCapacity)
} }
var mapkey QualifiedName var mapkey QualifiedName
mapvalue := &resource.Quantity{} mapvalue := &DeviceCapacity{}
for iNdEx < postIndex { for iNdEx < postIndex {
entryPreIndex := iNdEx entryPreIndex := iNdEx
var wire uint64 var wire uint64
@ -3909,7 +3993,7 @@ func (m *BasicDevice) Unmarshal(dAtA []byte) error {
if postmsgIndex > l { if postmsgIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
mapvalue = &resource.Quantity{} mapvalue = &DeviceCapacity{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err return err
} }
@ -4574,6 +4658,89 @@ func (m *DeviceAttribute) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *DeviceCapacity) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DeviceCapacity: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DeviceCapacity: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *DeviceClaim) Unmarshal(dAtA []byte) error { func (m *DeviceClaim) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0

View File

@ -60,7 +60,7 @@ message BasicDevice {
// The maximum number of attributes and capacities combined is 32. // The maximum number of attributes and capacities combined is 32.
// //
// +optional // +optional
map<string, .k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 2; map<string, DeviceCapacity> capacity = 2;
} }
// CELDeviceSelector contains a CEL expression for selecting a device. // CELDeviceSelector contains a CEL expression for selecting a device.
@ -204,6 +204,14 @@ message DeviceAttribute {
optional string version = 5; optional string version = 5;
} }
// DeviceCapacity describes a quantity associated with a device.
message DeviceCapacity {
// Quantity defines how much of a certain device capacity is available.
//
// +required
optional .k8s.io.apimachinery.pkg.api.resource.Quantity quantity = 1;
}
// DeviceClaim defines how to request devices with a ResourceClaim. // DeviceClaim defines how to request devices with a ResourceClaim.
message DeviceClaim { message DeviceClaim {
// Requests represent individual requests for distinct devices which // Requests represent individual requests for distinct devices which

View File

@ -217,7 +217,18 @@ type BasicDevice struct {
// The maximum number of attributes and capacities combined is 32. // The maximum number of attributes and capacities combined is 32.
// //
// +optional // +optional
Capacity map[QualifiedName]resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,2,rep,name=capacity"` Capacity map[QualifiedName]DeviceCapacity `json:"capacity,omitempty" protobuf:"bytes,2,rep,name=capacity"`
}
// DeviceCapacity describes a quantity associated with a device.
type DeviceCapacity struct {
// Quantity defines how much of a certain device capacity is available.
//
// +required
Quantity resource.Quantity `json:"quantity" protobuf:"bytes,1,rep,name=quantity"`
// potential future addition: fields which define how to "consume"
// capacity (= share a single device between different consumers).
} }
// Limit for the sum of the number of entries in both attributes and capacity. // Limit for the sum of the number of entries in both attributes and capacity.

View File

@ -98,6 +98,15 @@ func (DeviceAttribute) SwaggerDoc() map[string]string {
return map_DeviceAttribute return map_DeviceAttribute
} }
var map_DeviceCapacity = map[string]string{
"": "DeviceCapacity describes a quantity associated with a device.",
"quantity": "Quantity defines how much of a certain device capacity is available.",
}
func (DeviceCapacity) SwaggerDoc() map[string]string {
return map_DeviceCapacity
}
var map_DeviceClaim = map[string]string{ var map_DeviceClaim = map[string]string{
"": "DeviceClaim defines how to request devices with a ResourceClaim.", "": "DeviceClaim defines how to request devices with a ResourceClaim.",
"requests": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", "requests": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.",

View File

@ -23,7 +23,6 @@ package v1beta1
import ( import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
@ -61,9 +60,9 @@ func (in *BasicDevice) DeepCopyInto(out *BasicDevice) {
} }
if in.Capacity != nil { if in.Capacity != nil {
in, out := &in.Capacity, &out.Capacity in, out := &in.Capacity, &out.Capacity
*out = make(map[QualifiedName]resource.Quantity, len(*in)) *out = make(map[QualifiedName]DeviceCapacity, len(*in))
for key, val := range *in { for key, val := range *in {
(*out)[key] = val.DeepCopy() (*out)[key] = *val.DeepCopy()
} }
} }
return return
@ -204,6 +203,23 @@ func (in *DeviceAttribute) DeepCopy() *DeviceAttribute {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeviceCapacity) DeepCopyInto(out *DeviceCapacity) {
*out = *in
out.Quantity = in.Quantity.DeepCopy()
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCapacity.
func (in *DeviceCapacity) DeepCopy() *DeviceCapacity {
if in == nil {
return nil
}
out := new(DeviceCapacity)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) { func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) {
*out = *in *out = *in

View File

@ -89,7 +89,9 @@
} }
}, },
"capacity": { "capacity": {
"capacityKey": "0" "capacityKey": {
"quantity": "0"
}
} }
} }
} }

View File

@ -43,7 +43,8 @@ spec:
string: stringValue string: stringValue
version: versionValue version: versionValue
capacity: capacity:
capacityKey: "0" capacityKey:
quantity: "0"
name: nameValue name: nameValue
driver: driverValue driver: driverValue
nodeName: nodeNameValue nodeName: nodeNameValue

View File

@ -12754,7 +12754,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
map: map:
elementType: elementType:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity namedType: io.k8s.api.resource.v1beta1.DeviceCapacity
- name: io.k8s.api.resource.v1beta1.CELDeviceSelector - name: io.k8s.api.resource.v1beta1.CELDeviceSelector
map: map:
fields: fields:
@ -12818,6 +12818,12 @@ var schemaYAML = typed.YAMLObject(`types:
- name: version - name: version
type: type:
scalar: string scalar: string
- name: io.k8s.api.resource.v1beta1.DeviceCapacity
map:
fields:
- name: quantity
type:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: io.k8s.api.resource.v1beta1.DeviceClaim - name: io.k8s.api.resource.v1beta1.DeviceClaim
map: map:
fields: fields:

View File

@ -20,14 +20,13 @@ package v1beta1
import ( import (
resourcev1beta1 "k8s.io/api/resource/v1beta1" resourcev1beta1 "k8s.io/api/resource/v1beta1"
resource "k8s.io/apimachinery/pkg/api/resource"
) )
// BasicDeviceApplyConfiguration represents a declarative configuration of the BasicDevice type for use // BasicDeviceApplyConfiguration represents a declarative configuration of the BasicDevice type for use
// with apply. // with apply.
type BasicDeviceApplyConfiguration struct { type BasicDeviceApplyConfiguration struct {
Attributes map[resourcev1beta1.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"` Attributes map[resourcev1beta1.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
Capacity map[resourcev1beta1.QualifiedName]resource.Quantity `json:"capacity,omitempty"` Capacity map[resourcev1beta1.QualifiedName]DeviceCapacityApplyConfiguration `json:"capacity,omitempty"`
} }
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with // BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
@ -54,9 +53,9 @@ func (b *BasicDeviceApplyConfiguration) WithAttributes(entries map[resourcev1bet
// and returns the receiver, so that objects can be build by chaining "With" function invocations. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Capacity field, // If called multiple times, the entries provided by each call will be put on the Capacity field,
// overwriting an existing map entries in Capacity field with the same key. // overwriting an existing map entries in Capacity field with the same key.
func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[resourcev1beta1.QualifiedName]resource.Quantity) *BasicDeviceApplyConfiguration { func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[resourcev1beta1.QualifiedName]DeviceCapacityApplyConfiguration) *BasicDeviceApplyConfiguration {
if b.Capacity == nil && len(entries) > 0 { if b.Capacity == nil && len(entries) > 0 {
b.Capacity = make(map[resourcev1beta1.QualifiedName]resource.Quantity, len(entries)) b.Capacity = make(map[resourcev1beta1.QualifiedName]DeviceCapacityApplyConfiguration, len(entries))
} }
for k, v := range entries { for k, v := range entries {
b.Capacity[k] = v b.Capacity[k] = v

View File

@ -0,0 +1,43 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
resource "k8s.io/apimachinery/pkg/api/resource"
)
// DeviceCapacityApplyConfiguration represents a declarative configuration of the DeviceCapacity type for use
// with apply.
type DeviceCapacityApplyConfiguration struct {
Quantity *resource.Quantity `json:"quantity,omitempty"`
}
// DeviceCapacityApplyConfiguration constructs a declarative configuration of the DeviceCapacity type for use with
// apply.
func DeviceCapacity() *DeviceCapacityApplyConfiguration {
return &DeviceCapacityApplyConfiguration{}
}
// WithQuantity sets the Quantity field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Quantity field is set to the value of the last call.
func (b *DeviceCapacityApplyConfiguration) WithQuantity(value resource.Quantity) *DeviceCapacityApplyConfiguration {
b.Quantity = &value
return b
}

View File

@ -1652,6 +1652,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsresourcev1beta1.DeviceAllocationResultApplyConfiguration{} return &applyconfigurationsresourcev1beta1.DeviceAllocationResultApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceAttribute"): case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceAttribute"):
return &applyconfigurationsresourcev1beta1.DeviceAttributeApplyConfiguration{} return &applyconfigurationsresourcev1beta1.DeviceAttributeApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceCapacity"):
return &applyconfigurationsresourcev1beta1.DeviceCapacityApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClaim"): case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClaim"):
return &applyconfigurationsresourcev1beta1.DeviceClaimApplyConfiguration{} return &applyconfigurationsresourcev1beta1.DeviceClaimApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClaimConfiguration"): case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClaimConfiguration"):

View File

@ -31,7 +31,7 @@ var testcases = map[string]struct {
expression string expression string
driver string driver string
attributes map[resourceapi.QualifiedName]resourceapi.DeviceAttribute attributes map[resourceapi.QualifiedName]resourceapi.DeviceAttribute
capacity map[resourceapi.QualifiedName]resource.Quantity capacity map[resourceapi.QualifiedName]resourceapi.DeviceCapacity
expectCompileError string expectCompileError string
expectMatchError string expectMatchError string
expectMatch bool expectMatch bool
@ -149,14 +149,14 @@ var testcases = map[string]struct {
}, },
"quantity": { "quantity": {
expression: `device.capacity["dra.example.com"].name.isGreaterThan(quantity("1Ki"))`, expression: `device.capacity["dra.example.com"].name.isGreaterThan(quantity("1Ki"))`,
capacity: map[resourceapi.QualifiedName]resource.Quantity{"name": resource.MustParse("1Mi")}, capacity: map[resourceapi.QualifiedName]resourceapi.DeviceCapacity{"name": {Quantity: resource.MustParse("1Mi")}},
driver: "dra.example.com", driver: "dra.example.com",
expectMatch: true, expectMatch: true,
expectCost: 6, expectCost: 6,
}, },
"check-positive": { "check-positive": {
expression: `"name" in device.capacity["dra.example.com"] && device.capacity["dra.example.com"].name.isGreaterThan(quantity("1Ki"))`, expression: `"name" in device.capacity["dra.example.com"] && device.capacity["dra.example.com"].name.isGreaterThan(quantity("1Ki"))`,
capacity: map[resourceapi.QualifiedName]resource.Quantity{"name": resource.MustParse("1Mi")}, capacity: map[resourceapi.QualifiedName]resourceapi.DeviceCapacity{"name": {Quantity: resource.MustParse("1Mi")}},
driver: "dra.example.com", driver: "dra.example.com",
expectMatch: true, expectMatch: true,
expectCost: 10, expectCost: 10,
@ -185,8 +185,8 @@ device.attributes["dra.example.com"]["version"].isGreaterThan(semver("0.0.1"))
"string": {StringValue: ptr.To("fish")}, "string": {StringValue: ptr.To("fish")},
"version": {VersionValue: ptr.To("1.0.0")}, "version": {VersionValue: ptr.To("1.0.0")},
}, },
capacity: map[resourceapi.QualifiedName]resource.Quantity{ capacity: map[resourceapi.QualifiedName]resourceapi.DeviceCapacity{
"quantity": resource.MustParse("1Mi"), "quantity": {Quantity: resource.MustParse("1Mi")},
}, },
driver: "dra.example.com", driver: "dra.example.com",
expectMatch: true, expectMatch: true,