vm

package
v0.0.0-...-e2c346a Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskDeployer

type DiskDeployer interface {
	Deploy(diskPool bmdeplmanifest.DiskPool, cloud bmcloud.Cloud, vm VM, eventLoggerStage bmeventlog.Stage) ([]bmdisk.Disk, error)
}

DiskDeployer is in the instance package to avoid a [disk -> vm -> disk] dependency cycle

func NewDiskDeployer

func NewDiskDeployer(diskManagerFactory bmdisk.ManagerFactory, diskRepo bmconfig.DiskRepo, logger boshlog.Logger) DiskDeployer

type Manager

type Manager interface {
	FindCurrent() (VM, bool, error)
	Create(bmstemcell.CloudStemcell, bmdeplmanifest.Manifest) (VM, error)
}

func NewManager

func NewManager(
	vmRepo bmconfig.VMRepo,
	stemcellRepo bmconfig.StemcellRepo,
	diskDeployer DiskDeployer,
	agentClient bmac.AgentClient,
	cloud bmcloud.Cloud,
	uuidGenerator boshuuid.Generator,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) Manager

type ManagerFactory

type ManagerFactory interface {
	NewManager(cloud bmcloud.Cloud, agentClient bmac.AgentClient) Manager
}

func NewManagerFactory

func NewManagerFactory(
	vmRepo bmconfig.VMRepo,
	stemcellRepo bmconfig.StemcellRepo,
	diskDeployer DiskDeployer,
	uuidGenerator boshuuid.Generator,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) ManagerFactory

type VM

type VM interface {
	CID() string
	Exists() (bool, error)
	WaitUntilReady(timeout time.Duration, delay time.Duration) error
	Start() error
	Stop() error
	Apply(bmas.ApplySpec) error
	UpdateDisks(bmdeplmanifest.DiskPool, bmeventlog.Stage) ([]bmdisk.Disk, error)
	WaitToBeRunning(maxAttempts int, delay time.Duration) error
	AttachDisk(bmdisk.Disk) error
	DetachDisk(bmdisk.Disk) error
	Disks() ([]bmdisk.Disk, error)
	UnmountDisk(bmdisk.Disk) error
	MigrateDisk() error
	Delete() error
}

func NewVM

func NewVM(
	cid string,
	vmRepo bmconfig.VMRepo,
	stemcellRepo bmconfig.StemcellRepo,
	diskDeployer DiskDeployer,
	agentClient bmagentclient.AgentClient,
	cloud bmcloud.Cloud,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) VM

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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