physicaldrivegetter

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseUDevADMOutput

func ParseUDevADMOutput(output []byte) (*physicaldrive.PhysicalDrive, error)

Types

type BlockDevice

type BlockDevice struct {
	DevicePath       string
	Size             uint64
	Rotational       string
	Type             string
	Tran             string
	MountPoint       string
	PartitionType    string
	FileSystemType   string
	ParentKernelName string
}

func ParseLSBLKOutput

func ParseLSBLKOutput(output []byte) ([]BlockDevice, error)

type RHEL8

type RHEL8 struct {
	UDevADM  commandrunner.CommandRunner
	LSBLK    commandrunner.CommandRunner
	SmartCTL commandrunner.CommandRunner
}

func NewRHEL8

func NewRHEL8(
	uDevADMCommandRunner *commandrunner.UDevADM,
	lsblkCommandRunner *commandrunner.LSBLK,
	smartCTLCommandRunner *commandrunner.SmartCTL,
) *RHEL8

func (*RHEL8) PhysicalDrive

func (r *RHEL8) PhysicalDrive(
	metadata *physicaldrive.Metadata,
) (*physicaldrive.PhysicalDrive, error)

func (*RHEL8) PhysicalDrives

func (r *RHEL8) PhysicalDrives(
	_ *raidcontroller.Metadata,
) ([]*physicaldrive.PhysicalDrive, error)

type SSACLI

type SSACLI struct {
	SSACLI commandrunner.CommandRunner
	LSBLK  commandrunner.CommandRunner
}

func NewSSACLI

func NewSSACLI(
	ssacli *commandrunner.SSACLI,
	lsblk *commandrunner.LSBLK,
) *SSACLI

NewSSACLI creates a new SSACLI instance.

func (*SSACLI) PhysicalDrive

func (s *SSACLI) PhysicalDrive(metadata *physicaldrive.Metadata) (
	*physicaldrive.PhysicalDrive,
	error,
)

PhysicalDrive returns a physical drive for a given metadata.

func (*SSACLI) PhysicalDrives

func (s *SSACLI) PhysicalDrives(metadata *raidcontroller.Metadata) (
	[]*physicaldrive.PhysicalDrive,
	error,
)

PhysicalDrives returns all physical drives for a given controller.

Jump to

Keyboard shortcuts

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