From 2d8c571a0259b4f7ce7812eaef9ebac69ec5a523 Mon Sep 17 00:00:00 2001 From: Steven Fitzpatrick Date: Tue, 28 Feb 2023 17:14:28 +0000 Subject: [PATCH] Remove v1alpha5 generated code & lint --- api/v1alpha5/zz_generated.conversion.go | 31 ++++++------------------- baremetal/metal3machine_manager.go | 2 +- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/api/v1alpha5/zz_generated.conversion.go b/api/v1alpha5/zz_generated.conversion.go index 619ea37eff..ab0ff9882e 100644 --- a/api/v1alpha5/zz_generated.conversion.go +++ b/api/v1alpha5/zz_generated.conversion.go @@ -1169,7 +1169,6 @@ func autoConvert_v1beta1_Metal3ClusterStatus_To_v1alpha5_Metal3ClusterStatus(in out.LastUpdated = (*v1.Time)(unsafe.Pointer(in.LastUpdated)) out.FailureReason = (*errors.ClusterStatusError)(unsafe.Pointer(in.FailureReason)) out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - // WARNING: in.FailureDomains requires manual conversion: does not exist in peer-type out.Ready = in.Ready // WARNING: in.Conditions requires manual conversion: does not exist in peer-type return nil @@ -1587,10 +1586,14 @@ func autoConvert_v1beta1_Metal3MachineSpec_To_v1alpha5_Metal3MachineSpec(in *v1b out.MetaData = (*corev1.SecretReference)(unsafe.Pointer(in.MetaData)) out.NetworkData = (*corev1.SecretReference)(unsafe.Pointer(in.NetworkData)) out.AutomatedCleaningMode = (*string)(unsafe.Pointer(in.AutomatedCleaningMode)) - // WARNING: in.FailureDomain requires manual conversion: does not exist in peer-type return nil } +// Convert_v1beta1_Metal3MachineSpec_To_v1alpha5_Metal3MachineSpec is an autogenerated conversion function. +func Convert_v1beta1_Metal3MachineSpec_To_v1alpha5_Metal3MachineSpec(in *v1beta1.Metal3MachineSpec, out *Metal3MachineSpec, s conversion.Scope) error { + return autoConvert_v1beta1_Metal3MachineSpec_To_v1alpha5_Metal3MachineSpec(in, out, s) +} + func autoConvert_v1alpha5_Metal3MachineStatus_To_v1beta1_Metal3MachineStatus(in *Metal3MachineStatus, out *v1beta1.Metal3MachineStatus, s conversion.Scope) error { out.LastUpdated = (*v1.Time)(unsafe.Pointer(in.LastUpdated)) out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) @@ -1653,17 +1656,7 @@ func Convert_v1beta1_Metal3MachineTemplate_To_v1alpha5_Metal3MachineTemplate(in func autoConvert_v1alpha5_Metal3MachineTemplateList_To_v1beta1_Metal3MachineTemplateList(in *Metal3MachineTemplateList, out *v1beta1.Metal3MachineTemplateList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.Metal3MachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1alpha5_Metal3MachineTemplate_To_v1beta1_Metal3MachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]v1beta1.Metal3MachineTemplate)(unsafe.Pointer(&in.Items)) return nil } @@ -1674,17 +1667,7 @@ func Convert_v1alpha5_Metal3MachineTemplateList_To_v1beta1_Metal3MachineTemplate func autoConvert_v1beta1_Metal3MachineTemplateList_To_v1alpha5_Metal3MachineTemplateList(in *v1beta1.Metal3MachineTemplateList, out *Metal3MachineTemplateList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Metal3MachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1beta1_Metal3MachineTemplate_To_v1alpha5_Metal3MachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]Metal3MachineTemplate)(unsafe.Pointer(&in.Items)) return nil } diff --git a/baremetal/metal3machine_manager.go b/baremetal/metal3machine_manager.go index f35437b826..993c345b60 100644 --- a/baremetal/metal3machine_manager.go +++ b/baremetal/metal3machine_manager.go @@ -71,7 +71,7 @@ const ( ProviderIDPrefix = "metal3://" // ProviderLabelPrefix is a label prefix for ProviderID. ProviderLabelPrefix = "metal3.io/uuid" - // FailureDomainLabelPrefix is a label prefix for FailureDomains + // FailureDomainLabelPrefix is a label prefix for FailureDomains. FailureDomainLabelPrefix = "infrastructure.cluster.x-k8s.io/failure-domain" )