Currently, service.ExporterTemplate.render_config determine REDFISH_ENABLE (jinja2) variable by get_hw_tool_white_list, but the same information is also retrieved in charm.HardwareObserverCharm._get_redfish_creds via bmc_hw_verifier. If the two does not match (e.g. bmc_hw_verifier determines it redfish is not available but get_hw_tool_white_list determines that redfish is available), it will cause issue mentioned in #130.
This PR tries to remove the possibility that the two information is inconsistent by relying on single source of truth. Note, it might not solve #130, since the root cause is not clear, and it's not reproducible from my environement.
Currently,
service.ExporterTemplate.render_config
determineREDFISH_ENABLE
(jinja2) variable byget_hw_tool_white_list
, but the same information is also retrieved incharm.HardwareObserverCharm._get_redfish_creds
viabmc_hw_verifier
. If the two does not match (e.g.bmc_hw_verifier
determines it redfish is not available butget_hw_tool_white_list
determines that redfish is available), it will cause issue mentioned in #130.This PR tries to remove the possibility that the two information is inconsistent by relying on single source of truth. Note, it might not solve #130, since the root cause is not clear, and it's not reproducible from my environement.