Documentation
¶
Index ¶
- func CreateVolumeGroup(volumeGroup VolumeGroup) error
- func ExamineDisk(d Disk) error
- func FileSystemCreate(f Filesystem) error
- func MBRPartition(d Disk) error
- func Mount(f Filesystem) error
- func Partition(d Disk) error
- func VerifyBlockDevice(device string) error
- func Wipe(d Disk) error
- type Disk
- type Filesystem
- type Instance
- type LogicalVolume
- type Metadata
- type Partitions
- type VolumeGroup
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateVolumeGroup ¶
func CreateVolumeGroup(volumeGroup VolumeGroup) error
func ExamineDisk ¶
ExamineDisk will look at the configuration of a disk.
func FileSystemCreate ¶
func FileSystemCreate(f Filesystem) error
FileSystemCreate handles the creation of filesystems.
func MBRPartition ¶
MBRPartition will create the partitions and write them to the disk.
func VerifyBlockDevice ¶
VerifyBlockDevice will check that the device actually exists and is a block device.
Types ¶
type Disk ¶
type Disk struct {
Device string `json:"device"`
Partitions []Partitions `json:"partitions"`
WipeTable bool `json:"wipe_table"`
}
Disk defines the configuration for a disk.
type Filesystem ¶
type Filesystem struct {
Mount struct {
Create struct {
Options []string `json:"options"`
} `json:"create"`
Device string `json:"device"`
Format string `json:"format"`
Point string `json:"point"`
} `json:"mount"`
}
Filesystem defines the organisation of a filesystem.
type Instance ¶
type Instance struct {
CryptedRootPassword string `json:"crypted_root_password"`
Hostname string `json:"hostname"`
OperatingSystemVersion struct {
Distro string `json:"distro"`
OsCodename string `json:"os_codename"`
OsSlug string `json:"os_slug"`
Version string `json:"version"`
} `json:"operating_system_version"`
Storage struct {
Disks []Disk `json:"disks"`
Filesystems []Filesystem `json:"filesystems"`
VolumeGroups []VolumeGroup `json:"volume_groups"`
} `json:"storage"`
}
Instance is a dervied struct taken from a metadata request.
type LogicalVolume ¶
type LogicalVolume struct {
Name string `json:"name"`
Size uint64 `json:"size"`
Tags []string `json:"tags"`
Opts []string `json:"opts"`
}
LogicalVolume defines the configuration of a logical volume.
type Metadata ¶
type Metadata struct {
Instance Instance `json:"instance"`
}
Metadata is an auto generated struct taken from a metadata request.
func RetrieveData ¶
RetrieveData retrieves metadata from Hegel.
type Partitions ¶
type Partitions struct {
Label string `json:"label"`
Number int `json:"number"`
Size uint64 `json:"size"`
}
Partitions details the architecture.
type VolumeGroup ¶
type VolumeGroup struct {
Name string `json:"name"`
PhysicalVolumes []string `json:"physical_volumes"`
LogicalVolumes []LogicalVolume `json:"logical_volumes"`
Tags []string `json:"tags"`
}
VolumeGroup defines the configuration of a volume group.