Documentation ¶
Index ¶
- Constants
- type DiskPartitions
- func (ps *DiskPartitions) CreatePartition(sizeMB int64, fs string, doformat bool, uuid string) error
- func (ps *DiskPartitions) DebugString() string
- func (ps *DiskPartitions) FsToTypeCode(fs string) string
- func (ps *DiskPartitions) GPTEndSector() int64
- func (p *DiskPartitions) GetDev() string
- func (ps *DiskPartitions) GetDevName() string
- func (ps *DiskPartitions) GetPartitions() []*Partition
- func (p *DiskPartitions) IsRaidDriver() bool
- func (ps *DiskPartitions) IsReady() bool
- func (ps *DiskPartitions) IsSpaceAvailable(sizeMB int64) bool
- func (ps *DiskPartitions) MBSectors() int64
- func (ps *DiskPartitions) MakeLabel() error
- func (p *DiskPartitions) ReInitInfo() error
- func (ps *DiskPartitions) ResizePartition(offsetMB int64) error
- func (ps *DiskPartitions) RetrievePartitionInfo() error
- func (ps *DiskPartitions) Run(cmd ...string) ([]string, error)
- func (p *DiskPartitions) SetInfo(info *types.SDiskInfo) *DiskPartitions
- func (ps *DiskPartitions) String() string
- type IPartitionRunner
- type Partition
- func (p *Partition) Format(fs string, uuid string) error
- func (p *Partition) Fsck() error
- func (p *Partition) GetDev() string
- func (p *Partition) GetDisk() *DiskPartitions
- func (p *Partition) GetEnd() int64
- func (p *Partition) GetSizeMB() (int64, error)
- func (p *Partition) GetStart() int64
- func (p *Partition) ResizeFs() error
- func (p *Partition) ResizeXfs() error
- func (p *Partition) Run(cmds ...string) ([]string, error)
- func (p *Partition) String() string
- type PartitionTool
- func (tool *PartitionTool) CreatePartition(diskIdx int, sizeMB int64, fs string, doformat bool, driver string, ...) error
- func (tool *PartitionTool) DebugString() string
- func (tool *PartitionTool) Disks() []*DiskPartitions
- func (tool *PartitionTool) FetchDiskConfs(diskConfs []baremetal.DiskConfiguration) *PartitionTool
- func (tool *PartitionTool) GetDisks() []*DiskPartitions
- func (tool *PartitionTool) GetPCIEDisks() []*DiskPartitions
- func (tool *PartitionTool) GetPartitions() []*Partition
- func (tool *PartitionTool) GetRootDisk() *DiskPartitions
- func (tool *PartitionTool) IsAllDisksReady() bool
- func (tool *PartitionTool) ResizePartition(diskIdx int, sizeMB int64) error
- func (tool *PartitionTool) RetrieveDiskInfo() error
- func (tool *PartitionTool) RetrievePartitionInfo() error
- func (tool *PartitionTool) Run(cmds ...string) ([]string, error)
- type SSHPartitionTool
Constants ¶
View Source
const ( // MB_SECTORS = 2048 // 1MiB = 2014 sectors GPT_SECTORS = 34 RAID_DRVIER = "raid" NONRAID_DRIVER = "nonraid" PCIE_DRIVER = "pcie" LABEL_MSDOS = "msdos" LABEL_GPT = "gpt" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskPartitions ¶
type DiskPartitions struct {
// contains filtered or unexported fields
}
func (*DiskPartitions) CreatePartition ¶
func (*DiskPartitions) DebugString ¶
func (ps *DiskPartitions) DebugString() string
func (*DiskPartitions) FsToTypeCode ¶
func (ps *DiskPartitions) FsToTypeCode(fs string) string
func (*DiskPartitions) GPTEndSector ¶
func (ps *DiskPartitions) GPTEndSector() int64
func (*DiskPartitions) GetDev ¶
func (p *DiskPartitions) GetDev() string
func (*DiskPartitions) GetDevName ¶
func (ps *DiskPartitions) GetDevName() string
func (*DiskPartitions) GetPartitions ¶
func (ps *DiskPartitions) GetPartitions() []*Partition
func (*DiskPartitions) IsRaidDriver ¶
func (p *DiskPartitions) IsRaidDriver() bool
func (*DiskPartitions) IsReady ¶
func (ps *DiskPartitions) IsReady() bool
func (*DiskPartitions) IsSpaceAvailable ¶
func (ps *DiskPartitions) IsSpaceAvailable(sizeMB int64) bool
func (*DiskPartitions) MBSectors ¶
func (ps *DiskPartitions) MBSectors() int64
func (*DiskPartitions) MakeLabel ¶
func (ps *DiskPartitions) MakeLabel() error
func (*DiskPartitions) ReInitInfo ¶
func (p *DiskPartitions) ReInitInfo() error
func (*DiskPartitions) ResizePartition ¶
func (ps *DiskPartitions) ResizePartition(offsetMB int64) error
func (*DiskPartitions) RetrievePartitionInfo ¶
func (ps *DiskPartitions) RetrievePartitionInfo() error
func (*DiskPartitions) SetInfo ¶
func (p *DiskPartitions) SetInfo(info *types.SDiskInfo) *DiskPartitions
func (*DiskPartitions) String ¶
func (ps *DiskPartitions) String() string
type IPartitionRunner ¶
type Partition ¶
type Partition struct {
// contains filtered or unexported fields
}
func NewPartition ¶
func (*Partition) GetDisk ¶
func (p *Partition) GetDisk() *DiskPartitions
type PartitionTool ¶
type PartitionTool struct {
// contains filtered or unexported fields
}
func NewPartitionTool ¶
func NewPartitionTool(runner IPartitionRunner) *PartitionTool
func (*PartitionTool) CreatePartition ¶
func (*PartitionTool) DebugString ¶
func (tool *PartitionTool) DebugString() string
func (*PartitionTool) Disks ¶
func (tool *PartitionTool) Disks() []*DiskPartitions
func (*PartitionTool) FetchDiskConfs ¶
func (tool *PartitionTool) FetchDiskConfs(diskConfs []baremetal.DiskConfiguration) *PartitionTool
func (*PartitionTool) GetDisks ¶
func (tool *PartitionTool) GetDisks() []*DiskPartitions
func (*PartitionTool) GetPCIEDisks ¶
func (tool *PartitionTool) GetPCIEDisks() []*DiskPartitions
func (*PartitionTool) GetPartitions ¶
func (tool *PartitionTool) GetPartitions() []*Partition
func (*PartitionTool) GetRootDisk ¶
func (tool *PartitionTool) GetRootDisk() *DiskPartitions
func (*PartitionTool) IsAllDisksReady ¶
func (tool *PartitionTool) IsAllDisksReady() bool
func (*PartitionTool) ResizePartition ¶
func (tool *PartitionTool) ResizePartition(diskIdx int, sizeMB int64) error
func (*PartitionTool) RetrieveDiskInfo ¶
func (tool *PartitionTool) RetrieveDiskInfo() error
func (*PartitionTool) RetrievePartitionInfo ¶
func (tool *PartitionTool) RetrievePartitionInfo() error
type SSHPartitionTool ¶
type SSHPartitionTool struct { *PartitionTool // contains filtered or unexported fields }
func NewSSHPartitionTool ¶
func (*SSHPartitionTool) Term ¶
func (tool *SSHPartitionTool) Term() *ssh.Client
Click to show internal directories.
Click to hide internal directories.