From 82d4c113a4457e0de739fbe9d27e6b070041675e Mon Sep 17 00:00:00 2001 From: Joel Rebello Date: Wed, 17 Apr 2024 18:29:16 +0200 Subject: [PATCH] providers/asrr: verify hardware supported before firmware action --- providers/asrockrack/firmware.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/providers/asrockrack/firmware.go b/providers/asrockrack/firmware.go index 817f6273..24bd2973 100644 --- a/providers/asrockrack/firmware.go +++ b/providers/asrockrack/firmware.go @@ -24,6 +24,10 @@ const ( // bmc client interface implementations methods func (a *ASRockRack) FirmwareInstallSteps(ctx context.Context, component string) ([]constants.FirmwareInstallStep, error) { + if err := a.supported(ctx); err != nil { + return nil, bmclibErrs.NewErrUnsupportedHardware(err.Error()) + } + switch strings.ToUpper(component) { case common.SlugBMC: return []constants.FirmwareInstallStep{