Documentation
¶
Index ¶
- Constants
- Variables
- func ByteToGi(byte uint64) uint64
- func ByteToMi(byte uint64) uint64
- func CompareByShadow(key, shadowLine string) bool
- func DupStrings(src []string) []string
- func GetDiskSizeBytes(devPath string) (uint64, error)
- func GetEncryptedPasswd(key string) (string, error)
- func GiToByte(gi uint64) uint64
- func LoadFixture(t *testing.T, name string) []byte
- func MiToByte(mi uint64) uint64
- func ParsePartitionSize(diskSizeBytes uint64, partitionSize string) (uint64, error)
- func ReadCmdline(prefix string) (map[string]interface{}, error)
- func RenderTemplate(templ string, context interface{}) (string, error)
- func SleepAndReboot() error
- func StringSliceContains(sSlice []string, s string) bool
Constants ¶
View Source
const ( MinDiskSize = 250 << 30 MinPersistentSize = 150 << 30 MiByteMultiplier = 1 << 20 GiByteMultiplier = 1 << 30 )
Variables ¶
View Source
var ( HarvesterNodeRoleLabelPrefix = "node-role.harvesterhci.io/" HarvesterWitnessNodeLabelKey = HarvesterNodeRoleLabelPrefix + "witness" HarvesterMgmtNodeLabelKey = HarvesterNodeRoleLabelPrefix + "management" HarvesterWorkerNodeLabelKey = HarvesterNodeRoleLabelPrefix + "worker" )
Functions ¶
func CompareByShadow ¶
func DupStrings ¶
func GetDiskSizeBytes ¶ added in v0.2.6
Get disk size in bytes
func GetEncryptedPasswd ¶ added in v1.1.2
func LoadFixture ¶
LoadFixture loads a testing fixture from testdata dir
func ParsePartitionSize ¶ added in v1.2.0
func ReadCmdline ¶
ReadCmdline parses /proc/cmdline and returns a map contains kernel parameters
func RenderTemplate ¶ added in v0.2.0
RenderTemplate renders a template that has no template reference in it
func StringSliceContains ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.