helper

package
v0.0.0-...-0101010 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSnapshot

func CreateSnapshot(vms []string, name string)

func DeleteSnapshot

func DeleteSnapshot(vms []string, name string)

func DockerMount

func DockerMount(vm string, bindingHome bool) error

func FakeDate

func FakeDate() error

func ListSnapshot

func ListSnapshot(vm string)

func ListVM

func ListVM(all bool)

func RestoreDate

func RestoreDate() error

func SetVMCPU

func SetVMCPU(vms []string, count int)

func SetVMRAM

func SetVMRAM(vms []string, size int)

func StartDockerVM

func StartDockerVM(vm string, bindingHome bool)

func StartVM

func StartVM(vms []string)

func StopVM

func StopVM(vms []string, force bool)

func SwitchSnapshot

func SwitchSnapshot(vms []string, name string)

Types

type Snapshot

type Snapshot struct {
	ID string `json:"id"`
	SnapshotInfo
}

type SnapshotInfo

type SnapshotInfo struct {
	Name    string `json:"name"`
	Date    string `json:"date"`
	State   string `json:"state"`
	Current bool   `json:"current"`
	Parent  string `json:"parent"`
}

type Snapshots

type Snapshots []Snapshot

func (Snapshots) Len

func (ss Snapshots) Len() int

func (Snapshots) Less

func (ss Snapshots) Less(i, j int) bool

func (Snapshots) Swap

func (ss Snapshots) Swap(i, j int)

type VMInfo

type VMInfo struct {
	Name         string `json:"name"`
	Status       string `json:"status"`
	IPConfigured string `json:"ip_configured"`
	UUID         string `json:"uuid"`
}

func GetVMInfo

func GetVMInfo(vm string) (VMInfo, error)

func ListVMInfo

func ListVMInfo(all bool) ([]VMInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL