Skip to content

Commit ace3e34

Browse files
Merge pull request #1145 from moshe010/constants
use StepInterface constants
2 parents c2afba5 + 82f1a12 commit ace3e34

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

pkg/provisioner/ironic/ironic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ func (p *ironicProvisioner) buildManualCleaningSteps(bmcAccess bmc.AccessDetails
12161216
cleanSteps = append(
12171217
cleanSteps,
12181218
nodes.CleanStep{
1219-
Interface: "bios",
1219+
Interface: nodes.InterfaceBIOS,
12201220
Step: "apply_configuration",
12211221
Args: map[string]interface{}{
12221222
"settings": newSettings,

pkg/provisioner/ironic/raid.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ func BuildRAIDCleanSteps(raidInterface string, target *metal3v1alpha1.RAIDConfig
205205
cleanSteps,
206206
[]nodes.CleanStep{
207207
{
208-
Interface: "raid",
208+
Interface: nodes.InterfaceRAID,
209209
Step: "delete_configuration",
210210
},
211211
{
212-
Interface: "deploy",
212+
Interface: nodes.InterfaceDeploy,
213213
Step: "erase_devices_metadata",
214214
},
215215
}...,
@@ -223,7 +223,7 @@ func BuildRAIDCleanSteps(raidInterface string, target *metal3v1alpha1.RAIDConfig
223223
cleanSteps = append(
224224
cleanSteps,
225225
nodes.CleanStep{
226-
Interface: "raid",
226+
Interface: nodes.InterfaceRAID,
227227
Step: "create_configuration",
228228
},
229229
)
@@ -251,7 +251,7 @@ func BuildRAIDCleanSteps(raidInterface string, target *metal3v1alpha1.RAIDConfig
251251
cleanSteps = append(
252252
cleanSteps,
253253
nodes.CleanStep{
254-
Interface: "raid",
254+
Interface: nodes.InterfaceRAID,
255255
Step: "delete_configuration",
256256
},
257257
)
@@ -266,7 +266,7 @@ func BuildRAIDCleanSteps(raidInterface string, target *metal3v1alpha1.RAIDConfig
266266
cleanSteps = append(
267267
cleanSteps,
268268
nodes.CleanStep{
269-
Interface: "raid",
269+
Interface: nodes.InterfaceRAID,
270270
Step: "create_configuration",
271271
},
272272
)

pkg/provisioner/ironic/raid_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ func TestBuildRAIDCleanSteps(t *testing.T) {
267267
},
268268
expected: []nodes.CleanStep{
269269
{
270-
Interface: "raid",
270+
Interface: nodes.InterfaceRAID,
271271
Step: "delete_configuration",
272272
},
273273
{
274-
Interface: "raid",
274+
Interface: nodes.InterfaceRAID,
275275
Step: "create_configuration",
276276
},
277277
},
@@ -317,7 +317,7 @@ func TestBuildRAIDCleanSteps(t *testing.T) {
317317
},
318318
expected: []nodes.CleanStep{
319319
{
320-
Interface: "raid",
320+
Interface: nodes.InterfaceRAID,
321321
Step: "delete_configuration",
322322
},
323323
},
@@ -334,15 +334,15 @@ func TestBuildRAIDCleanSteps(t *testing.T) {
334334
},
335335
expected: []nodes.CleanStep{
336336
{
337-
Interface: "raid",
337+
Interface: nodes.InterfaceRAID,
338338
Step: "delete_configuration",
339339
},
340340
{
341-
Interface: "deploy",
341+
Interface: nodes.InterfaceDeploy,
342342
Step: "erase_devices_metadata",
343343
},
344344
{
345-
Interface: "raid",
345+
Interface: nodes.InterfaceRAID,
346346
Step: "create_configuration",
347347
},
348348
},
@@ -380,11 +380,11 @@ func TestBuildRAIDCleanSteps(t *testing.T) {
380380
},
381381
expected: []nodes.CleanStep{
382382
{
383-
Interface: "raid",
383+
Interface: nodes.InterfaceRAID,
384384
Step: "delete_configuration",
385385
},
386386
{
387-
Interface: "deploy",
387+
Interface: nodes.InterfaceDeploy,
388388
Step: "erase_devices_metadata",
389389
},
390390
},

0 commit comments

Comments
 (0)