Documentation ¶
Index ¶
- type AgentEnv
- type AgentEnvService
- type AgentEnvServiceFactory
- type AgentOptions
- type BlobstoreOptions
- type BlobstoreSpec
- type Creator
- type DisksSpec
- type EnvSpec
- type Environment
- type Finder
- type GuestBindMounts
- type HostBindMounts
- type Network
- type NetworkSpec
- type Networks
- type NetworksSpec
- type NotSupportedError
- type PersistentSpec
- type SoftLayerAgentEnvService
- type SoftLayerAgentEnvServiceFactory
- type SoftLayerCreator
- type SoftLayerFinder
- type SoftLayerVM
- func (vm SoftLayerVM) AttachDisk(disk bslcdisk.Disk) error
- func (vm SoftLayerVM) ConfigureNetworks(networks Networks) error
- func (vm SoftLayerVM) Delete() error
- func (vm SoftLayerVM) DetachDisk(disk bslcdisk.Disk) error
- func (vm SoftLayerVM) ID() int
- func (vm SoftLayerVM) Reboot() error
- func (vm SoftLayerVM) SetMetadata(vmMetadata VMMetadata) error
- type VM
- type VMCloudProperties
- type VMMetadata
- type VMSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentEnv ¶
type AgentEnv struct { AgentID string `json:"agent_id"` VM VMSpec `json:"vm"` Mbus string `json:"mbus"` NTP []string `json:"ntp"` Blobstore BlobstoreSpec `json:"blobstore"` Networks NetworksSpec `json:"networks"` Disks DisksSpec `json:"disks"` Env EnvSpec `json:"env"` }
func NewAgentEnvForVM ¶
func NewAgentEnvForVM(agentID, vmCID string, networks Networks, env Environment, agentOptions AgentOptions) AgentEnv
func NewAgentEnvFromJSON ¶
func (AgentEnv) AttachPersistentDisk ¶
func (AgentEnv) DetachPersistentDisk ¶
type AgentEnvService ¶
type AgentEnvServiceFactory ¶
type AgentEnvServiceFactory interface {
New() AgentEnvService
}
type AgentOptions ¶
type AgentOptions struct { // e.g. "https://user:password@127.0.0.1:4321/agent" Mbus string // e.g. ["0.us.pool.ntp.org"]. Ok to be empty NTP []string Blobstore BlobstoreOptions }
func (AgentOptions) Validate ¶
func (o AgentOptions) Validate() error
type BlobstoreOptions ¶
func (BlobstoreOptions) Validate ¶
func (o BlobstoreOptions) Validate() error
type BlobstoreSpec ¶
type Creator ¶
type Creator interface { // Create takes an agent id and creates a VM with provided configuration Create(string, bslcstem.Stemcell, VMCloudProperties, Networks, Environment) (VM, error) }
type DisksSpec ¶
type DisksSpec struct {
Persistent PersistentSpec `json:"persistent"`
}
type Environment ¶
type Environment map[string]interface{}
type GuestBindMounts ¶
type HostBindMounts ¶
type Network ¶
type NetworkSpec ¶
type NetworksSpec ¶
type NetworksSpec map[string]NetworkSpec
type NotSupportedError ¶
type NotSupportedError struct{}
func (NotSupportedError) Error ¶
func (e NotSupportedError) Error() string
func (NotSupportedError) Type ¶
func (e NotSupportedError) Type() string
type PersistentSpec ¶
type SoftLayerAgentEnvService ¶
type SoftLayerAgentEnvService struct {
// contains filtered or unexported fields
}
func NewSoftLayerAgentEnvService ¶
func NewSoftLayerAgentEnvService( logger boshlog.Logger, ) SoftLayerAgentEnvService
func (SoftLayerAgentEnvService) Fetch ¶
func (s SoftLayerAgentEnvService) Fetch() (AgentEnv, error)
func (SoftLayerAgentEnvService) Update ¶
func (s SoftLayerAgentEnvService) Update(agentEnv AgentEnv) error
type SoftLayerAgentEnvServiceFactory ¶
type SoftLayerAgentEnvServiceFactory struct {
// contains filtered or unexported fields
}
func NewSoftLayerAgentEnvServiceFactory ¶
func NewSoftLayerAgentEnvServiceFactory(logger boshlog.Logger) SoftLayerAgentEnvServiceFactory
func (SoftLayerAgentEnvServiceFactory) New ¶
func (f SoftLayerAgentEnvServiceFactory) New() AgentEnvService
type SoftLayerCreator ¶
type SoftLayerCreator struct {
// contains filtered or unexported fields
}
func NewSoftLayerCreator ¶
func NewSoftLayerCreator(softLayerClient sl.Client, agentEnvServiceFactory AgentEnvServiceFactory, agentOptions AgentOptions, logger boshlog.Logger) SoftLayerCreator
func (SoftLayerCreator) Create ¶
func (c SoftLayerCreator) Create(agentID string, stemcell bslcstem.Stemcell, cloudProps VMCloudProperties, networks Networks, env Environment) (VM, error)
type SoftLayerFinder ¶
type SoftLayerFinder struct {
// contains filtered or unexported fields
}
func NewSoftLayerFinder ¶
func NewSoftLayerFinder(softLayerClient sl.Client, agentEnvServiceFactory AgentEnvServiceFactory, logger boshlog.Logger) SoftLayerFinder
type SoftLayerVM ¶
type SoftLayerVM struct {
// contains filtered or unexported fields
}
func NewSoftLayerVM ¶
func NewSoftLayerVM(id int, softLayerClient sl.Client, agentEnvService AgentEnvService, logger boshlog.Logger) SoftLayerVM
func (SoftLayerVM) AttachDisk ¶
func (vm SoftLayerVM) AttachDisk(disk bslcdisk.Disk) error
func (SoftLayerVM) ConfigureNetworks ¶
func (vm SoftLayerVM) ConfigureNetworks(networks Networks) error
func (SoftLayerVM) Delete ¶
func (vm SoftLayerVM) Delete() error
func (SoftLayerVM) DetachDisk ¶
func (vm SoftLayerVM) DetachDisk(disk bslcdisk.Disk) error
func (SoftLayerVM) ID ¶
func (vm SoftLayerVM) ID() int
func (SoftLayerVM) Reboot ¶
func (vm SoftLayerVM) Reboot() error
func (SoftLayerVM) SetMetadata ¶
func (vm SoftLayerVM) SetMetadata(vmMetadata VMMetadata) error
type VMCloudProperties ¶
type VMCloudProperties struct { Domain string `json:"domain,omitempty"` StartCpus int `json:"startCpus,omitempty"` MaxMemory int `json:"maxMemory,omitempty"` Datacenter sldatatypes.Datacenter BlockDeviceTemplateGroup sldatatypes.BlockDeviceTemplateGroup SshKeys []sldatatypes.SshKey `json:"sshKeys"` }
type VMMetadata ¶
type VMMetadata struct {
VMCloudProperties VMCloudProperties `json:"cloud_properties,omitempty"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.