vmmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Created state = iota
	Stopped
	Running
)

Variables

This section is empty.

Functions

func LoadVMMetadataFilterable

func LoadVMMetadataFilterable(id string) (filter.Filterable, error)

Types

type VMFilter

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

func NewVMFilter

func NewVMFilter(p string) *VMFilter

func NewVMFilterAll

func NewVMFilterAll(p string, all bool) *VMFilter

func (*VMFilter) Filter

func (n *VMFilter) Filter(f filter.Filterable) ([]string, error)

type VMMetadata

type VMMetadata struct {
	*metadata.Metadata
}

func LoadVMMetadata

func LoadVMMetadata(id string) (*VMMetadata, error)

func NewVMMetadata

func NewVMMetadata(id, name string, od *VMObjectData) *VMMetadata

func ToVMMetadata

func ToVMMetadata(f filter.Filterable) (*VMMetadata, error)

func ToVMMetadataAll

func ToVMMetadataAll(a []filter.Filterable) ([]*VMMetadata, error)

func (*VMMetadata) CopyImage

func (md *VMMetadata) CopyImage() error

func (*VMMetadata) KernelID

func (md *VMMetadata) KernelID() string

func (*VMMetadata) Running

func (md *VMMetadata) Running() bool

func (*VMMetadata) SetState

func (md *VMMetadata) SetState(s state) error

func (*VMMetadata) Size

func (md *VMMetadata) Size() (int64, error)

func (*VMMetadata) VMOD

func (md *VMMetadata) VMOD() *VMObjectData

The md.ObjectData.(*VMObjectData) assert won't panic as this method can only receive *VMMetadata objects

type VMObjectData

type VMObjectData struct {
	ImageID  string
	KernelID string
	State    state
	VCPUs    int64
	Memory   int64
}

func NewVMObjectData

func NewVMObjectData(imageID, kernelID string, vCPUs, memory int64) *VMObjectData

Jump to

Keyboard shortcuts

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