action

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConcreteFactory

func NewConcreteFactory(
	fs boshsys.FileSystem,
	cmdRunner boshsys.CmdRunner,
	uuidGen boshuuid.Generator,
	compressor boshcmd.Compressor,
	options ConcreteFactoryOptions,
	logger boshlog.Logger,
) concreteFactory

Types

type Action

type Action interface {
}

type AttachDisk

type AttachDisk struct {
	// contains filtered or unexported fields
}

func NewAttachDisk

func NewAttachDisk(vmFinder bvm.Finder, diskFinder bdisk.Finder) AttachDisk

func (AttachDisk) Run

func (a AttachDisk) Run(vmCID VMCID, diskCID DiskCID) (interface{}, error)

type ConcreteFactoryOptions

type ConcreteFactoryOptions struct {
	BinPath  string
	StoreDir string

	Host       string
	Username   string
	PrivateKey string

	Agent bvm.AgentOptions
}

func (ConcreteFactoryOptions) DisksDir

func (o ConcreteFactoryOptions) DisksDir() string

func (ConcreteFactoryOptions) StemcellsDir

func (o ConcreteFactoryOptions) StemcellsDir() string

func (ConcreteFactoryOptions) VMsDir

func (o ConcreteFactoryOptions) VMsDir() string

func (ConcreteFactoryOptions) Validate

func (o ConcreteFactoryOptions) Validate() error

type CreateDisk

type CreateDisk struct {
	// contains filtered or unexported fields
}

func NewCreateDisk

func NewCreateDisk(diskCreator bdisk.Creator) CreateDisk

func (CreateDisk) Run

func (a CreateDisk) Run(size int, _ DiskCloudProperties, _ VMCID) (DiskCID, error)

type CreateStemcell

type CreateStemcell struct {
	// contains filtered or unexported fields
}

func NewCreateStemcell

func NewCreateStemcell(stemcellImporter bstem.Importer) CreateStemcell

func (CreateStemcell) Run

type CreateStemcellCloudProps

type CreateStemcellCloudProps struct{}

type CreateVM

type CreateVM struct {
	// contains filtered or unexported fields
}

func NewCreateVM

func NewCreateVM(stemcellFinder bstem.Finder, vmCreator bvm.Creator) CreateVM

func (CreateVM) Run

func (a CreateVM) Run(agentID string, stemcellCID StemcellCID, cloudProps VMCloudProperties, networks Networks, _ []DiskCID, env Environment) (VMCID, error)

type DeleteDisk

type DeleteDisk struct {
	// contains filtered or unexported fields
}

func NewDeleteDisk

func NewDeleteDisk(diskFinder bdisk.Finder) DeleteDisk

func (DeleteDisk) Run

func (a DeleteDisk) Run(diskCID DiskCID) (interface{}, error)

type DeleteStemcell

type DeleteStemcell struct {
	// contains filtered or unexported fields
}

func NewDeleteStemcell

func NewDeleteStemcell(stemcellFinder bstem.Finder) DeleteStemcell

func (DeleteStemcell) Run

func (a DeleteStemcell) Run(stemcellCID StemcellCID) (interface{}, error)

type DeleteVM

type DeleteVM struct {
	// contains filtered or unexported fields
}

func NewDeleteVM

func NewDeleteVM(vmFinder bvm.Finder) DeleteVM

func (DeleteVM) Run

func (a DeleteVM) Run(vmCID VMCID) (interface{}, error)

type DetachDisk

type DetachDisk struct {
	// contains filtered or unexported fields
}

func NewDetachDisk

func NewDetachDisk(vmFinder bvm.Finder, diskFinder bdisk.Finder) DetachDisk

func (DetachDisk) Run

func (a DetachDisk) Run(vmCID VMCID, diskCID DiskCID) (interface{}, error)

type DiskCID

type DiskCID string

type DiskCloudProperties

type DiskCloudProperties map[string]interface{}

type Environment

type Environment map[string]interface{}

type Factory

type Factory interface {
	Create(method string) (Action, error)
}

type GetDisks

type GetDisks struct {
	// contains filtered or unexported fields
}

func NewGetDisks

func NewGetDisks(vmFinder bvm.Finder) GetDisks

func (GetDisks) Run

func (a GetDisks) Run(vmCID VMCID) ([]string, error)

type HasDisk

type HasDisk struct {
	// contains filtered or unexported fields
}

func NewHasDisk

func NewHasDisk(diskFinder bdisk.Finder) HasDisk

func (HasDisk) Run

func (a HasDisk) Run(diskCID DiskCID) (bool, error)

type HasVM

type HasVM struct {
	// contains filtered or unexported fields
}

func NewHasVM

func NewHasVM(vmFinder bvm.Finder) HasVM

func (HasVM) Run

func (a HasVM) Run(vmCID VMCID) (bool, error)

type Network

type Network struct {
	Type string `json:"type"`

	IP      string `json:"ip"`
	Netmask string `json:"netmask"`
	Gateway string `json:"gateway"`

	DNS     []string `json:"dns"`
	Default []string `json:"default"`

	CloudProperties NetworkCloudProperties `json:"cloud_properties"`
}

type NetworkCloudProperties

type NetworkCloudProperties struct {
	Name string
	Type string
}

type Networks

type Networks map[string]Network

func (Networks) AsVMNetworks

func (ns Networks) AsVMNetworks() bvm.Networks

type RebootVM

type RebootVM struct {
	// contains filtered or unexported fields
}

func NewRebootVM

func NewRebootVM(vmFinder bvm.Finder) RebootVM

func (RebootVM) Run

func (a RebootVM) Run(vmCID VMCID) (interface{}, error)

type SetVMMetadata

type SetVMMetadata struct {
	// contains filtered or unexported fields
}

func NewSetVMMetadata

func NewSetVMMetadata(vm bvm.Finder) SetVMMetadata

func (SetVMMetadata) Run

func (a SetVMMetadata) Run(vmCID VMCID, metadata VMMetadata) (interface{}, error)

type StemcellCID

type StemcellCID string

type VMCID

type VMCID string

type VMCloudProperties

type VMCloudProperties struct {
	Memory        int
	CPUs          int
	EphemeralDisk int `json:"ephemeral_disk"`

	GUI              bool
	ParavirtProvider string `json:"paravirtprovider"`
}

func (VMCloudProperties) AsVMProps

func (cp VMCloudProperties) AsVMProps() bvm.VMProps

type VMMetadata

type VMMetadata map[string]interface{}

Jump to

Keyboard shortcuts

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