Skip to content

Commit

Permalink
Update firmware install status for scheduling state (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 19, 2023
2 parents b299d27 + 1e2d807 commit 6487b60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/redfishwrapper/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ func (c *Client) taskMessagesAsString(messages []common.Message) string {

func (c *Client) ConvertTaskState(state string) constants.TaskState {
switch strings.ToLower(state) {
case "starting", "downloading", "downloaded":
case "starting", "downloading", "downloaded", "scheduling":
return constants.Initializing
case "running", "stopping", "cancelling", "scheduling":
case "running", "stopping", "cancelling":
return constants.Running
case "pending", "new":
return constants.Queued
Expand Down
2 changes: 1 addition & 1 deletion internal/redfishwrapper/task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ func TestConvertTaskState(t *testing.T) {
{"starting state", "starting", constants.Initializing},
{"downloading state", "downloading", constants.Initializing},
{"downloaded state", "downloaded", constants.Initializing},
{"scheduling state", "scheduling", constants.Initializing},
{"running state", "running", constants.Running},
{"stopping state", "stopping", constants.Running},
{"cancelling state", "cancelling", constants.Running},
{"scheduling state", "scheduling", constants.Running},
{"pending state", "pending", constants.Queued},
{"new state", "new", constants.Queued},
{"scheduled state", "scheduled", constants.PowerCycleHost},
Expand Down

0 comments on commit 6487b60

Please sign in to comment.