Documentation ¶
Index ¶
- Constants
- Variables
- func GetCommand(bin string, args ...string) string
- func GetModules(term IExecTerm) []string
- func RegisterDriver(name string, drv RaidDriverFactory)
- func SGMap(term IExecTerm) ([]compute.SGMapItem, error)
- type IExecTerm
- type IRaidAdapter
- type IRaidDriver
- type RaidBasePhyDev
- type RaidDriverFactory
- type RaidLogicalVolume
Constants ¶
View Source
const ( MODULE_MEGARAID = "megaraid_sas" MODULE_HPSA = "hpsa" MODULE_MPT2SAS = "mpt2sas" MODULE_MPT3SAS = "mpt3sas" MODULE_AACRAID = "aacraid" MODULE_SMARTPQI = "smartpqi" )
View Source
const ( MaxUint = ^uint(0) MaxInt = int(MaxUint >> 1) UnknownLogicalVolumeIndex = MaxInt )
Variables ¶
View Source
var (
Debug bool
)
View Source
var RaidDrivers sRaidDrivers
Functions ¶
func GetCommand ¶
func GetModules ¶
func RegisterDriver ¶
func RegisterDriver(name string, drv RaidDriverFactory)
Types ¶
type IRaidAdapter ¶
type IRaidAdapter interface { GetIndex() int PreBuildRaid(confs []*api.BaremetalDiskConfig) error GetLogicVolumes() ([]*RaidLogicalVolume, error) RemoveLogicVolumes() error GetDevices() []*baremetal.BaremetalStorage BuildRaid0(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error BuildRaid1(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error BuildRaid5(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error BuildRaid10(devs []*baremetal.BaremetalStorage, conf *api.BaremetalDiskConfig) error BuildNoneRaid(devs []*baremetal.BaremetalStorage) error PostBuildRaid() error }
type IRaidDriver ¶
type IRaidDriver interface { ParsePhyDevs() error GetName() string GetAdapters() []IRaidAdapter PreBuildRaid(confs []*api.BaremetalDiskConfig, adapterIdx int) error CleanRaid() error }
type RaidBasePhyDev ¶
type RaidBasePhyDev struct { Adapter int Size int64 Model string Rotate tristate.TriState Status string Driver string }
func NewRaidBasePhyDev ¶
func NewRaidBasePhyDev(driver string) *RaidBasePhyDev
func (*RaidBasePhyDev) IsComplete ¶
func (dev *RaidBasePhyDev) IsComplete() bool
func (*RaidBasePhyDev) ToBaremetalStorage ¶
func (dev *RaidBasePhyDev) ToBaremetalStorage(index int) *baremetal.BaremetalStorage
type RaidDriverFactory ¶
type RaidDriverFactory func(term IExecTerm) IRaidDriver
type RaidLogicalVolume ¶
func ReverseLogicalArray ¶
func ReverseLogicalArray(input []*RaidLogicalVolume) []*RaidLogicalVolume
Click to show internal directories.
Click to hide internal directories.