-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix(redfish): Make redfish storage name in URI dynamic. #49
Conversation
The redfish storage name in the URI was initially hardcoded to "Storage". On some servers which did not conform to the schema specification, this name was provided differently, eg: Storages. This change aims to find the storage uri name dynamically while fetching the storage controller and storage drive data. Fixes #91, #108
There's duplicate code between the Update: This refactoring work seems to be much more complicated than on first glance and there needs to be some thought behind the design. One server may have many different system ids each with multiple storage ids and each of those could have many storage controllers/ storage drives. Will tackle this in another PR if necessary in order to avoid increasing this PRs scope too much. New issue raised here: #51 |
Also add unit test for new method.
- Remove API call assertions. - Remove systems id related assertions
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.
LGTM
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 nitpick of naming and comment.
- Update system_dict name. - make `systems_root_uri` a class var. - make `_storage_root_uri` a classmethod.
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.
LGTM
The redfish storage name in the URI was initially hardcoded to "Storage". On some servers which did not conform to the schema specification, this name was provided differently, eg: Storages.
This change aims to find the storage uri name dynamically while fetching the storage controller and storage drive data.
Fixes canonical/hardware-observer-operator#91, canonical/hardware-observer-operator#108