-
Notifications
You must be signed in to change notification settings - Fork 16
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
Replace redfish discover method #69
Conversation
This is done because redfish.discover_ssdp() discovers all available redfish services on the same network. This change checks if redfish is available by trying to login and check for the type of exception being raised. If RetriesExhaustedError is raised, it means that there is no redfish service. Resolves canonical#61.
The "on_remove_event" test was failing because after the relation between the ubuntu and hw-observer charm was removed, the ubuntu app would be active/idle and settle down before the cleanup activities were completed for hw-observer.
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 but please provide more unit tests to make unit test coverage be 100%.
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.
There is no unit test of redfish_available, any reason to skip it?
Added unit tests for new function. |
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.
LGTM
redfish.discover_ssdp
method is replaced with a simple login call to the redfish service. If theRetriesExhaustedError
exception is raised, we can infer that the redfish service isn't present on the system.This is done because the
redfish.discover_ssdp
method finds all the redfish services on the same network which is not what we want.Fixes #61.