Documentation ¶
Index ¶
- Constants
- type Artifact
- type BlockDevice
- type BlockDeviceTemplateGroup
- type Builder
- type Config
- type Datacenter
- type DiskImage
- type InstanceImage
- type InstanceReq
- type InstanceType
- type NetworkComponent
- type SoftLayerRequest
- type SoftlayerClient
- func (self SoftlayerClient) CreateInstance(instance InstanceType) (map[string]interface{}, error)
- func (self SoftlayerClient) DestroyInstance(instanceId string) error
- func (self SoftlayerClient) DestroySshKey(keyId int64) error
- func (self SoftlayerClient) New(user string, key string) *SoftlayerClient
- func (self SoftlayerClient) UploadSshKey(label string, publicKey string) (keyId int64, err error)
- type SshKey
Constants ¶
View Source
const BuilderId = "packer.softlayer"
The unique ID for this builder.
View Source
const IMAGE_TYPE_FLEX = "flex"
Image Types
View Source
const IMAGE_TYPE_STANDARD = "standard"
View Source
const SOFTLAYER_API_URL = "api.softlayer.com/rest/v3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
Artifact represents a Softlayer image as the result of a Packer build.
type BlockDevice ¶
type BlockDeviceTemplateGroup ¶
type BlockDeviceTemplateGroup struct {
Id string `json:"globalIdentifier"`
}
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder represents a Packer Builder.
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` Comm communicator.Config `mapstructure:",squash"` Username string `mapstructure:"username"` APIKey string `mapstructure:"api_key"` DatacenterName string `mapstructure:"datacenter_name"` ImageName string `mapstructure:"image_name"` ImageDescription string `mapstructure:"image_description"` ImageType string `mapstructure:"image_type"` BaseImageId string `mapstructure:"base_image_id"` BaseOsCode string `mapstructure:"base_os_code"` InstanceName string `mapstructure:"instance_name"` InstanceDomain string `mapstructure:"instance_domain"` InstanceCpu int `mapstructure:"instance_cpu"` InstanceMemory int64 `mapstructure:"instance_memory"` InstanceNetworkSpeed int `mapstructure:"instance_network_speed"` InstanceDisksCapacity []int `mapstructure:"instance_disks_capacity"` RawStateTimeout string `mapstructure:"instance_state_timeout"` StateTimeout time.Duration // contains filtered or unexported fields }
type Datacenter ¶
type Datacenter struct {
Name string `json:"name"`
}
type InstanceImage ¶
type InstanceReq ¶
type InstanceReq struct { HostName string `json:"hostname"` Domain string `json:"domain"` Datacenter *Datacenter `json:"datacenter"` Cpus int `json:"startCpus"` Memory int64 `json:"maxMemory"` HourlyBillingFlag bool `json:"hourlyBillingFlag"` LocalDiskFlag bool `json:"localDiskFlag"` NetworkComponents []*NetworkComponent `json:"networkComponents"` BlockDeviceTemplateGroup *BlockDeviceTemplateGroup `json:"blockDeviceTemplateGroup,omitempty"` BlockDevices []*BlockDevice `json:"blockDevices,omitempty"` OsReferenceCode string `json:"operatingSystemReferenceCode,omitempty"` SshKeys []*SshKey `json:"sshKeys,omitempty"` }
type InstanceType ¶
type InstanceType struct { HostName string `json:"hostname"` Domain string Datacenter string Cpus int Memory int64 HourlyBillingFlag bool LocalDiskFlag bool DisksCapacity []int NetworkSpeed int ProvisioningSshKeyId int64 BaseImageId string BaseOsCode string }
Based on: http://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Virtual_Guest_Configuration/
type NetworkComponent ¶
type NetworkComponent struct {
MaxSpeed int `json:"maxSpeed"`
}
type SoftLayerRequest ¶
type SoftLayerRequest struct {
Parameters interface{} `json:"parameters"`
}
type SoftlayerClient ¶
type SoftlayerClient struct {
// contains filtered or unexported fields
}
func (SoftlayerClient) CreateInstance ¶
func (self SoftlayerClient) CreateInstance(instance InstanceType) (map[string]interface{}, error)
func (SoftlayerClient) DestroyInstance ¶
func (self SoftlayerClient) DestroyInstance(instanceId string) error
func (SoftlayerClient) DestroySshKey ¶
func (self SoftlayerClient) DestroySshKey(keyId int64) error
func (SoftlayerClient) New ¶
func (self SoftlayerClient) New(user string, key string) *SoftlayerClient
func (SoftlayerClient) UploadSshKey ¶
func (self SoftlayerClient) UploadSshKey(label string, publicKey string) (keyId int64, err error)
Click to show internal directories.
Click to hide internal directories.