-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
} | ||
} | ||
if len(result) == 0 { | ||
// if no storage is found, fall back to simpleStorage (outdated storage API) |
There was a problem hiding this comment.
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.
serverBase := server.DeepCopy() | ||
server.Status.Storages = nil | ||
for _, storage := range storages { |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
Server
using Redfish
Can you run |
There was a problem hiding this 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"` |
There was a problem hiding this comment.
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.
No description provided.