From 721d315f92c23dbbfb91600cd840b99b6c706eac Mon Sep 17 00:00:00 2001 From: Joel Rebello Date: Wed, 6 Dec 2023 08:04:32 +0100 Subject: [PATCH] providers/dell: implement the BMCResetter interface --- providers/dell/idrac.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/providers/dell/idrac.go b/providers/dell/idrac.go index 22613847..e4b2aa46 100644 --- a/providers/dell/idrac.go +++ b/providers/dell/idrac.go @@ -42,7 +42,10 @@ var ( providers.FeatureFirmwareUploadInitiateInstall, providers.FeatureFirmwareTaskStatus, providers.FeatureInventoryRead, + providers.FeatureBmcReset, } + + errManufacturerUnknown = errors.New("error identifying device manufacturer") ) type Config struct { @@ -211,7 +214,10 @@ func (c *Conn) Inventory(ctx context.Context) (device *common.Device, err error) return c.redfishwrapper.Inventory(ctx, false) } -var errManufacturerUnknown = errors.New("error identifying device manufacturer") +// BmcReset power cycles the BMC +func (c *Conn) BmcReset(ctx context.Context, resetType string) (ok bool, err error) { + return c.redfishwrapper.BMCReset(ctx, resetType) +} // deviceManufacturer returns the device manufacturer and model attributes func (c *Conn) deviceManufacturer(ctx context.Context) (vendor string, err error) {