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

Extract storage details of a Server using Redfish #143

Merged
merged 7 commits into from
Oct 16, 2024
Merged

Conversation

stefanhipfel
Copy link
Contributor

No description provided.

@stefanhipfel stefanhipfel linked an issue Oct 14, 2024 that may be closed by this pull request
@stefanhipfel stefanhipfel marked this pull request as draft October 14, 2024 08:01
@github-actions github-actions bot added size/L and removed size/M labels Oct 15, 2024
@stefanhipfel stefanhipfel marked this pull request as ready for review October 15, 2024 12:06
}
}
if len(result) == 0 {
// if no storage is found, fall back to simpleStorage (outdated storage API)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redfish-mockup-server only supports simpleStorage and just returns an empty list for Storage.

api/v1alpha1/server_types.go Outdated Show resolved Hide resolved
internal/controller/server_controller.go Outdated Show resolved Hide resolved
serverBase := server.DeepCopy()
server.Status.Storages = nil
for _, storage := range storages {
Copy link
Contributor Author

@stefanhipfel stefanhipfel Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to keep checking storages on every updateServerStatus? This is anyway only possible when using redfish, but I would say this is only needed when a server is put back to state initial.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the reconciliation logic as is. Yes, the information is typically stable - but when it changes we won't know + if somebody changes manually the status we won't get notified either.

@afritzler afritzler changed the title adds storage details to server crd Extract storage details of a Server using Redfish Oct 15, 2024
@afritzler
Copy link
Member

Can you run make docs to regenerate the API reference documentation to reflect the status change?

Copy link
Member

@afritzler afritzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor issue. Once the API reference docs are regenerated we can merge this PR. Looks good from my side.

Vendor string `json:"vendor,omitempty"`
// Model specifies the model of the storage device.
Model string `json:"model,omitempty"`
State common.State `json:"state,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment to this field.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 16, 2024
@afritzler afritzler merged commit 65a4530 into main Oct 16, 2024
8 checks passed
@afritzler afritzler deleted the collect_storage branch October 16, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change documentation Improvements or additions to documentation size/L
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Collect Storage details (name, model, size, etc) on discovery
3 participants