Documentation ¶
Overview ¶
*Copyright 2015 Huawei Technologies Co., Ltd. All rights reserved. * eSDK is licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*Copyright 2015 Huawei Technologies Co., Ltd. All rights reserved. * eSDK is licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- type Bandwidth
- type CreateCloudServer
- func (createCloudServer *CreateCloudServer) Init(imageRef, flavorRef, name, vpcid string, nics []Nics, root_volume RootVolume, ...)
- func (createCloudServer *CreateCloudServer) SetAdminPass(adminPass string)
- func (createCloudServer *CreateCloudServer) SetCount(count int)
- func (createCloudServer *CreateCloudServer) SetData_volumes(data_volumes []DataVolume)
- func (createCloudServer *CreateCloudServer) SetExtendparam(extendparam Extendparam)
- func (createCloudServer *CreateCloudServer) SetKey_name(key_name string)
- func (createCloudServer *CreateCloudServer) SetPersonality(personality []Personality)
- func (createCloudServer *CreateCloudServer) SetSecurity_groups(security_groups []SecurityGroup)
- func (createCloudServer *CreateCloudServer) SetUser_data(user_data string)
- type CreateCloudServerReq
- type CreateCloudServerResp
- type DataVolume
- type DeleteCloudServerReq
- type DeleteCloudServerResp
- type Eip
- type Entities
- type Extendparam
- type FlavorListDetail
- type JobEntities
- type Links
- type ListCloudServerFlavorsExtResp
- type Nics
- type OsExtraSpecs
- type Personality
- type Publicip
- type RootVolume
- type SecGrp
- type SecurityGroup
- type ServerId
- type ShowEcsJobResp
- type SubJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCloudServer ¶
type CreateCloudServer struct {
modules.BaseDataStruct
}
Struct CreateCloudServer
func (*CreateCloudServer) Init ¶
func (createCloudServer *CreateCloudServer) Init(imageRef, flavorRef, name, vpcid string, nics []Nics, root_volume RootVolume, availability_zone string)
func (createCloudServer *CreateCloudServer) Init(imageRef, flavorRef, name, vpcid string, nics []Nics, root_volume RootVolume, adminpwd, key_name, availability_zone string, sgs []SecGrp) {
func (*CreateCloudServer) SetAdminPass ¶
func (createCloudServer *CreateCloudServer) SetAdminPass(adminPass string)
func (*CreateCloudServer) SetCount ¶
func (createCloudServer *CreateCloudServer) SetCount(count int)
func (*CreateCloudServer) SetData_volumes ¶
func (createCloudServer *CreateCloudServer) SetData_volumes(data_volumes []DataVolume)
func (*CreateCloudServer) SetExtendparam ¶
func (createCloudServer *CreateCloudServer) SetExtendparam(extendparam Extendparam)
func (*CreateCloudServer) SetKey_name ¶
func (createCloudServer *CreateCloudServer) SetKey_name(key_name string)
func (*CreateCloudServer) SetPersonality ¶
func (createCloudServer *CreateCloudServer) SetPersonality(personality []Personality)
func (*CreateCloudServer) SetSecurity_groups ¶
func (createCloudServer *CreateCloudServer) SetSecurity_groups(security_groups []SecurityGroup)
func (*CreateCloudServer) SetUser_data ¶
func (createCloudServer *CreateCloudServer) SetUser_data(user_data string)
type CreateCloudServerReq ¶
type CreateCloudServerReq struct {
modules.BaseDataStruct
}
Struct CreateCloudServerReq
func (*CreateCloudServerReq) Init ¶
func (createCloudServerReq *CreateCloudServerReq) Init(createCloudServer CreateCloudServer)
type CreateCloudServerResp ¶
type CreateCloudServerResp struct { ResponseCode int modules.ErrorInfo Job_id string `json:"job_id"` }
The response of createCloudServer
type DataVolume ¶
type DataVolume struct {
modules.BaseDataStruct
}
Struct DataVolume
func (*DataVolume) Init ¶
func (dataVolume *DataVolume) Init(volumetype string, size int)
type DeleteCloudServerReq ¶
type DeleteCloudServerReq struct {
modules.BaseDataStruct
}
Struct DeleteCloudServerReq
func (*DeleteCloudServerReq) Init ¶
func (deleteCloudServerReq *DeleteCloudServerReq) Init(servers []ServerId, delete_publicip, delete_volume bool)
type DeleteCloudServerResp ¶
type DeleteCloudServerResp struct { ResponseCode int modules.ErrorInfo Job_id string `json:"job_id"` }
The response of deleteCloudServer
type Entities ¶
type Entities struct { Sub_jobs_total int `json:"sub_jobs_total"` Server_id string `json:"server_id"` SubJobs []SubJob `json:"sub_jobs"` }
Entities of showEcsJobResp
type Extendparam ¶
type Extendparam struct {
modules.BaseDataStruct
}
Struct Extendparam
func (*Extendparam) Init ¶
func (extendparam *Extendparam) Init()
func (*Extendparam) SetRegionID ¶
func (extendparam *Extendparam) SetRegionID(regionID string)
type FlavorListDetail ¶
type FlavorListDetail struct { Id string `json:"id"` Name string `json:"name"` Vcpus string `json:"vcpus"` Ram int `json:"ram"` Disk string `json:"disk"` Swap string `json:"swap"` Ephemeral int `json:"OS-FLV-EXT-DATA:ephemeral"` Disabled bool `json:"OS-FLV-DISABLED:disabled"` Rxtx_factor float32 `json:"rxtx_factor"` Rxtx_quota string `json:"rxtx_quota"` Rxtx_cap string `json:"rxtx_cap"` Is_public bool `json:"os-flavor-access:is_public"` Links []Links `json:"links"` Os_extra_specs OsExtraSpecs `json:"os_extra_specs"` }
FlavorListDetail of ListCloudServerFlavorsExtResp
type JobEntities ¶
JobEntities of SubJob
type ListCloudServerFlavorsExtResp ¶
type ListCloudServerFlavorsExtResp struct { ResponseCode int modules.ErrorInfo Flavors []FlavorListDetail `json:"flavors"` }
The response of listCloudServerFlavorsExt
type OsExtraSpecs ¶
type OsExtraSpecs struct { Performancetype string `json:"ecs:performancetype"` // contains filtered or unexported fields }
OsExtraSpecs of FlavorListDetail
type Personality ¶
type Personality struct {
modules.BaseDataStruct
}
Struct Personality
func (*Personality) Init ¶
func (personality *Personality) Init(path, contexts string)
type RootVolume ¶
type RootVolume struct {
modules.BaseDataStruct
}
Struct RootVolume
func (*RootVolume) Init ¶
func (root_volume *RootVolume) Init(volumetype string)
func (*RootVolume) SetSize ¶
func (root_volume *RootVolume) SetSize(size int)
type SecGrp ¶
type SecGrp struct {
modules.BaseDataStruct
}
type SecurityGroup ¶
type SecurityGroup struct {
modules.BaseDataStruct
}
Struct SecurityGroup
func (*SecurityGroup) Init ¶
func (securityGroup *SecurityGroup) Init()
func (*SecurityGroup) SetId ¶
func (securityGroup *SecurityGroup) SetId(id string)
type ShowEcsJobResp ¶
type ShowEcsJobResp struct { ResponseCode int modules.ErrorInfo Job_id string `json:"job_id"` Status string `json:"status"` Entities Entities `json:"entities"` Job_type string `json:"job_type"` Begin_time string `json:"begin_time"` End_time string `json:"end_time"` Error_code string `json:"error_code"` Fail_reason string `json:"fail_reason"` }
The response of showEcsJob
type SubJob ¶
type SubJob struct { Status string `json:"status"` Entities JobEntities `json:"entities"` Job_id string `json:"job_id"` Job_type string `json:"job_type"` Begin_time string `json:"begin_time"` End_time string `json:"end_time"` Error_code string `json:"error_code"` Fail_reason string `json:"fail_reason"` }
SubJob of Entities