@@ -27,7 +27,7 @@ import (
27
27
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
28
28
ctrlconversion "sigs.k8s.io/controller-runtime/pkg/conversion"
29
29
30
- infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 "
30
+ infrav1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5 "
31
31
)
32
32
33
33
func TestConvertTo (t * testing.T ) {
@@ -120,7 +120,7 @@ func TestFuzzyConversion(t *testing.T) {
120
120
121
121
fuzzerFuncs := func (_ runtimeserializer.CodecFactory ) []interface {} {
122
122
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
124
124
func (v1alpha3ClusterSpec * OpenStackClusterSpec , c fuzz.Continue ) {
125
125
c .FuzzNoCustom (v1alpha3ClusterSpec )
126
126
@@ -135,7 +135,7 @@ func TestFuzzyConversion(t *testing.T) {
135
135
func (v1alpha3RootVolume * RootVolume , c fuzz.Continue ) {
136
136
c .FuzzNoCustom (v1alpha3RootVolume )
137
137
138
- // In v1beta1 only DeviceType="disk" and SourceType="image" are supported
138
+ // In v1alpha5 only DeviceType="disk" and SourceType="image" are supported
139
139
v1alpha3RootVolume .DeviceType = "disk"
140
140
v1alpha3RootVolume .SourceType = "image"
141
141
},
@@ -173,7 +173,7 @@ func TestFuzzyConversion(t *testing.T) {
173
173
v1alpha3SubnetFilter .SortKey = ""
174
174
v1alpha3SubnetFilter .SortDir = ""
175
175
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
177
177
// Test that we restore TenantID from ProjectID
178
178
v1alpha3SubnetFilter .TenantID = v1alpha3SubnetFilter .ProjectID
179
179
},
@@ -187,50 +187,50 @@ func TestFuzzyConversion(t *testing.T) {
187
187
v1alpha3Filter .SortKey = ""
188
188
v1alpha3Filter .SortDir = ""
189
189
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
191
191
// Test that we restore TenantID from ProjectID
192
192
v1alpha3Filter .TenantID = v1alpha3Filter .ProjectID
193
193
},
194
194
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 )
198
198
199
- v1beta1ClusterSpec .APIServerFixedIP = ""
200
- v1beta1ClusterSpec .AllowAllInClusterTraffic = false
201
- v1beta1ClusterSpec .DisableAPIServerFloatingIP = false
199
+ v1alpha5ClusterSpec .APIServerFixedIP = ""
200
+ v1alpha5ClusterSpec .AllowAllInClusterTraffic = false
201
+ v1alpha5ClusterSpec .DisableAPIServerFloatingIP = false
202
202
},
203
- func (v1beta1MachineSpec * infrav1.OpenStackMachineSpec , c fuzz.Continue ) {
204
- c .FuzzNoCustom (v1beta1MachineSpec )
203
+ func (v1alpha5MachineSpec * infrav1.OpenStackMachineSpec , c fuzz.Continue ) {
204
+ c .FuzzNoCustom (v1alpha5MachineSpec )
205
205
206
- v1beta1MachineSpec .Ports = nil
207
- v1beta1MachineSpec .ImageUUID = ""
206
+ v1alpha5MachineSpec .Ports = nil
207
+ v1alpha5MachineSpec .ImageUUID = ""
208
208
},
209
- func (v1beta1Network * infrav1.Network , c fuzz.Continue ) {
210
- c .FuzzNoCustom (v1beta1Network )
209
+ func (v1alpha5Network * infrav1.Network , c fuzz.Continue ) {
210
+ c .FuzzNoCustom (v1alpha5Network )
211
211
212
- v1beta1Network .PortOpts = nil
212
+ v1alpha5Network .PortOpts = nil
213
213
},
214
- func (v1beta1ClusterStatus * infrav1.OpenStackClusterStatus , c fuzz.Continue ) {
215
- c .FuzzNoCustom (v1beta1ClusterStatus )
214
+ func (v1alpha5ClusterStatus * infrav1.OpenStackClusterStatus , c fuzz.Continue ) {
215
+ c .FuzzNoCustom (v1alpha5ClusterStatus )
216
216
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 = ""
221
221
}
222
222
},
223
- func (v1beta1OpenStackIdentityRef * infrav1.OpenStackIdentityReference , c fuzz.Continue ) {
224
- c .FuzzNoCustom (v1beta1OpenStackIdentityRef )
223
+ func (v1alpha5OpenStackIdentityRef * infrav1.OpenStackIdentityReference , c fuzz.Continue ) {
224
+ c .FuzzNoCustom (v1alpha5OpenStackIdentityRef )
225
225
226
226
// IdentityRef was assumed to be a Secret in v1alpha3
227
- v1beta1OpenStackIdentityRef .Kind = "Secret"
227
+ v1alpha5OpenStackIdentityRef .Kind = "Secret"
228
228
},
229
- func (v1beta1RootVolume * infrav1.RootVolume , c fuzz.Continue ) {
230
- c .FuzzNoCustom (v1beta1RootVolume )
229
+ func (v1alpha5RootVolume * infrav1.RootVolume , c fuzz.Continue ) {
230
+ c .FuzzNoCustom (v1alpha5RootVolume )
231
231
232
- v1beta1RootVolume .VolumeType = ""
233
- v1beta1RootVolume .AvailabilityZone = ""
232
+ v1alpha5RootVolume .VolumeType = ""
233
+ v1alpha5RootVolume .AvailabilityZone = ""
234
234
},
235
235
}
236
236
}
0 commit comments