From 650f39267a15ca778ad5fb0cec62dbe4ebd607c2 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 14 Mar 2024 14:08:17 +0100 Subject: [PATCH] dra api: NodeResourceModel -> ResourceModel When renaming NodeResourceSlice to ResourceSlice, the embedded [Node]ResourceModel also should have been renamed. Kubernetes-commit: a0add8d2c7578cd9f94fc302d6212f9f7d16175b --- .../{noderesourcemodel.go => resourcemodel.go} | 12 ++++++------ .../resource/v1alpha2/resourceslice.go | 10 +++++----- applyconfigurations/utils.go | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) rename applyconfigurations/resource/v1alpha2/{noderesourcemodel.go => resourcemodel.go} (66%) diff --git a/applyconfigurations/resource/v1alpha2/noderesourcemodel.go b/applyconfigurations/resource/v1alpha2/resourcemodel.go similarity index 66% rename from applyconfigurations/resource/v1alpha2/noderesourcemodel.go rename to applyconfigurations/resource/v1alpha2/resourcemodel.go index 20b7ea861d..8ad7bdf230 100644 --- a/applyconfigurations/resource/v1alpha2/noderesourcemodel.go +++ b/applyconfigurations/resource/v1alpha2/resourcemodel.go @@ -18,22 +18,22 @@ limitations under the License. package v1alpha2 -// NodeResourceModelApplyConfiguration represents an declarative configuration of the NodeResourceModel type for use +// ResourceModelApplyConfiguration represents an declarative configuration of the ResourceModel type for use // with apply. -type NodeResourceModelApplyConfiguration struct { +type ResourceModelApplyConfiguration struct { NamedResources *NamedResourcesResourcesApplyConfiguration `json:"namedResources,omitempty"` } -// NodeResourceModelApplyConfiguration constructs an declarative configuration of the NodeResourceModel type for use with +// ResourceModelApplyConfiguration constructs an declarative configuration of the ResourceModel type for use with // apply. -func NodeResourceModel() *NodeResourceModelApplyConfiguration { - return &NodeResourceModelApplyConfiguration{} +func ResourceModel() *ResourceModelApplyConfiguration { + return &ResourceModelApplyConfiguration{} } // WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call. -func (b *NodeResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *NodeResourceModelApplyConfiguration { +func (b *ResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceModelApplyConfiguration { b.NamedResources = value return b } diff --git a/applyconfigurations/resource/v1alpha2/resourceslice.go b/applyconfigurations/resource/v1alpha2/resourceslice.go index 91ff2a3e5e..ff737ce672 100644 --- a/applyconfigurations/resource/v1alpha2/resourceslice.go +++ b/applyconfigurations/resource/v1alpha2/resourceslice.go @@ -30,11 +30,11 @@ import ( // ResourceSliceApplyConfiguration represents an declarative configuration of the ResourceSlice type for use // with apply. type ResourceSliceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - NodeName *string `json:"nodeName,omitempty"` - DriverName *string `json:"driverName,omitempty"` - NodeResourceModelApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + DriverName *string `json:"driverName,omitempty"` + ResourceModelApplyConfiguration `json:",inline"` } // ResourceSlice constructs an declarative configuration of the ResourceSlice type for use with diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index 2529f03f91..75d9c5c048 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -1559,8 +1559,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &resourcev1alpha2.NamedResourcesResourcesApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesStringSlice"): return &resourcev1alpha2.NamedResourcesStringSliceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NodeResourceModel"): - return &resourcev1alpha2.NodeResourceModelApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext"): return &resourcev1alpha2.PodSchedulingContextApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"): @@ -1597,6 +1595,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &resourcev1alpha2.ResourceFilterModelApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceHandle"): return &resourcev1alpha2.ResourceHandleApplyConfiguration{} + case v1alpha2.SchemeGroupVersion.WithKind("ResourceModel"): + return &resourcev1alpha2.ResourceModelApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequest"): return &resourcev1alpha2.ResourceRequestApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequestModel"):