Skip to content

Commit 3b3366f

Browse files
authored
fixes issue retrieving system uuid from boot config (#252)
metal operator changed uuid to system uuid, function was missed during that change https://github.com/ironcore-dev/metal-operator/pull/561/files
1 parent 65dd86c commit 3b3366f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/controller/serverbootconfiguration_pxe_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func (r *ServerBootConfigurationPXEReconciler) getSystemUUIDFromBootConfig(ctx c
197197
return "", fmt.Errorf("failed to get Server: %w", err)
198198
}
199199

200-
return server.Spec.UUID, nil
200+
return server.Spec.SystemUUID, nil
201201
}
202202

203203
func (r *ServerBootConfigurationPXEReconciler) getSystemIPFromBootConfig(ctx context.Context, config *metalv1alpha1.ServerBootConfiguration) ([]string, error) {

internal/controller/serverbootconfiguration_pxe_controller_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var _ = Describe("ServerBootConfiguration Controller", func() {
3838
GenerateName: "server-",
3939
},
4040
Spec: metalv1alpha1.ServerSpec{
41-
UUID: "12345",
41+
SystemUUID: "12345",
4242
},
4343
}
4444
Expect(k8sClient.Create(ctx, server)).To(Succeed())
@@ -86,7 +86,7 @@ var _ = Describe("ServerBootConfiguration Controller", func() {
8686
Controller: ptr.To(true),
8787
BlockOwnerDeletion: ptr.To(true),
8888
})),
89-
HaveField("Spec.SystemUUID", server.Spec.UUID),
89+
HaveField("Spec.SystemUUID", server.Spec.SystemUUID),
9090
HaveField("Spec.SystemIPs", ContainElement("1.1.1.1")),
9191
HaveField("Spec.IgnitionSecretRef.Name", "foo"),
9292
))
@@ -99,7 +99,7 @@ var _ = Describe("ServerBootConfiguration Controller", func() {
9999
GenerateName: "server-",
100100
},
101101
Spec: metalv1alpha1.ServerSpec{
102-
UUID: "12345",
102+
SystemUUID: "12345",
103103
},
104104
}
105105
Expect(k8sClient.Create(ctx, server)).To(Succeed())
@@ -147,7 +147,7 @@ var _ = Describe("ServerBootConfiguration Controller", func() {
147147
Controller: ptr.To(true),
148148
BlockOwnerDeletion: ptr.To(true),
149149
})),
150-
HaveField("Spec.SystemUUID", server.Spec.UUID),
150+
HaveField("Spec.SystemUUID", server.Spec.SystemUUID),
151151
HaveField("Spec.SystemIPs", ContainElement("1.1.1.1")),
152152
HaveField("Spec.IgnitionSecretRef.Name", "foo"),
153153
))

0 commit comments

Comments
 (0)