@@ -27,7 +27,7 @@ import (
2727 utilconversion "sigs.k8s.io/cluster-api/util/conversion"
2828 ctrlconversion "sigs.k8s.io/controller-runtime/pkg/conversion"
2929
30- infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 "
30+ infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5 "
3131)
3232
3333func TestConvertTo (t * testing.T ) {
@@ -120,7 +120,7 @@ func TestFuzzyConversion(t *testing.T) {
120120
121121 fuzzerFuncs := func (_ runtimeserializer.CodecFactory ) []interface {} {
122122 return []interface {}{
123- // Don't test spoke-hub-spoke conversion of v1alpha3 fields which are not in v1beta1
123+ // Don't test spoke-hub-spoke conversion of v1alpha3 fields which are not in v1alpha5
124124 func (v1alpha3ClusterSpec * OpenStackClusterSpec , c fuzz.Continue ) {
125125 c .FuzzNoCustom (v1alpha3ClusterSpec )
126126
@@ -135,7 +135,7 @@ func TestFuzzyConversion(t *testing.T) {
135135 func (v1alpha3RootVolume * RootVolume , c fuzz.Continue ) {
136136 c .FuzzNoCustom (v1alpha3RootVolume )
137137
138- // In v1beta1 only DeviceType="disk" and SourceType="image" are supported
138+ // In v1alpha5 only DeviceType="disk" and SourceType="image" are supported
139139 v1alpha3RootVolume .DeviceType = "disk"
140140 v1alpha3RootVolume .SourceType = "image"
141141 },
@@ -173,7 +173,7 @@ func TestFuzzyConversion(t *testing.T) {
173173 v1alpha3SubnetFilter .SortKey = ""
174174 v1alpha3SubnetFilter .SortDir = ""
175175
176- // TenantID and ProjectID are the same thing, so TenantID is removed in v1beta1
176+ // TenantID and ProjectID are the same thing, so TenantID is removed in v1alpha5
177177 // Test that we restore TenantID from ProjectID
178178 v1alpha3SubnetFilter .TenantID = v1alpha3SubnetFilter .ProjectID
179179 },
@@ -187,50 +187,50 @@ func TestFuzzyConversion(t *testing.T) {
187187 v1alpha3Filter .SortKey = ""
188188 v1alpha3Filter .SortDir = ""
189189
190- // TenantID and ProjectID are the same thing, so TenantID is removed in v1beta1
190+ // TenantID and ProjectID are the same thing, so TenantID is removed in v1alpha5
191191 // Test that we restore TenantID from ProjectID
192192 v1alpha3Filter .TenantID = v1alpha3Filter .ProjectID
193193 },
194194
195- // Don't test hub-spoke-hub conversion of v1beta1 fields which are not in v1alpha3
196- func (v1beta1ClusterSpec * infrav1.OpenStackClusterSpec , c fuzz.Continue ) {
197- c .FuzzNoCustom (v1beta1ClusterSpec )
195+ // Don't test hub-spoke-hub conversion of v1alpha5 fields which are not in v1alpha3
196+ func (v1alpha5ClusterSpec * infrav1.OpenStackClusterSpec , c fuzz.Continue ) {
197+ c .FuzzNoCustom (v1alpha5ClusterSpec )
198198
199- v1beta1ClusterSpec .APIServerFixedIP = ""
200- v1beta1ClusterSpec .AllowAllInClusterTraffic = false
201- v1beta1ClusterSpec .DisableAPIServerFloatingIP = false
199+ v1alpha5ClusterSpec .APIServerFixedIP = ""
200+ v1alpha5ClusterSpec .AllowAllInClusterTraffic = false
201+ v1alpha5ClusterSpec .DisableAPIServerFloatingIP = false
202202 },
203- func (v1beta1MachineSpec * infrav1.OpenStackMachineSpec , c fuzz.Continue ) {
204- c .FuzzNoCustom (v1beta1MachineSpec )
203+ func (v1alpha5MachineSpec * infrav1.OpenStackMachineSpec , c fuzz.Continue ) {
204+ c .FuzzNoCustom (v1alpha5MachineSpec )
205205
206- v1beta1MachineSpec .Ports = nil
207- v1beta1MachineSpec .ImageUUID = ""
206+ v1alpha5MachineSpec .Ports = nil
207+ v1alpha5MachineSpec .ImageUUID = ""
208208 },
209- func (v1beta1Network * infrav1.Network , c fuzz.Continue ) {
210- c .FuzzNoCustom (v1beta1Network )
209+ func (v1alpha5Network * infrav1.Network , c fuzz.Continue ) {
210+ c .FuzzNoCustom (v1alpha5Network )
211211
212- v1beta1Network .PortOpts = nil
212+ v1alpha5Network .PortOpts = nil
213213 },
214- func (v1beta1ClusterStatus * infrav1.OpenStackClusterStatus , c fuzz.Continue ) {
215- c .FuzzNoCustom (v1beta1ClusterStatus )
214+ func (v1alpha5ClusterStatus * infrav1.OpenStackClusterStatus , c fuzz.Continue ) {
215+ c .FuzzNoCustom (v1alpha5ClusterStatus )
216216
217- v1beta1ClusterStatus .FailureMessage = nil
218- v1beta1ClusterStatus .FailureReason = nil
219- if v1beta1ClusterStatus .Bastion != nil {
220- v1beta1ClusterStatus .Bastion .ImageUUID = ""
217+ v1alpha5ClusterStatus .FailureMessage = nil
218+ v1alpha5ClusterStatus .FailureReason = nil
219+ if v1alpha5ClusterStatus .Bastion != nil {
220+ v1alpha5ClusterStatus .Bastion .ImageUUID = ""
221221 }
222222 },
223- func (v1beta1OpenStackIdentityRef * infrav1.OpenStackIdentityReference , c fuzz.Continue ) {
224- c .FuzzNoCustom (v1beta1OpenStackIdentityRef )
223+ func (v1alpha5OpenStackIdentityRef * infrav1.OpenStackIdentityReference , c fuzz.Continue ) {
224+ c .FuzzNoCustom (v1alpha5OpenStackIdentityRef )
225225
226226 // IdentityRef was assumed to be a Secret in v1alpha3
227- v1beta1OpenStackIdentityRef .Kind = "Secret"
227+ v1alpha5OpenStackIdentityRef .Kind = "Secret"
228228 },
229- func (v1beta1RootVolume * infrav1.RootVolume , c fuzz.Continue ) {
230- c .FuzzNoCustom (v1beta1RootVolume )
229+ func (v1alpha5RootVolume * infrav1.RootVolume , c fuzz.Continue ) {
230+ c .FuzzNoCustom (v1alpha5RootVolume )
231231
232- v1beta1RootVolume .VolumeType = ""
233- v1beta1RootVolume .AvailabilityZone = ""
232+ v1alpha5RootVolume .VolumeType = ""
233+ v1alpha5RootVolume .AvailabilityZone = ""
234234 },
235235 }
236236 }
0 commit comments