vsphere

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VixEToolsNotRunning = "(3016, 0)"
)

Variables

This section is empty.

Functions

func BuildArchiveURL

func BuildArchiveURL(op trace.Operation, disklabel, target string, fs *archive.FilterSpec, recurse, data bool) (string, error)

Parse Archive builds an archive url with disklabel, filtersec, recursive, and data booleans.

func GetMetadata added in v1.5.0

func GetMetadata(op trace.Operation, ds *datastore.Helper, dir string) (map[string][]byte, error)

Read the metadata from the given dir

func GetToolboxClient

func GetToolboxClient(op trace.Operation, vm *vm.VirtualMachine, id string) (*toolbox.Client, error)

GetToolboxClient returns a toolbox client given a vm and id

func IsToolBoxStateChangeErr

func IsToolBoxStateChangeErr(err error) bool

IsToolBoxConflictErr checks for conflictError for online import

func WriteMetadata added in v1.5.0

func WriteMetadata(op trace.Operation, ds *datastore.Helper, dir string, meta map[string][]byte) error

Write the opaque metadata blobs (by name). Each blob in the metadata map is written to a file with the corresponding name. Likewise, when we read it back (on restart) we populate the map accordingly.

Types

type ToolboxDataSink

type ToolboxDataSink struct {
	ID    string
	VM    *vm.VirtualMachine
	Clean func()
}

ToolboxDataSink implements the DataSink interface for mounted devices

func (*ToolboxDataSink) Close

func (t *ToolboxDataSink) Close() error

func (*ToolboxDataSink) Import

func (t *ToolboxDataSink) Import(op trace.Operation, spec *archive.FilterSpec, data io.ReadCloser) error

Import writes `data` to the data sink associated with this DataSink

func (*ToolboxDataSink) Sink

func (t *ToolboxDataSink) Sink() interface{}

Sink returns the data sink associated with the DataSink

type ToolboxDataSource

type ToolboxDataSource struct {
	ID    string
	VM    *vm.VirtualMachine
	Clean func()
}

ToolboxDataSource implements the DataSource interface for mounted devices

func (*ToolboxDataSource) Close

func (t *ToolboxDataSource) Close() error

func (*ToolboxDataSource) Export

func (t *ToolboxDataSource) Export(op trace.Operation, spec *archive.FilterSpec, data bool) (io.ReadCloser, error)

Export reads data from the associated data source and returns it as a tar archive

func (*ToolboxDataSource) Source

func (t *ToolboxDataSource) Source() interface{}

Source returns the data source associated with the DataSource

func (*ToolboxDataSource) Stat

Stat returns file stats of the destination header determined but the filterspec inclusion path

Jump to

Keyboard shortcuts

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