From 0a4df64aae6fd9e0e63c7c9a96335ea968094537 Mon Sep 17 00:00:00 2001 From: taohe1012 <88763781+taohe1012@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:07:45 +0800 Subject: [PATCH] Enable password enhancement for certificate resource (#257) --- redfish/provider/resource_certificate.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/redfish/provider/resource_certificate.go b/redfish/provider/resource_certificate.go index 98dccec6..c8685c1f 100644 --- a/redfish/provider/resource_certificate.go +++ b/redfish/provider/resource_certificate.go @@ -246,6 +246,10 @@ func certutils(params CertUtilsParam) (ok bool, summary string, details string) if err != nil { return false, ServiceErrorMsg, err.Error() } + activeServer := (*params.rserver)[0] + if err := getActiveAliasRedfishServer(params.pconfig, &activeServer); err != nil { + return false, "Error while getting active server", err.Error() + } service := api.Service defer api.Logout() managers, err := service.Managers() @@ -269,7 +273,7 @@ func certutils(params CertUtilsParam) (ok bool, summary string, details string) // Check iDRAC status checker := ServerStatusChecker{ Service: service, - Endpoint: (*params.rserver)[0].Endpoint.ValueString(), + Endpoint: activeServer.Endpoint.ValueString(), Interval: defaultCheckInterval, Timeout: defaultCheckTimeout, }