Documentation
¶
Index ¶
- Variables
- func Connect(name string, mode string, user, identity string) error
- func Create(name, image string, disks []string, options CreateOptions, config CreateConfig) error
- func Destroy(name string, force bool) error
- func Down(name string, force bool, graceful bool) error
- func ImageGet(rawurl string, newName string, quiet bool) error
- func ImageList() error
- func ImageRemove(name string, force bool) error
- func Inspect(name, outputformat string) error
- func List(active, inactive bool) error
- func LogErrorAndExit(err error)
- func Restart(name string, force bool, graceful bool) error
- func SnapshotCreate(domainName, snapshotName string) error
- func SnapshotList(name string) error
- func SnapshotRemove(domainName, snapshotName string) error
- func SnapshotRevert(domainName, snapshotName string) error
- func TemplateGet(name, arch string, quiet bool) error
- func TemplateInfo(name, arch string) error
- func TemplateList(sortBy string) error
- func TemplateSync() error
- func Up(name string, connectAfterUp bool) error
- type CreateConfig
- type CreateOptions
- type MissingPositionalArgErr
Constants ¶
This section is empty.
Variables ¶
var ErrDomainNameRequired = MissingPositionalArgErr{ // contains filtered or unexported fields }
ErrDomainNameRequired represents a missing domain name argument.
var ErrImageNameRequired = MissingPositionalArgErr{ // contains filtered or unexported fields }
ErrImageNameRequired represents a missing image name argument.
var ErrTemplateNameRequired = MissingPositionalArgErr{ // contains filtered or unexported fields }
ErrTemplateNameRequired represents a missing template name argument.
var ErrURLOrPathRequired = MissingPositionalArgErr{ // contains filtered or unexported fields }
ErrURLOrPathRequired represents a missing URL or path argument.
Functions ¶
func Connect ¶
Connect opens a connection to a domain by name. The mode argument determines the connection mode: either "ssh" or "console".
func Create ¶
func Create(name, image string, disks []string, options CreateOptions, config CreateConfig) error
Create defines a new domain using name and creating a disk image backed by image. If connect is true, a console is attached to the newly created domain. If transient is true, the domain is destroy upon shutdown.
func Destroy ¶
Destroy stops and undefines a domain by name. If force is true, the domain is destroyed without prompting for confirmation.
func Down ¶
Down looks up an active domain by name and stops it. If force is true, the domain is stopped without prompting for confirmation. If graceful is true, the domain is shutdown gracefully.
func ImageGet ¶
ImageGet downloads rawurl and prepares it for use as a backing disk image. If newName is not empty, the image is renamed to newName. If quiet is true, no progress is printed to stdout.
func ImageRemove ¶
ImageRemove deletes image name from image storage directory. If force is true, the image is deleted without prompting for confirmation.
func List ¶
List prints a list of known domains. If active is true, active domains are included in the list. If inactive is true, inactive domains are included in the list.
func LogErrorAndExit ¶
func LogErrorAndExit(err error)
LogErrorAndExit logs err and exits with a non-zero exit code.
func Restart ¶
Restart looks up a domain by name and restarts it. If force is true, the domain is restarted without prompting for user confirmation first. If graceful is false, the dom is reset forcibly rather than being sent a restart signal.
func SnapshotCreate ¶
SnapshotCreate saves a new snapshot for the given domain.
func SnapshotList ¶
SnapshotList prints a table of snapshots for the given domain.
func SnapshotRemove ¶
SnapshotRemove deletes the given snapshot for the given domain.
func SnapshotRevert ¶
SnapshotRevert discards the current domain state, reverting it to snapshotName.
func TemplateGet ¶
TemplateGet downloads and prepares a disk template for use as a backing disk image. If quiet is true, no progress is printed to stdout.
func TemplateInfo ¶
TemplateInfo prints information about template with name and arch.
func TemplateList ¶
TemplateList prints a list of available templates.
func TemplateSync ¶
func TemplateSync() error
TemplateSync downloads the latest index and caches it.
Types ¶
type CreateConfig ¶
type CreateConfig struct { // Use UEFI boot instead of BIOS UEFI bool }
CreateConfig store customization options for modifying the domain parameters during creation.
type CreateOptions ¶
type CreateOptions struct { // Automatically connect to the domain's first serial port after creation. ConnectAfterCreate bool // Remove the create domain after it is shutdown. IsTransient bool // Create a snapshot immediately after creating the domain, before it is // started. CreateInitialSnapshot bool }
CreateOptions store various options for modifying the domain creation behavior.
type MissingPositionalArgErr ¶
type MissingPositionalArgErr struct {
// contains filtered or unexported fields
}
A MissingPositionalArgErr occurs when a command is invoked without a required positional argument.
func (MissingPositionalArgErr) Error ¶
func (e MissingPositionalArgErr) Error() string