Documentation
¶
Index ¶
- type ApplyInput
- type AttachDiskInput
- type CreateInput
- type DeployInput
- type DetachDiskInput
- type FakeDiskDeployer
- type FakeManager
- type FakeManagerFactory
- type FakeVM
- func (vm *FakeVM) AgentClient() biagentclient.AgentClient
- func (vm *FakeVM) Apply(applySpec bias.ApplySpec) error
- func (vm *FakeVM) AttachDisk(disk bidisk.Disk) error
- func (vm *FakeVM) CID() string
- func (vm *FakeVM) Delete() error
- func (vm *FakeVM) DetachDisk(disk bidisk.Disk) error
- func (vm *FakeVM) Disks() ([]bidisk.Disk, error)
- func (vm *FakeVM) Exists() (bool, error)
- func (vm *FakeVM) GetState() (biagentclient.AgentState, error)
- func (vm *FakeVM) MigrateDisk() error
- func (vm *FakeVM) RunScript(script string, options map[string]interface{}) error
- func (vm *FakeVM) SetAttachDiskBehavior(disk bidisk.Disk, err error)
- func (vm *FakeVM) SetDetachDiskBehavior(disk bidisk.Disk, err error)
- func (vm *FakeVM) Start() error
- func (vm *FakeVM) Stop() error
- func (vm *FakeVM) UnmountDisk(disk bidisk.Disk) error
- func (vm *FakeVM) UpdateDisks(diskPool bideplmanifest.DiskPool, eventLoggerStage biui.Stage) ([]bidisk.Disk, error)
- func (vm *FakeVM) WaitToBeRunning(maxAttempts int, delay time.Duration) error
- func (vm *FakeVM) WaitUntilReady(timeout time.Duration, delay time.Duration) error
- type NewManagerInput
- type UnmountDiskInput
- type UpdateDisksInput
- type WaitInput
- type WaitUntilReadyInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyInput ¶
type ApplyInput struct {
ApplySpec bias.ApplySpec
}
type AttachDiskInput ¶
type AttachDiskInput struct {
Disk bidisk.Disk
}
type CreateInput ¶
type CreateInput struct {
Stemcell bistemcell.CloudStemcell
Manifest bideplmanifest.Manifest
}
type DeployInput ¶
type DeployInput struct {
DiskPool bideplmanifest.DiskPool
Cloud bicloud.Cloud
VM bivm.VM
EventLoggerStage biui.Stage
}
type DetachDiskInput ¶
type DetachDiskInput struct {
Disk bidisk.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 bideplmanifest.DiskPool,
cloud bicloud.Cloud,
vm bivm.VM,
eventLoggerStage biui.Stage,
) ([]bidisk.Disk, error)
func (*FakeDiskDeployer) SetDeployBehavior ¶
func (d *FakeDiskDeployer) SetDeployBehavior(disks []bidisk.Disk, err error)
type FakeManager ¶
type FakeManager struct {
CreateInput CreateInput
CreateVM bivm.VM
CreateErr error
// contains filtered or unexported fields
}
func NewFakeManager ¶
func NewFakeManager() *FakeManager
func (*FakeManager) Create ¶
func (m *FakeManager) Create(stemcell bistemcell.CloudStemcell, deploymentManifest bideplmanifest.Manifest) (bivm.VM, error)
func (*FakeManager) FindCurrent ¶
func (m *FakeManager) FindCurrent() (bivm.VM, bool, error)
func (*FakeManager) SetFindCurrentBehavior ¶
func (m *FakeManager) SetFindCurrentBehavior(vm bivm.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 bicloud.Cloud, mbusURL string) bivm.Manager
func (*FakeManagerFactory) SetNewManagerBehavior ¶
func (f *FakeManagerFactory) SetNewManagerBehavior(cloud bicloud.Cloud, mbusURL string, manager bivm.Manager)
type FakeVM ¶
type FakeVM struct {
ExistsCalled int
ExistsFound bool
ExistsErr error
AgentClientReturn biagentclient.AgentClient
UpdateDisksInputs []UpdateDisksInput
UpdateDisksDisks []bidisk.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 []bidisk.Disk
ListDisksErr error
UnmountDiskInputs []UnmountDiskInput
UnmountDiskErr error
MigrateDiskCalledTimes int
MigrateDiskErr error
RunScriptInputs []string
RunScriptErrors map[string]error
GetStateResult biagentclient.AgentState
GetStateCalled int
GetStateErr error
// contains filtered or unexported fields
}
func (*FakeVM) AgentClient ¶
func (vm *FakeVM) AgentClient() biagentclient.AgentClient
func (*FakeVM) AttachDisk ¶
func (vm *FakeVM) AttachDisk(disk bidisk.Disk) error
func (*FakeVM) DetachDisk ¶
func (vm *FakeVM) DetachDisk(disk bidisk.Disk) error
func (*FakeVM) MigrateDisk ¶
func (vm *FakeVM) MigrateDisk() error
func (*FakeVM) RunScript ¶
func (vm *FakeVM) RunScript(script string, options map[string]interface{}) error
func (*FakeVM) SetAttachDiskBehavior ¶
func (vm *FakeVM) SetAttachDiskBehavior(disk bidisk.Disk, err error)
func (*FakeVM) SetDetachDiskBehavior ¶
func (vm *FakeVM) SetDetachDiskBehavior(disk bidisk.Disk, err error)
func (*FakeVM) UnmountDisk ¶
func (vm *FakeVM) UnmountDisk(disk bidisk.Disk) error
func (*FakeVM) UpdateDisks ¶
func (vm *FakeVM) UpdateDisks(diskPool bideplmanifest.DiskPool, eventLoggerStage biui.Stage) ([]bidisk.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 bicloud.Cloud
MbusURL string
}
type UnmountDiskInput ¶
type UnmountDiskInput struct {
Disk bidisk.Disk
}
type UpdateDisksInput ¶
type UpdateDisksInput struct {
DiskPool bideplmanifest.DiskPool
Stage biui.Stage
}
type WaitUntilReadyInput ¶
type WaitUntilReadyInput struct {
Timeout time.Duration
Delay time.Duration
}
Click to show internal directories.
Click to hide internal directories.