Documentation ¶
Index ¶
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type Bandwidth
- type BandwidthOpts
- type Configuration
- type ConfigurationPage
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type Disk
- type DiskOpts
- type Eip
- type EipOpts
- type GetResult
- type InstanceConfig
- type InstanceConfigOpts
- type ListOpts
- type ListOptsBuilder
- type Personality
- type PersonalityOpts
- type PublicIp
- type PublicIpOpts
- type SecurityGroup
- type SecurityGroupOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
List is method that can be able to list all configurations of autoscaling service
Types ¶
type BandwidthOpts ¶
type Configuration ¶
type Configuration struct { ID string `json:"scaling_configuration_id"` Tenant string `json:"tenant"` Name string `json:"scaling_configuration_name"` InstanceConfig InstanceConfig `json:"instance_config"` CreateTime string `json:"create_time"` }
func ExtractConfigurations ¶ added in v0.2.7
func ExtractConfigurations(r pagination.Page) ([]Configuration, error)
ExtractConfigurations returns a slice of AS Configurations contained in a single page of results.
type ConfigurationPage ¶
type ConfigurationPage struct {
pagination.SinglePageBase
}
func (ConfigurationPage) Extract ¶
func (r ConfigurationPage) Extract() ([]Configuration, error)
func (ConfigurationPage) IsEmpty ¶
func (r ConfigurationPage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult contains no Volumes.
type CreateOpts ¶
type CreateOpts struct { Name string `json:"scaling_configuration_name" required:"true"` InstanceConfig InstanceConfigOpts `json:"instance_config" required:"true"` }
func (CreateOpts) ToConfigurationCreateMap ¶
func (opts CreateOpts) ToConfigurationCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
CreateResult is a struct that contains all the return parameters of creation
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create is a method by which can be able to access to create a configuration of autoscaling
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (string, error)
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
type Disk ¶
type Disk struct { Size int `json:"size"` VolumeType string `json:"volume_type"` DiskType string `json:"disk_type"` DedicatedStorageID string `json:"dedicated_storage_id"` DataDiskImageID string `json:"data_disk_image_id"` SnapshotID string `json:"snapshot_id"` Metadata map[string]interface{} `json:"metadata"` }
type DiskOpts ¶
type DiskOpts struct { Size int `json:"size" required:"true"` VolumeType string `json:"volume_type" required:"true"` DiskType string `json:"disk_type" required:"true"` DedicatedStorageID string `json:"dedicated_storage_id,omitempty"` DataDiskImageID string `json:"data_disk_image_id,omitempty"` SnapshotID string `json:"snapshot_id,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` }
DiskOpts is an inner struct of InstanceConfigOpts
type EipOpts ¶
type EipOpts struct { IpType string `json:"ip_type" required:"true"` Bandwidth BandwidthOpts `json:"bandwidth" required:"true"` }
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
func Get ¶
Get is a method by which can be able to access to get a configuration of autoscaling detailed information
func (GetResult) Extract ¶
func (r GetResult) Extract() (Configuration, error)
type InstanceConfig ¶
type InstanceConfig struct { FlavorRef string `json:"flavorRef"` ImageRef string `json:"imageRef"` Disk []Disk `json:"disk"` SSHKey string `json:"key_name"` KeyFingerprint string `json:"key_fingerprint"` InstanceName string `json:"instance_name"` InstanceID string `json:"instance_id"` AdminPass string `json:"adminPass"` Personality []Personality `json:"personality"` PublicIp PublicIp `json:"public_ip"` UserData string `json:"user_data"` Metadata map[string]interface{} `json:"metadata"` SecurityGroups []SecurityGroup `json:"security_groups"` ServerGroupID string `json:"server_group_id"` Tenancy string `json:"tenancy"` DedicatedHostID string `json:"dedicated_host_id"` MarketType string `json:"market_type"` MultiFlavorPriorityPolicy string `json:"multi_flavor_priority_policy"` }
type InstanceConfigOpts ¶
type InstanceConfigOpts struct { ID string `json:"instance_id,omitempty"` FlavorRef string `json:"flavorRef,omitempty"` ImageRef string `json:"imageRef,omitempty"` Disk []DiskOpts `json:"disk,omitempty"` SSHKey string `json:"key_name" required:"true"` Personality []PersonalityOpts `json:"personality,omitempty"` PubicIp *PublicIpOpts `json:"public_ip,omitempty"` // UserData contains configuration information or scripts to use upon launch. // Create will base64-encode it for you, if it isn't already. UserData []byte `json:"-"` Metadata map[string]interface{} `json:"metadata,omitempty"` SecurityGroups []SecurityGroupOpts `json:"security_groups,omitempty"` MarketType string `json:"market_type,omitempty"` }
InstanceConfigOpts is an inner struct of CreateOpts
type ListOpts ¶
type ListOpts struct { Name string `q:"scaling_configuration_name"` ImageID string `q:"image_id"` StartNumber int `q:"start_number"` Limit int `q:"limit"` }
func (ListOpts) ToConfigurationListQuery ¶
type ListOptsBuilder ¶
type Personality ¶
type PersonalityOpts ¶
type PublicIpOpts ¶
type PublicIpOpts struct {
Eip EipOpts `json:"eip" required:"true"`
}
type SecurityGroup ¶ added in v0.2.7
type SecurityGroup struct {
ID string `json:"id"`
}
type SecurityGroupOpts ¶ added in v0.2.7
type SecurityGroupOpts struct {
ID string `json:"id" required:"true"`
}
Click to show internal directories.
Click to hide internal directories.