Documentation ¶
Index ¶
- Constants
- Variables
- type AliProvider
- func (a *AliProvider) Create(r Request) (*Response, error)
- func (a *AliProvider) CreateNetwork(r Request) (*Response, error)
- func (a *AliProvider) Delete(...string) error
- func (a *AliProvider) InstanceInfo(id string) (*VM, error)
- func (a *AliProvider) List(r Request) (*Response, error)
- func (a *AliProvider) QueryFlavor(flavor string, zone string, charge string, strategy string) string
- func (a *AliProvider) VPC(r Request) (string, error)
- type Config
- type Disk
- type Flavor
- type Interface
- type Region
- type Request
- type Response
- type TencentProvider
- type VM
Constants ¶
View Source
const ( ALI = "ali" TENCENT = "tencent" )
Variables ¶
View Source
var ( CloudConfig Config CloudRequest Request )
Functions ¶
This section is empty.
Types ¶
type AliProvider ¶
type AliProvider struct { Config // contains filtered or unexported fields }
func (*AliProvider) CreateNetwork ¶ added in v0.0.4
func (a *AliProvider) CreateNetwork(r Request) (*Response, error)
func (*AliProvider) Delete ¶
func (a *AliProvider) Delete(...string) error
func (*AliProvider) InstanceInfo ¶
func (a *AliProvider) InstanceInfo(id string) (*VM, error)
func (*AliProvider) QueryFlavor ¶ added in v0.0.4
type Interface ¶
type Interface interface { CreateNetwork(request Request) (*Response, error) Create(request Request) (*Response, error) Delete(...string) error QueryFlavor(flavor string, zone string, charge string, strategy string) string }
func NewProvider ¶
type Region ¶ added in v0.0.4
Region return real vm type on some region zone
input: cn-hangzhou cn-hangzhou-b 2C4G output: ecs.c6.large m-j6c7cmqwpqwn8onaey27
type Request ¶
type Request struct { //VM numbers Num int Image string Flavor string NamePrefix string Passwd string KeyPair string FIP bool Disks []Disk ZoneID string VPCID string // if not exist, create it SwitchID string // if not exist, create it SecuretyGroupID string // if not exist, create it ExternalArgs map[string]string }
Request is the create vm request
type TencentProvider ¶
type TencentProvider struct {
Config
}
func (*TencentProvider) Create ¶
func (t *TencentProvider) Create(request Request) (*Response, error)
func (*TencentProvider) CreateNetwork ¶ added in v0.0.4
func (t *TencentProvider) CreateNetwork(request Request) (*Response, error)
func (*TencentProvider) Delete ¶
func (t *TencentProvider) Delete(...string) error
func (*TencentProvider) QueryFlavor ¶ added in v0.0.4
func (t *TencentProvider) QueryFlavor(flavor, zone, charge, strategy string) string
Click to show internal directories.
Click to hide internal directories.