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
- type TRaidDriverToolType
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 )
View Source
const ( RaidDriverToolMegacli64 = TRaidDriverToolType("megacli64") RaidDriverToolStorecli = TRaidDriverToolType("storecli") )
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 ¶
type RaidLogicalVolume struct { Index int Adapter int BlockDev string IsSSD tristate.TriState Driver TRaidDriverToolType }
func ReverseLogicalArray ¶
func ReverseLogicalArray(input []*RaidLogicalVolume) []*RaidLogicalVolume
type TRaidDriverToolType ¶
type TRaidDriverToolType string
Click to show internal directories.
Click to hide internal directories.