fakes

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyInput

type ApplyInput struct {
	ApplySpec bmas.ApplySpec
}

type AttachDiskInput

type AttachDiskInput struct {
	Disk bmdisk.Disk
}

type CreateInput

type CreateInput struct {
	Stemcell bmstemcell.CloudStemcell
	Manifest bmdeplmanifest.Manifest
}

type DeployInput

type DeployInput struct {
	DiskPool         bmdeplmanifest.DiskPool
	Cloud            bmcloud.Cloud
	VM               bmvm.VM
	EventLoggerStage bmeventlog.Stage
}

type DetachDiskInput

type DetachDiskInput struct {
	Disk bmdisk.Disk
}

type FakeDiskDeployer

type FakeDiskDeployer struct {
	DeployInputs []DeployInput
	// contains filtered or unexported fields
}

func NewFakeDiskDeployer

func NewFakeDiskDeployer() *FakeDiskDeployer

func (*FakeDiskDeployer) Deploy

func (d *FakeDiskDeployer) Deploy(
	diskPool bmdeplmanifest.DiskPool,
	cloud bmcloud.Cloud,
	vm bmvm.VM,
	eventLoggerStage bmeventlog.Stage,
) ([]bmdisk.Disk, error)

func (*FakeDiskDeployer) SetDeployBehavior

func (d *FakeDiskDeployer) SetDeployBehavior(disks []bmdisk.Disk, err error)

type FakeManager

type FakeManager struct {
	CreateInput CreateInput
	CreateVM    bmvm.VM
	CreateErr   error
	// contains filtered or unexported fields
}

func NewFakeManager

func NewFakeManager() *FakeManager

func (*FakeManager) Create

func (m *FakeManager) Create(stemcell bmstemcell.CloudStemcell, deploymentManifest bmdeplmanifest.Manifest) (bmvm.VM, error)

func (*FakeManager) FindCurrent

func (m *FakeManager) FindCurrent() (bmvm.VM, bool, error)

func (*FakeManager) SetFindCurrentBehavior

func (m *FakeManager) SetFindCurrentBehavior(vm bmvm.VM, found bool, err error)

type FakeManagerFactory

type FakeManagerFactory struct {
	NewManagerInputs []NewManagerInput
	// contains filtered or unexported fields
}

func NewFakeManagerFactory

func NewFakeManagerFactory() *FakeManagerFactory

func (*FakeManagerFactory) NewManager

func (f *FakeManagerFactory) NewManager(cloud bmcloud.Cloud, mbusURL string) bmvm.Manager

func (*FakeManagerFactory) SetNewManagerBehavior

func (f *FakeManagerFactory) SetNewManagerBehavior(cloud bmcloud.Cloud, mbusURL string, manager bmvm.Manager)

type FakeVM

type FakeVM struct {
	ExistsCalled int
	ExistsFound  bool
	ExistsErr    error

	UpdateDisksInputs []UpdateDisksInput
	UpdateDisksDisks  []bmdisk.Disk
	UpdateDisksErr    error

	ApplyInputs []ApplyInput
	ApplyErr    error

	StartCalled int
	StartErr    error

	AttachDiskInputs []AttachDiskInput

	DetachDiskInputs []DetachDiskInput

	WaitUntilReadyInputs []WaitUntilReadyInput
	WaitUntilReadyErr    error

	WaitToBeRunningInputs []WaitInput
	WaitToBeRunningErr    error

	DeleteCalled int
	DeleteErr    error

	StopCalled int
	StopErr    error

	ListDisksDisks []bmdisk.Disk
	ListDisksErr   error

	UnmountDiskInputs []UnmountDiskInput
	UnmountDiskErr    error

	MigrateDiskCalledTimes int
	MigrateDiskErr         error
	// contains filtered or unexported fields
}

func NewFakeVM

func NewFakeVM(cid string) *FakeVM

func (*FakeVM) Apply

func (vm *FakeVM) Apply(applySpec bmas.ApplySpec) error

func (*FakeVM) AttachDisk

func (vm *FakeVM) AttachDisk(disk bmdisk.Disk) error

func (*FakeVM) CID

func (vm *FakeVM) CID() string

func (*FakeVM) Delete

func (vm *FakeVM) Delete() error

func (*FakeVM) DetachDisk

func (vm *FakeVM) DetachDisk(disk bmdisk.Disk) error

func (*FakeVM) Disks

func (vm *FakeVM) Disks() ([]bmdisk.Disk, error)

func (*FakeVM) Exists

func (vm *FakeVM) Exists() (bool, error)

func (*FakeVM) MigrateDisk

func (vm *FakeVM) MigrateDisk() error

func (*FakeVM) SetAttachDiskBehavior

func (vm *FakeVM) SetAttachDiskBehavior(disk bmdisk.Disk, err error)

func (*FakeVM) SetDetachDiskBehavior

func (vm *FakeVM) SetDetachDiskBehavior(disk bmdisk.Disk, err error)

func (*FakeVM) Start

func (vm *FakeVM) Start() error

func (*FakeVM) Stop

func (vm *FakeVM) Stop() error

func (*FakeVM) UnmountDisk

func (vm *FakeVM) UnmountDisk(disk bmdisk.Disk) error

func (*FakeVM) UpdateDisks

func (vm *FakeVM) UpdateDisks(diskPool bmdeplmanifest.DiskPool, eventLoggerStage bmeventlog.Stage) ([]bmdisk.Disk, error)

func (*FakeVM) WaitToBeRunning

func (vm *FakeVM) WaitToBeRunning(maxAttempts int, delay time.Duration) error

func (*FakeVM) WaitUntilReady

func (vm *FakeVM) WaitUntilReady(timeout time.Duration, delay time.Duration) error

type NewManagerInput

type NewManagerInput struct {
	Cloud   bmcloud.Cloud
	MbusURL string
}

type UnmountDiskInput

type UnmountDiskInput struct {
	Disk bmdisk.Disk
}

type UpdateDisksInput

type UpdateDisksInput struct {
	DiskPool bmdeplmanifest.DiskPool
	Stage    bmeventlog.Stage
}

type WaitInput

type WaitInput struct {
	MaxAttempts int
	Delay       time.Duration
}

type WaitUntilReadyInput

type WaitUntilReadyInput struct {
	Timeout time.Duration
	Delay   time.Duration
}

Jump to

Keyboard shortcuts

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