vminstall

package
v0.0.0-...-034f4d6 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2014 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OSSECTION = "<os> <type arch='x86_64'>hvm</type><boot dev='hd'/></os>"
	ONBOOT    = "<on_reboot>restart</on_reboot>"
	ONCRASH   = "<on_crash>restart</on_crash>"

	POOXML = `
	<pool type='dir'>
	<name>boot-scratch</name>
	<target>
	<path>/var/lib/libvirt/boot</path>
	</target>
	</pool>
	`
	DOMAINXML = `` /* 966-byte string literal not displayed */

	STORAGEXML = `` /* 128-byte string literal not displayed */

)
View Source
const (
	VMINSTALL_SUCCESS = "SUCCESS"
	VMINSTALL_FAIL    = "FAIL"
)

MESSAGE to be sent to the channel

Variables

This section is empty.

Functions

func SendLocalToRemote

func SendLocalToRemote(stream libvirt.VirStream, volume libvirt.VirStorageVol, data []byte) error

func VmInstall

func VmInstall(conn libvirt.VirConnection, vmname string, url string, autoyast string, imageSize uint64, ch chan string)

Types

type Domain

type Domain struct {
	Name    string
	Kernel  string
	Initrd  string
	Image   string
	Install string
}

func (Domain) Encode

func (d Domain) Encode() (string, error)

type DownloadManager

type DownloadManager struct {
	// contains filtered or unexported fields
}

func (*DownloadManager) Download

func (manager *DownloadManager) Download(url string) ([]byte, error)

func (*DownloadManager) Regsiter

func (manager *DownloadManager) Regsiter(d Downloader)

type Downloader

type Downloader interface {
	Download(url string) ([]byte, error)
	Match() string
}

type HTTPDownloader

type HTTPDownloader struct {
}

func (HTTPDownloader) Download

func (h HTTPDownloader) Download(url string) ([]byte, error)

func (HTTPDownloader) Match

func (h HTTPDownloader) Match() string

type Storage

type Storage struct {
	Name string
	Size uint64
	//StorageType string //file or directory or others
	Type string //raw or qcow2
}

func (Storage) Encode

func (v Storage) Encode() (string, error)

type VolumeXMXEncoder

type VolumeXMXEncoder interface {
	Encode() (string, error)
}

Jump to

Keyboard shortcuts

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