Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update firmware install status for scheduling state #373

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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