Skip to content

Commit 3c12468

Browse files
authored
Merge pull request #1504 from shiftstack/subnet
⚠️Remove OpenStackMachineSpec.Subnet
2 parents 56b9fd3 + 211b5c4 commit 3c12468

18 files changed

+324
-174
lines changed

api/v1alpha3/conversion_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ func TestFuzzyConversion(t *testing.T) {
142142
if v1alpha3Cluster.Spec.Bastion != nil {
143143
v1alpha3Cluster.Spec.Bastion.Instance.Image = ""
144144
v1alpha3Cluster.Spec.Bastion.Instance.UserDataSecret = nil
145+
v1alpha3Cluster.Spec.Bastion.Instance.Subnet = ""
145146
if v1alpha3Cluster.Spec.Bastion.Instance.CloudsSecret != nil {
146147
v1alpha3Cluster.Spec.Bastion.Instance.CloudsSecret.Namespace = ""
147148
}
@@ -160,6 +161,7 @@ func TestFuzzyConversion(t *testing.T) {
160161
v1alpha3Machine.ObjectMeta.Annotations = map[string]string{}
161162

162163
v1alpha3Machine.Spec.UserDataSecret = nil
164+
v1alpha3Machine.Spec.Subnet = ""
163165

164166
if v1alpha3Machine.Spec.CloudsSecret != nil {
165167
// In switching to IdentityRef, fetching the cloud secret
@@ -179,6 +181,7 @@ func TestFuzzyConversion(t *testing.T) {
179181

180182
v1alpha3MachineTemplate.Spec.Template.Spec.Image = ""
181183
v1alpha3MachineTemplate.Spec.Template.Spec.UserDataSecret = nil
184+
v1alpha3MachineTemplate.Spec.Template.Spec.Subnet = ""
182185

183186
if v1alpha3MachineTemplate.Spec.Template.Spec.CloudsSecret != nil {
184187
v1alpha3MachineTemplate.Spec.Template.Spec.CloudsSecret.Namespace = ""

api/v1alpha3/zz_generated.conversion.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha4/conversion_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ func TestFuzzyConversion(t *testing.T) {
220220

221221
if v1alpha4Cluster.Spec.Bastion != nil {
222222
v1alpha4Cluster.Spec.Bastion.Instance.Image = ""
223+
v1alpha4Cluster.Spec.Bastion.Instance.Subnet = ""
223224
}
224225
},
225226
func(v1alpha3SubnetFilter *SubnetFilter, c fuzz.Continue) {
@@ -261,6 +262,7 @@ func TestFuzzyConversion(t *testing.T) {
261262
c.FuzzNoCustom(v1alpha4Machine)
262263

263264
v1alpha4Machine.ObjectMeta.Annotations = map[string]string{}
265+
v1alpha4Machine.Spec.Subnet = ""
264266

265267
if v1alpha4Machine.Spec.RootVolume != nil {
266268
// OpenStackMachineSpec.Image is ignored in v1alpha4 if RootVolume is set
@@ -273,6 +275,7 @@ func TestFuzzyConversion(t *testing.T) {
273275
v1alpha4MachineTemplate.ObjectMeta.Annotations = map[string]string{}
274276

275277
v1alpha4MachineTemplate.Spec.Template.Spec.Image = ""
278+
v1alpha4MachineTemplate.Spec.Template.Spec.Subnet = ""
276279
},
277280
func(v1alpha4Instance *Instance, c fuzz.Continue) {
278281
c.FuzzNoCustom(v1alpha4Instance)
@@ -289,6 +292,7 @@ func TestFuzzyConversion(t *testing.T) {
289292

290293
if v1alpha4ClusterTemplate.Spec.Template.Spec.Bastion != nil {
291294
v1alpha4ClusterTemplate.Spec.Template.Spec.Bastion.Instance.Image = ""
295+
v1alpha4ClusterTemplate.Spec.Template.Spec.Bastion.Instance.Subnet = ""
292296
}
293297
},
294298

api/v1alpha4/zz_generated.conversion.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha5/conversion.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,7 @@ func Convert_Slice_v1alpha7_Network_To_Slice_v1alpha5_Network(in *[]infrav1.Netw
231231
}
232232
return nil
233233
}
234+
235+
func Convert_v1alpha5_OpenStackMachineSpec_To_v1alpha7_OpenStackMachineSpec(in *OpenStackMachineSpec, out *infrav1.OpenStackMachineSpec, s conversion.Scope) error {
236+
return autoConvert_v1alpha5_OpenStackMachineSpec_To_v1alpha7_OpenStackMachineSpec(in, out, s)
237+
}

api/v1alpha5/zz_generated.conversion.go

Lines changed: 6 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)