idracmgr

package
v1.5.0-659.f45d675 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package idracmgr provides the iDRAC based implementation of DriveManager interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Drive []map[string]string `json:"Drives"`
}

Controller contains urls of drives, example @odata.id:/redfish/v1/Systems/System.Embedded.1/Storage/Drives/Disk.Bay.0:Enclosure.Internal.0-1:NonRAID.Integrated.1-1

...

Drives: [{
 	@odata.id:/redfish/v1/Systems/System.Embedded.1/Storage/Drives/Disk.Bay.0:Enclosure.Internal.0-1:NonRAID.Integrated.1-1
}]

...

type IDRACDrive

type IDRACDrive struct {
	Status        map[string]string `json:"Status"`
	ID            string            `json:"Id"`
	SerialNumber  string            `json:"SerialNumber"`
	CapacityBytes int64             `json:"CapacityBytes"`
	MediaType     string            `json:"MediaType"`
	Manufacturer  string            `json:"Manufacturer"`
	Protocol      string            `json:"Protocol"`
	Model         string            `json:"Model"`
}

IDRACDrive contains info about drive got from iDRAC

type IDRACManager

type IDRACManager struct {
	// contains filtered or unexported fields
}

IDRACManager is the struct that implements DriveManager interface using iDRAC inside

func NewIDRACManager

func NewIDRACManager(log *logrus.Logger, timeout time.Duration, user string, password string, ip string) *IDRACManager

NewIDRACManager is the constructor of IDRACManager struct Receives logrus logger, timeout for HTTP client, user's credentials for iDRAC and iDRAC IP Returns an instance of IDRACManager

func (*IDRACManager) GetDrivesList

func (mgr *IDRACManager) GetDrivesList() ([]*api.Drive, error)

GetDrivesList returns slice of *api.Drive created from iDRAC drives Returns slice of *api.Drives struct or error if something went wrong

func (*IDRACManager) Locate

func (mgr *IDRACManager) Locate(serialNumber string, action int32) (int32, error)

Locate implements Locate method of DriveManager interface

func (*IDRACManager) LocateNode

func (mgr *IDRACManager) LocateNode(action int32) error

LocateNode implements LocateNode method of DriveManager interface

type Storage

type Storage struct {
	Member []map[string]string `json:"Members"`
}

Storage contains urls of controller, enclosure etc, example @odata.id:/redfish/v1/Systems/System.Embedded.1/Storage/NonRAID.Integrated.1-1

...

Member: [{
	@odata.id:/redfish/v1/Systems/System.Embedded.1/Storage/NonRAID.Integrated.1-1}

] ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL