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 ¶
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