This PR introduces the validation for the runtime config (i.e. redfish related config) in validate_exporter_configs function, and move the charm to blocked if the validation did not pass.
install_or_upgrade: if during the charm install or charm refresh event, Redfish is detected and the redfish credential is not correct, the charm will be blocked.
update_status: on every update status, the redfish credential will be validated if Redfish is detected. If it's not valid the charm will be blocked. If the redfish credential is currently valid, but the operator changed the password on the server, the charm will be blocked on update status.
config_changed: on config changed, the redfish credential will be validated if Redfish is detected. If it's not valid the charm will be blocked.
This PR introduces the validation for the runtime config (i.e. redfish related config) in
validate_exporter_configs
function, and move the charm toblocked
if the validation did not pass.Affected event: [install_or_upgrade, update_status, config_changed].
install_or_upgrade
: if during the charm install or charm refresh event, Redfish is detected and the redfish credential is not correct, the charm will be blocked.update_status
: on every update status, the redfish credential will be validated if Redfish is detected. If it's not valid the charm will be blocked. If the redfish credential is currently valid, but the operator changed the password on the server, the charm will be blocked on update status.config_changed
: on config changed, the redfish credential will be validated if Redfish is detected. If it's not valid the charm will be blocked.Maybe fix: #155 Related to: #136