drive

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const FixedA = "HPD8"
View Source
const FixedB = "HPD7"

Variables

View Source
var AffectedModelList = []*AffectedModel{

	{"VO0480JFDGT", "HP 480 GB 12 Gbit SAS 2.5\" RI PLP SC SSD", FixedA},
	{"VO0960JFDGU", "HP 960GB 12 Gbit SAS 2.5\" RI PLP SC SSD", FixedA},
	{"VO1920JFDGV", "HP 1,92 TB 12 Gbit SAS 2.5\" RI PLP SC SSD", FixedA},
	{"VO3840JFDHA", "HP 3,84 TB 12 Gbit SAS 2.5\" RI PLP SC SSD", FixedA},
	{"MO0400JFFCF", "HP 400 GB 12 Gbit SAS 2.5\" MU PLP SC SSD S2", FixedA},
	{"MO0800JFFCH", "HP 800 GB 12 Gbit SAS 2.5\" MU PLP SC SSD S2", FixedA},
	{"MO1600JFFCK", "HP 1,6 TB 12 Gbit SAS 2.5\" MU PLP SC SSD S2", FixedA},
	{"MO3200JFFCL", "HP 3,2 TB 12 Gbit SAS 2.5\" MU PLP SC SSD S2", FixedA},
	{"VO000480JWDAR", "HPE 480 GB SAS SFF RI SC DS SSD", FixedA},
	{"VO000960JWDAT", "HPE 960 GB SAS SFF RI SC DS SSD", FixedA},
	{"VO001920JWDAU", "HPE 1,92 TB SAS RI SFF SC DS SSD", FixedA},
	{"VO003840JWDAV", "HPE 3,84 TB SAS RI SFF SC DS SSD", FixedA},
	{"VO007680JWCNK", "HPE 7,68 TB SAS 12G RI SFF SC DS SSD", FixedA},
	{"VO015300JWCNL", "HPE 15,3 TB SAS 12G RI SFF SC DS SSD", FixedA},
	{"VK000960JWSSQ", "HPE 960 GB SAS RI SFF SC DS SSD", FixedA},
	{"VK001920JWSSR", "HPE 1,92 TB SAS RI SFF SC DS SSD", FixedA},
	{"VK003840JWSST", "HPE 3,84 TB SAS RI SFF SC DS SSD", FixedA},

	{"VK007680JWSSU", "HPE 7,68 TB SAS RI SFF SC DS SSD", FixedA},
	{"VO015300JWSSV", "HPE 15,3 TB SAS RI SFF SC DS SSD", FixedA},

	{"EK0800JVYPN", "HPE 800GB 12G SAS WI-1 SFF SC SSD", FixedB},
	{"EO1600JVYPP", "HPE 1.6TB 12G SAS WI-1 SFF SC SSD", FixedB},
	{"MK0800JVYPQ", "HPE 800GB 12G SAS MU-1 SFF SC SSD", FixedB},
	{"MO1600JVYPR", "HPE 1.6TB 12G SAS MU-1 SFF SC SSD", FixedB},
}

AffectedModelList list of model numbers for drives that are affected with their description as value

View Source
var (
	AffectedModels = AffectedIndex{}
)

Functions

func IsFirmwareFixed

func IsFirmwareFixed(model *AffectedModel, firmware string) (bool, error)

func SplitFirmware

func SplitFirmware(firmware string) (prefix string, version int, err error)

Types

type AffectedIndex

type AffectedIndex map[string]*AffectedModel

type AffectedModel

type AffectedModel struct {
	ModelNo       string
	Description   string
	FixedFirmware string
}

type CpqDaPhyDrvTable

type CpqDaPhyDrvTable struct {
	Snmp *snmp.Table
}

func GetCpqDaPhyDrvTable

func GetCpqDaPhyDrvTable(client gosnmp.Handler) (*CpqDaPhyDrvTable, error)

func (*CpqDaPhyDrvTable) GetIntValue

func (t *CpqDaPhyDrvTable) GetIntValue(id string, oid string) (int, error)

func (*CpqDaPhyDrvTable) GetStringValue

func (t *CpqDaPhyDrvTable) GetStringValue(id string, oid string) (string, error)

func (*CpqDaPhyDrvTable) GetUintValue

func (t *CpqDaPhyDrvTable) GetUintValue(id string, oid string) (uint, error)

func (*CpqDaPhyDrvTable) GetValue

func (t *CpqDaPhyDrvTable) GetValue(id string, oid string) (interface{}, error)

func (*CpqDaPhyDrvTable) ListIds

func (t *CpqDaPhyDrvTable) ListIds() []string

type PhysicalDrive

type PhysicalDrive struct {
	ID     string
	Model  string
	FwRev  string
	Serial string
	Status string
	Hours  uint
}

func GetPhysicalDrivesFromTable

func GetPhysicalDrivesFromTable(t *CpqDaPhyDrvTable) ([]*PhysicalDrive, error)

func NewPhysicalDriveFromTable

func NewPhysicalDriveFromTable(t *CpqDaPhyDrvTable, id string) (*PhysicalDrive, error)

func (*PhysicalDrive) GetNagiosStatus

func (d *PhysicalDrive) GetNagiosStatus() (int, string)

GetNagiosStatus validates the drive's data against the known models in this plugin.

Jump to

Keyboard shortcuts

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