action

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoshEnv added in v1.2.0

type BoshEnv struct {
	Group  string   `json:"group"`
	Groups []string `json:"groups"`
}

type CPI

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

func (CPI) AttachDisk

func (a CPI) AttachDisk(vmCID apiv1.VMCID, diskCID apiv1.DiskCID) error

func (CPI) CalculateVMCloudProperties

func (a CPI) CalculateVMCloudProperties(res apiv1.VMResources) (apiv1.VMCloudProps, error)

func (CPI) CreateDisk

func (a CPI) CreateDisk(size int, props apiv1.DiskCloudProps, cid *apiv1.VMCID) (apiv1.DiskCID, error)

func (CPI) CreateStemcell

func (a CPI) CreateStemcell(imagePath string, cp apiv1.StemcellCloudProps) (apiv1.StemcellCID, error)

CreateStemcell - Create CS template from given stemcell

1. read cloud-properties 2. generate template name from random id 3. request CS an upload token 4. push image to CS recieved endpoint

func (CPI) CreateVM

func (a CPI) CreateVM(
	agentID apiv1.AgentID,
	stemcellCID apiv1.StemcellCID,
	cloudProps apiv1.VMCloudProps,
	networks apiv1.Networks,
	associatedDiskCIDs []apiv1.DiskCID,
	env apiv1.VMEnv) (apiv1.VMCID, error)

func (CPI) DeleteDisk

func (a CPI) DeleteDisk(cid apiv1.DiskCID) error

func (CPI) DeleteSnapshot

func (a CPI) DeleteSnapshot(cid apiv1.SnapshotCID) error

func (CPI) DeleteStemcell

func (a CPI) DeleteStemcell(cid apiv1.StemcellCID) error

DeleteStemcell - Delete CS template matching given stemcell name

func (CPI) DeleteVM

func (a CPI) DeleteVM(cid apiv1.VMCID) error

func (CPI) DetachDisk

func (a CPI) DetachDisk(vmCID apiv1.VMCID, diskCID apiv1.DiskCID) error

func (CPI) GetDisks

func (a CPI) GetDisks(cid apiv1.VMCID) ([]apiv1.DiskCID, error)

func (CPI) HasDisk

func (a CPI) HasDisk(cid apiv1.DiskCID) (bool, error)

func (CPI) HasVM

func (a CPI) HasVM(cid apiv1.VMCID) (bool, error)

func (CPI) Info

func (a CPI) Info() (apiv1.Info, error)

func (CPI) PeriodicCleanDisk

func (a CPI) PeriodicCleanDisk()

func (CPI) RebootVM

func (a CPI) RebootVM(cid apiv1.VMCID) error

func (CPI) ResizeDisk

func (a CPI) ResizeDisk(cid apiv1.DiskCID, size int) error

func (CPI) SetDiskMetadata

func (a CPI) SetDiskMetadata(cid apiv1.DiskCID, meta apiv1.DiskMeta) error

func (CPI) SetVMMetadata

func (a CPI) SetVMMetadata(cid apiv1.VMCID, meta apiv1.VMMeta) error

func (CPI) SnapshotDisk

func (a CPI) SnapshotDisk(diskCID apiv1.DiskCID, meta apiv1.DiskMeta) (apiv1.SnapshotCID, error)

type CloudStackCloudProperties

type CloudStackCloudProperties struct {
	Name            string `json:"name"`
	Version         string `json:"version"`
	Infrastructure  string `json:"infrastructure"`
	Hypervisor      string `json:"hypervisor"`
	Disk            int    `json:"disk"`
	DiskFormat      string `json:"disk_format"`
	ContainerFormat string `json:"container_format"`
	OsType          string `json:"os_type"`
	OsDistro        string `json:"os_distro"`
	Architecture    string `json:"architecture"`
	AutoDiskConfig  bool   `json:"auto_disk_config"`
	LightTemplate   string `json:"light_template"`
}

func (CloudStackCloudProperties) Validate

func (cc CloudStackCloudProperties) Validate() error

type ComputeCloudProperties added in v1.3.4

type ComputeCloudProperties struct {
	CPUNumber int `json:"cpu"`
	CPUSpeed  int `json:"cpu_speed"`
	RAM       int `json:"ram"`
}

type Context added in v1.2.0

type Context struct {
	DirectorUUID string `json:"director_uuid"`
}

type DiskCloudProperties

type DiskCloudProperties struct {
	DiskOffering          string `json:"disk_offering"`
	EphemeralDiskOffering string `json:"ephemeral_disk_offering"`
	EphemeralDiskSize     int    `json:"disk"`
	RootDiskSize          int    `json:"root_disk_size"`
}

type Factory

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

func NewFactory

func NewFactory(config config.Config, logger boshlog.Logger) Factory

func (Factory) New

func (f Factory) New(callCtx apiv1.CallContext) (apiv1.CPI, error)

type LBCloudProperties added in v1.3.0

type LBCloudProperties struct {
	Lbs []LBConfig `json:"lbs"`
}

type LBConfig added in v1.3.0

type LBConfig struct {
	Name         string `json:"name"`
	Algorithm    string `json:"algorithm"`
	PrivatePort  int    `json:"private_port"`
	PublicPort   int    `json:"public_port"`
	OpenFirewall bool   `json:"open_firewall"`
	PublicIp     string `json:"public_ip"`
}

type NetworkCloudProperties

type NetworkCloudProperties struct {
	Name string `json:"name"`
}

type NotImplementedError

type NotImplementedError string

func NewNotImplementedError

func NewNotImplementedError(err error) NotImplementedError

func (NotImplementedError) Error

func (e NotImplementedError) Error() string

func (NotImplementedError) Type

func (e NotImplementedError) Type() string

type ResourceCloudProperties

type ResourceCloudProperties struct {
	DiskCloudProperties
	LBCloudProperties
	ComputeCloudProperties
	ComputeOffering   string `json:"compute_offering"`
	AffinityGroup     string `json:"affinity_group"`
	AffinityGroupType string `json:"affinity_group_type"`
}

type UserDataContentsType

type UserDataContentsType struct {
	Registry UserDataRegistry
	Server   UserDataServer
	DNS      UserDataDNS
}

func NewUserDataContents

func NewUserDataContents(vmName string, regOpts config.RegistryOptions, networks apiv1.Networks) UserDataContentsType

type UserDataDNS

type UserDataDNS struct {
	Nameserver []string
}

type UserDataRegistry

type UserDataRegistry struct {
	Endpoint string
}

type UserDataServer

type UserDataServer struct {
	Name string // Name given by CPI e.g. vm-384sd4-r7re9e...
}

type VMEnv added in v1.2.0

type VMEnv struct {
	Bosh BoshEnv `json:"bosh"`
}

func NewVMEnv added in v1.2.0

func NewVMEnv(vmEnv apiv1.VMEnv) VMEnv

Jump to

Keyboard shortcuts

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