Skip to content

Commit

Permalink
Translate TaskState to old string (tmp)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Nov 28, 2023
1 parent b29a988 commit c235556
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion internal/outofband/bmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,19 @@ func (b *bmc) FirmwareTaskStatus(ctx context.Context, kind bconsts.FirmwareInsta
}
}

return b.client.FirmwareTaskStatus(ctx, kind, component, taskID, installVersion)
tmpstate, status, err := b.client.FirmwareTaskStatus(ctx, kind, component, taskID, installVersion)
switch tmpstate {
case bconsts.Complete:

Check failure on line 179 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Complete

Check failure on line 179 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Complete

Check failure on line 179 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Complete

Check failure on line 179 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Complete
return bconsts.FirmwareInstallComplete, status, err
case bconsts.Running:

Check failure on line 181 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Running

Check failure on line 181 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Running

Check failure on line 181 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Running

Check failure on line 181 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Running
return bconsts.FirmwareInstallRunning, status, err
case bconsts.Queued:

Check failure on line 183 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Queued

Check failure on line 183 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Queued

Check failure on line 183 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Queued

Check failure on line 183 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Queued
return bconsts.FirmwareInstallQueued, status, err
case bconsts.Failed:

Check failure on line 185 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Failed) (typecheck)

Check failure on line 185 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Failed) (typecheck)

Check failure on line 185 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Failed) (typecheck)

Check failure on line 185 in internal/outofband/bmc.go

View workflow job for this annotation

GitHub Actions / lint-test

undefined: bconsts.Failed) (typecheck)
return bconsts.FirmwareInstallFailed, status, err
default:
return bconsts.FirmwareInstallUnknown, status, err
}
}

func (b *bmc) FirmwareUpload(ctx context.Context, component string, file *os.File) (uploadTaskID string, err error) {
Expand Down

0 comments on commit c235556

Please sign in to comment.