Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBackupFilename ¶
GetBackupFilename returns generated filename
func GetBackupMedia ¶
GetBackupMedia returns backup media path
func MakeBackup ¶
MakeBackup creates virtual maching backup to path
Types ¶
type BlockDevice ¶ added in v1.11.2
type BlockDevice struct { Name string `json:"name"` FileSystem string `json:"fstype"` MountPoint string `json:"mountpoint"` Vendor string `json:"vendor"` Model string `json:"model"` HotPlug interface{} `json:"hotplug"` Children []BlockDevice `json:"children"` }
BlockDevice represents a single block device entry in the JSON output of an lsblk -J command.
func (*BlockDevice) IsRemovable ¶ added in v1.11.2
func (bd *BlockDevice) IsRemovable() bool
IsRemovable returns true if the block device is a removable device (e.g. a USB drive) and false otherwise.
type LsblkOutput ¶ added in v1.11.2
type LsblkOutput struct {
BlockDevices []BlockDevice `json:"blockdevices"`
}
LsblkOutput represents the parsed JSON output of an lsblk -J command.
func ListBlockDevices ¶ added in v1.11.2
func ListBlockDevices() (*LsblkOutput, error)
ListBlockDevices generates a listing of the available block devices using lsblk. Usable only on Linux hosts.
func ParseLsblkJSON ¶ added in v1.11.2
func ParseLsblkJSON(lsblkJSON string) (*LsblkOutput, error)
ParseLsblkJSON parses JSON output from an lsblk -J command.
func (*LsblkOutput) GetRemovableDisks ¶ added in v1.11.2
func (blk *LsblkOutput) GetRemovableDisks() map[string]string
GetRemovableDisks processes lsblk output to return a listing of connected removable devices. The return value is a map from mount points to block device names.