fakes

package
v0.0.119 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInput

type CreateInput struct {
	DiskPool   bideplmanifest.DiskPool
	InstanceID string
}

type FakeDisk

type FakeDisk struct {
	NeedsMigrationInputs []NeedsMigrationInput

	DeleteCalledTimes int
	// contains filtered or unexported fields
}

func NewFakeDisk

func NewFakeDisk(cid string) *FakeDisk

func (*FakeDisk) CID

func (d *FakeDisk) CID() string

func (*FakeDisk) Delete

func (d *FakeDisk) Delete() error

func (*FakeDisk) NeedsMigration

func (d *FakeDisk) NeedsMigration(size int, cloudProperties biproperty.Map) bool

func (*FakeDisk) SetDeleteBehavior

func (d *FakeDisk) SetDeleteBehavior(err error)

func (*FakeDisk) SetNeedsMigrationBehavior

func (d *FakeDisk) SetNeedsMigrationBehavior(needsMigration bool)

type FakeManager

type FakeManager struct {
	CreateInputs []CreateInput
	CreateDisk   bidisk.Disk
	CreateErr    error

	DeleteUnusedCalledTimes int
	DeleteUnusedErr         error
	// contains filtered or unexported fields
}

func NewFakeManager

func NewFakeManager() *FakeManager

func (*FakeManager) Create

func (m *FakeManager) Create(diskPool bideplmanifest.DiskPool, instanceID string) (bidisk.Disk, error)

func (*FakeManager) DeleteUnused

func (m *FakeManager) DeleteUnused(eventLogStage biui.Stage) error

func (*FakeManager) FindCurrent

func (m *FakeManager) FindCurrent() ([]bidisk.Disk, error)

func (*FakeManager) FindUnused

func (m *FakeManager) FindUnused() ([]bidisk.Disk, error)

func (*FakeManager) SetFindCurrentBehavior

func (m *FakeManager) SetFindCurrentBehavior(disks []bidisk.Disk, err error)

func (*FakeManager) SetFindUnusedBehavior

func (m *FakeManager) SetFindUnusedBehavior(
	disks []bidisk.Disk,
	err error,
)

type FakeManagerFactory

type FakeManagerFactory struct {
	NewManagerInputs  []NewManagerInput
	NewManagerManager bidisk.Manager
}

func NewFakeManagerFactory

func NewFakeManagerFactory() *FakeManagerFactory

func (*FakeManagerFactory) NewManager

func (f *FakeManagerFactory) NewManager(cloud bicloud.Cloud) bidisk.Manager

type NeedsMigrationInput

type NeedsMigrationInput struct {
	Size            int
	CloudProperties biproperty.Map
}

type NewManagerInput

type NewManagerInput struct {
	Cloud bicloud.Cloud
}

Jump to

Keyboard shortcuts

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