action

package
v0.0.0-...-8586347 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2016 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
}

type AttachDisk

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

func NewAttachDisk

func NewAttachDisk(
	diskService disk.Service,
	vmService instance.Service,
	registryClient registry.Client,
) AttachDisk

func (AttachDisk) Run

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

type ConcreteFactory

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

func NewConcreteFactory

func NewConcreteFactory(
	googleClient client.GoogleClient,
	uuidGen boshuuid.Generator,
	options ConcreteFactoryOptions,
	logger boshlog.Logger,
) ConcreteFactory

func (ConcreteFactory) Create

func (f ConcreteFactory) Create(method string) (Action, error)

type ConcreteFactoryOptions

type ConcreteFactoryOptions struct {
	Agent    registry.AgentOptions
	Registry registry.ClientOptions
}

func (ConcreteFactoryOptions) Validate

func (o ConcreteFactoryOptions) Validate() error

type ConfigureNetworks

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

func NewConfigureNetworks

func NewConfigureNetworks(
	vmService instance.Service,
	registryClient registry.Client,
) ConfigureNetworks

func (ConfigureNetworks) Run

func (rv ConfigureNetworks) Run(vmCID VMCID, networks Networks) (interface{}, error)

type CreateDisk

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

func NewCreateDisk

func NewCreateDisk(
	diskService disk.Service,
	diskTypeService disktype.Service,
	vmService instance.Service,
	defaultZone string,
) CreateDisk

func (CreateDisk) Run

func (cd CreateDisk) Run(size int, cloudProps DiskCloudProperties, vmCID VMCID) (DiskCID, error)

type CreateStemcell

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

func NewCreateStemcell

func NewCreateStemcell(
	imageService image.Service,
) CreateStemcell

func (CreateStemcell) Run

func (cs CreateStemcell) Run(stemcellPath string, cloudProps StemcellCloudProperties) (StemcellCID, error)

type CreateVM

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

func NewCreateVM

func NewCreateVM(
	vmService instance.Service,
	diskService disk.Service,
	diskTypeService disktype.Service,
	imageService image.Service,
	machineTypeService machinetype.Service,
	registryClient registry.Client,
	registryOptions registry.ClientOptions,
	agentOptions registry.AgentOptions,
	defaultRootDiskSizeGb int,
	defaultRootDiskType string,
	defaultZone string,
) CreateVM

func (CreateVM) Run

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

type DeleteDisk

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

func NewDeleteDisk

func NewDeleteDisk(
	diskService disk.Service,
) DeleteDisk

func (DeleteDisk) Run

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

type DeleteSnapshot

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

func NewDeleteSnapshot

func NewDeleteSnapshot(
	snapshotService snapshot.Service,
) DeleteSnapshot

func (DeleteSnapshot) Run

func (ds DeleteSnapshot) Run(snapshotCID SnapshotCID) (interface{}, error)

type DeleteStemcell

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

func NewDeleteStemcell

func NewDeleteStemcell(
	imageService image.Service,
) DeleteStemcell

func (DeleteStemcell) Run

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

type DeleteVM

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

func NewDeleteVM

func NewDeleteVM(
	vmService instance.Service,
	registryClient registry.Client,
) DeleteVM

func (DeleteVM) Run

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

type DetachDisk

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

func NewDetachDisk

func NewDetachDisk(
	vmService instance.Service,
	registryClient registry.Client,
) DetachDisk

func (DetachDisk) Run

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

type DiskCID

type DiskCID string

type DiskCloudProperties

type DiskCloudProperties struct {
	DiskType string `json:"type,omitempty"`
}

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(
	vmService instance.Service,
) GetDisks

func (GetDisks) Run

func (gd GetDisks) Run(vmCID VMCID) (disks []string, err error)

type HasVM

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

func NewHasVM

func NewHasVM(
	vmService instance.Service,
) HasVM

func (HasVM) Run

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

type Network

type Network struct {
	Type            string                 `json:"type,omitempty"`
	IP              string                 `json:"ip,omitempty"`
	Gateway         string                 `json:"gateway,omitempty"`
	Netmask         string                 `json:"netmask,omitempty"`
	DNS             []string               `json:"dns,omitempty"`
	Default         []string               `json:"default,omitempty"`
	CloudProperties NetworkCloudProperties `json:"cloud_properties,omitempty"`
}

type NetworkCloudProperties

type NetworkCloudProperties struct {
	NetworkName         string      `json:"network_name,omitempty"`
	SubnetworkName      string      `json:"subnetwork_name,omitempty"`
	Tags                NetworkTags `json:"tags,omitempty"`
	EphemeralExternalIP bool        `json:"ephemeral_external_ip,omitempty"`
	IPForwarding        bool        `json:"ip_forwarding,omitempty"`
	TargetPool          string      `json:"target_pool,omitempty"`
	InstanceGroup       string      `json:"instance_group,omitempty"`
}

type NetworkTags

type NetworkTags []string

type Networks

type Networks map[string]Network

func (Networks) AsInstanceServiceNetworks

func (ns Networks) AsInstanceServiceNetworks() instance.Networks

func (Networks) AsRegistryNetworks

func (ns Networks) AsRegistryNetworks() registry.NetworksSettings

type Ping

type Ping struct{}

func NewPing

func NewPing() Ping

func (Ping) Run

func (p Ping) Run() (string, error)

type RebootVM

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

func NewRebootVM

func NewRebootVM(
	vmService instance.Service,
) RebootVM

func (RebootVM) Run

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

type SetVMMetadata

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

func NewSetVMMetadata

func NewSetVMMetadata(
	vmService instance.Service,
) SetVMMetadata

func (SetVMMetadata) Run

func (svm SetVMMetadata) Run(vmCID VMCID, vmMetadata VMMetadata) (interface{}, error)

type SnapshotCID

type SnapshotCID string

type SnapshotDisk

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

func NewSnapshotDisk

func NewSnapshotDisk(
	snapshotService snapshot.Service,
	diskService disk.Service,
) SnapshotDisk

func (SnapshotDisk) Run

func (sd SnapshotDisk) Run(diskCID DiskCID, metadata SnapshotMetadata) (SnapshotCID, error)

type SnapshotMetadata

type SnapshotMetadata struct {
	Deployment string `json:"deployment,omitempty"`
	Job        string `json:"job,omitempty"`
	Index      string `json:"index,omitempty"`
}

type StemcellCID

type StemcellCID string

type StemcellCloudProperties

type StemcellCloudProperties struct {
	Name           string `json:"name,omitempty"`
	Version        string `json:"version,omitempty"`
	Infrastructure string `json:"infrastructure,omitempty"`
	SourceURL      string `json:"source_url,omitempty"`
}

type VMCID

type VMCID string

type VMCloudProperties

type VMCloudProperties struct {
	Zone              string          `json:"zone,omitempty"`
	MachineType       string          `json:"machine_type,omitempty"`
	CPU               int             `json:"cpu,omitempty"`
	RAM               int             `json:"ram,omitempty"`
	RootDiskSizeGb    int             `json:"root_disk_size_gb,omitempty"`
	RootDiskType      string          `json:"root_disk_type,omitempty"`
	AutomaticRestart  bool            `json:"automatic_restart,omitempty"`
	OnHostMaintenance string          `json:"on_host_maintenance,omitempty"`
	Preemptible       bool            `json:"preemptible,omitempty"`
	ServiceScopes     VMServiceScopes `json:"service_scopes,omitempty"`
}

type VMMetadata

type VMMetadata map[string]interface{}

type VMServiceScopes

type VMServiceScopes []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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