fakes

package
v2.0.18+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachDiskInput

type AttachDiskInput struct {
	VMCID   string
	DiskCID string
}

type CreateDiskInput

type CreateDiskInput struct {
	Size            int
	CloudProperties biproperty.Map
	InstanceID      string
}

type CreateStemcellInput

type CreateStemcellInput struct {
	ImagePath       string
	CloudProperties biproperty.Map
}

type CreateVMInput

type CreateVMInput struct {
	AgentID            string
	StemcellCID        string
	CloudProperties    biproperty.Map
	NetworksInterfaces map[string]biproperty.Map
	Env                biproperty.Map
}

type DeleteDiskInput

type DeleteDiskInput struct {
	DiskCID string
}

type DeleteStemcellInput

type DeleteStemcellInput struct {
	StemcellCID string
}

type DeleteVMInput

type DeleteVMInput struct {
	VMCID string
}

type DetachDiskInput

type DetachDiskInput struct {
	VMCID   string
	DiskCID string
}

type FakeCPICmdRunner

type FakeCPICmdRunner struct {
	RunInputs    []RunInput
	RunCmdOutput bicloud.CmdOutput
	RunErr       error
}

func NewFakeCPICmdRunner

func NewFakeCPICmdRunner() *FakeCPICmdRunner

func (*FakeCPICmdRunner) Run

func (r *FakeCPICmdRunner) Run(context bicloud.CmdContext, method string, args ...interface{}) (bicloud.CmdOutput, error)

type FakeCloud

type FakeCloud struct {
	CreateStemcellInputs []CreateStemcellInput
	CreateStemcellCID    string
	CreateStemcellErr    error

	HasVMInput HasVMInput
	HasVMFound bool
	HasVMErr   error

	CreateVMInput CreateVMInput
	CreateVMCID   string
	CreateVMErr   error

	CreateDiskInput CreateDiskInput
	CreateDiskCID   string
	CreateDiskErr   error

	AttachDiskInput AttachDiskInput
	AttachDiskErr   error

	DetachDiskInput DetachDiskInput
	DetachDiskErr   error

	DeleteVMInput DeleteVMInput
	DeleteVMErr   error

	DeleteDiskInputs []DeleteDiskInput
	DeleteDiskErr    error

	DeleteStemcellInputs []DeleteStemcellInput
	DeleteStemcellErr    error

	SetVMMetadataCid      string
	SetVMMetadataMetadata cloud.VMMetadata
	SetVMMetadataError    error
}

func NewFakeCloud

func NewFakeCloud() *FakeCloud

func (*FakeCloud) AttachDisk

func (c *FakeCloud) AttachDisk(vmCID, diskCID string) error

func (*FakeCloud) CreateDisk

func (c *FakeCloud) CreateDisk(
	size int,
	cloudProperties biproperty.Map,
	instanceID string,
) (string, error)

func (*FakeCloud) CreateStemcell

func (c *FakeCloud) CreateStemcell(imagePath string, cloudProperties biproperty.Map) (string, error)

func (*FakeCloud) CreateVM

func (c *FakeCloud) CreateVM(
	agentID string,
	stemcellCID string,
	cloudProperties biproperty.Map,
	networksInterfaces map[string]biproperty.Map,
	env biproperty.Map,
) (string, error)

func (*FakeCloud) DeleteDisk

func (c *FakeCloud) DeleteDisk(diskCID string) error

func (*FakeCloud) DeleteStemcell

func (c *FakeCloud) DeleteStemcell(stemcellCID string) error

func (*FakeCloud) DeleteVM

func (c *FakeCloud) DeleteVM(vmCID string) error

func (*FakeCloud) DetachDisk

func (c *FakeCloud) DetachDisk(vmCID, diskCID string) error

func (*FakeCloud) HasVM

func (c *FakeCloud) HasVM(vmCID string) (bool, error)

func (*FakeCloud) SetVMMetadata

func (c *FakeCloud) SetVMMetadata(cid string, metadata cloud.VMMetadata) error

func (*FakeCloud) String

func (c *FakeCloud) String() string

type HasVMInput

type HasVMInput struct {
	VMCID string
}

type RunInput

type RunInput struct {
	Context   bicloud.CmdContext
	Method    string
	Arguments []interface{}
}

Jump to

Keyboard shortcuts

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