device

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeviceWWN

func GetDeviceWWN(pathName string) (wwn string, err error)

Types

type Device

type Device struct {
	Mapper string `json:"mapper,omitempty"`
	WWN    string `json:"wwn,omitempty"`
	Slaves int    `json:"slaves,omitempty"`
}

Device struct

func (*Device) CreateDevice

func (d *Device) CreateDevice() (err error)

CreateDevice attach and create linux devices to host

func (*Device) DeleteDevice

func (d *Device) DeleteDevice() (err error)

DeleteDevice delete the multipath device

func (*Device) GetMapper

func (d *Device) GetMapper() string

func (*Device) Populate

func (d *Device) Populate(needActivePath bool) error

Populate get all linux Devices

type LinuxDevice

type LinuxDevice interface {
	// GetDevice() bool
	DeleteDevice() (err error)
	CreateDevice() (err error)
	GetMapper() string
	Populate(bool) error
}

func NewLinuxDevice

func NewLinuxDevice(wwn string) LinuxDevice

NewLinuxDevice new device with given wwn

Jump to

Keyboard shortcuts

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