Skip to content

Commit dd85470

Browse files
authored
Merge pull request #1903 from shiftstack/issue_1882
🐛 Remove `IdentityRef.Kind`
2 parents fd64e36 + fc810d8 commit dd85470

25 files changed

+170
-203
lines changed

api/v1alpha5/conversion.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,3 +624,7 @@ func Convert_v1alpha5_SecurityGroup_To_v1alpha8_SecurityGroupStatus(in *Security
624624

625625
return nil
626626
}
627+
628+
func Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *infrav1.OpenStackIdentityReference, s conversion.Scope) error {
629+
return autoConvert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s)
630+
}

api/v1alpha5/zz_generated.conversion.go

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

api/v1alpha6/conversion.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ func restorev1alpha6MachineSpec(previous *OpenStackMachineSpec, dst *OpenStackMa
7373
dst.ServerMetadata[k] = v
7474
}
7575
}
76+
77+
// Conversion to v1alpha8 removes the Kind fild
78+
dst.IdentityRef = previous.IdentityRef
7679
}
7780

7881
func restorev1alpha6ClusterStatus(previous *OpenStackClusterStatus, dst *OpenStackClusterStatus) {
@@ -162,6 +165,9 @@ func restorev1alpha6ClusterSpec(previous *OpenStackClusterSpec, dst *OpenStackCl
162165
if previous.AllowAllInClusterTraffic && !previous.ManagedSecurityGroups {
163166
dst.AllowAllInClusterTraffic = true
164167
}
168+
169+
// Conversion to v1alpha8 removes the Kind field
170+
dst.IdentityRef = previous.IdentityRef
165171
}
166172

167173
var _ ctrlconversion.Convertible = &OpenStackCluster{}
@@ -988,3 +994,7 @@ func Convert_v1alpha6_SecurityGroup_To_v1alpha8_SecurityGroupStatus(in *Security
988994

989995
return nil
990996
}
997+
998+
func Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *infrav1.OpenStackIdentityReference, s apiconversion.Scope) error {
999+
return autoConvert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s)
1000+
}

api/v1alpha6/zz_generated.conversion.go

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

api/v1alpha7/conversion.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ func restorev1alpha7MachineSpec(previous *OpenStackMachineSpec, dst *OpenStackMa
180180
dst.ServerMetadata[k] = v
181181
}
182182
}
183+
184+
// Conversion to v1alpha8 removes the Kind field
185+
dst.IdentityRef = previous.IdentityRef
183186
}
184187

185188
func restorev1alpha8MachineSpec(previous *infrav1.OpenStackMachineSpec, dst *infrav1.OpenStackMachineSpec) {
@@ -210,6 +213,9 @@ func restorev1alpha7ClusterSpec(previous *OpenStackClusterSpec, dst *OpenStackCl
210213
if previous.AllowAllInClusterTraffic && !previous.ManagedSecurityGroups {
211214
dst.AllowAllInClusterTraffic = true
212215
}
216+
217+
// Conversion to v1alpha8 removes the Kind field
218+
dst.IdentityRef = previous.IdentityRef
213219
}
214220

215221
func restorev1alpha8ClusterSpec(previous *infrav1.OpenStackClusterSpec, dst *infrav1.OpenStackClusterSpec) {
@@ -678,3 +684,7 @@ func Convert_v1alpha7_SecurityGroup_To_v1alpha8_SecurityGroupStatus(in *Security
678684

679685
return nil
680686
}
687+
688+
func Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *infrav1.OpenStackIdentityReference, s apiconversion.Scope) error {
689+
return autoConvert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s)
690+
}

api/v1alpha7/zz_generated.conversion.go

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

0 commit comments

Comments
 (0)