Documentation
¶
Index ¶
- Constants
- func GetCloudSSHPrivateKey(session *mcclient.ClientSession) (string, error)
- func GetImage(session *mcclient.ClientSession, name string) (jsonutils.JSONObject, error)
- func GetKubernetesImage(session *mcclient.ClientSession) (string, error)
- func GetPublicCloudImage(s *mcclient.ClientSession, input map[string]interface{}) (*jsonutils.JSONDict, error)
- func IsNotFound(err error) bool
- func IsNotFoundError(err error) bool
- func ListImages(s *mcclient.ClientSession, query *jsonutils.JSONDict) (*printutils.ListResult, error)
- func ReasonForError(err error) int
- type CloudKubeClusterHelper
- type CloudproviderHelper
- type CloudregionHelper
- type EIPHelper
- type IClient
- type KubeClusterDetails
- type NetworkHelper
- type ResourceHelper
- func (h *ResourceHelper) GetDetails(id string, output interface{}) error
- func (h *ResourceHelper) ObjectIsExists(id string) (jsonutils.JSONObject, error)
- func (h *ResourceHelper) WaitObjectCondition(id string, doneF func(obj jsonutils.JSONObject) (bool, error)) error
- func (h *ResourceHelper) WaitObjectDelete(id string, continueWait func(status string) bool) error
- func (h *ResourceHelper) WaitObjectStatus(id string, expectStatus string, continueWait func(status string) bool) error
- type ServerEIP
- type ServerHelper
- func (h *ServerHelper) AttachNetworkAddress(id string, ip string) error
- func (h *ServerHelper) CreateEIP(srv *api.ServerDetails) (*ServerEIP, error)
- func (h *ServerHelper) GetDetails(id string) (*api.ServerDetails, error)
- func (h *ServerHelper) GetEIP(id string) (string, error)
- func (h *ServerHelper) GetLoginInfo(id string) (*ServerLoginInfo, error)
- func (h *ServerHelper) GetPrivateIP(id string) (string, error)
- func (h *ServerHelper) GetSSHLoginInfo(id string) (*ServerSSHLoginInfo, error)
- func (h *ServerHelper) ListNetworkAddress(id string) ([]*api.NetworkAddressDetails, error)
- func (h *ServerHelper) ListServerNetworks(id string) ([]*api.SGuestnetwork, error)
- func (h *ServerHelper) Servers() *modules.ServerManager
- func (h *ServerHelper) WaitDelete(id string) error
- func (h *ServerHelper) WaitRunning(id string) error
- type ServerLoginInfo
- type ServerSSHLoginInfo
- type SkuHelper
- type VpcHelper
- type ZoneHelper
Constants ¶
View Source
const (
NotFoundMsg = "NotFoundError"
)
Variables ¶
This section is empty.
Functions ¶
func GetCloudSSHPrivateKey ¶
func GetCloudSSHPrivateKey(session *mcclient.ClientSession) (string, error)
func GetImage ¶
func GetImage(session *mcclient.ClientSession, name string) (jsonutils.JSONObject, error)
func GetKubernetesImage ¶
func GetKubernetesImage(session *mcclient.ClientSession) (string, error)
func GetPublicCloudImage ¶
func IsNotFound ¶
func IsNotFoundError ¶
func ListImages ¶
func ListImages(s *mcclient.ClientSession, query *jsonutils.JSONDict) (*printutils.ListResult, error)
func ReasonForError ¶
Types ¶
type CloudKubeClusterHelper ¶
type CloudKubeClusterHelper struct {
*ResourceHelper
}
func NewCloudKubeClusterHelper ¶
func NewCloudKubeClusterHelper(s *mcclient.ClientSession) *CloudKubeClusterHelper
func (*CloudKubeClusterHelper) GetDetails ¶
func (h *CloudKubeClusterHelper) GetDetails(id string) (*KubeClusterDetails, error)
func (*CloudKubeClusterHelper) KubeClusters ¶
func (h *CloudKubeClusterHelper) KubeClusters() modulebase.Manager
type CloudproviderHelper ¶
type CloudproviderHelper struct {
*ResourceHelper
}
func NewCloudproviderHelper ¶
func NewCloudproviderHelper(s *mcclient.ClientSession) *CloudproviderHelper
func (*CloudproviderHelper) Cloudproviders ¶
func (h *CloudproviderHelper) Cloudproviders() modulebase.Manager
func (*CloudproviderHelper) GetCliRC ¶
func (h *CloudproviderHelper) GetCliRC(id string) (*jsonutils.JSONDict, error)
func (*CloudproviderHelper) GetDetails ¶
func (h *CloudproviderHelper) GetDetails(id string) (*api.CloudproviderDetails, error)
type CloudregionHelper ¶
type CloudregionHelper struct {
*ResourceHelper
}
func NewCloudregionHelper ¶
func NewCloudregionHelper(s *mcclient.ClientSession) *CloudregionHelper
func (*CloudregionHelper) Cloudregions ¶
func (h *CloudregionHelper) Cloudregions() modulebase.Manager
func (*CloudregionHelper) GetDetails ¶
func (h *CloudregionHelper) GetDetails(id string) (*api.CloudregionDetails, error)
type EIPHelper ¶
type EIPHelper struct {
*ResourceHelper
}
func NewEIPHelper ¶
func NewEIPHelper(s *mcclient.ClientSession) *EIPHelper
type IClient ¶
type IClient interface { Cloudregions() *CloudregionHelper Vpcs() *VpcHelper Zones() *ZoneHelper Networks() *NetworkHelper Servers() *ServerHelper Skus() *SkuHelper CloudKubeClusters() *CloudKubeClusterHelper GetCloudSSHPrivateKey() (string, error) }
func NewClientSets ¶
func NewClientSets(s *mcclient.ClientSession) IClient
type KubeClusterDetails ¶
type KubeClusterDetails struct { api.KubeClusterDetails Id string `json:"id"` ManagerId string `json:"manager_id"` ExternalId string `json:"external_id"` }
type NetworkHelper ¶
type NetworkHelper struct {
*ResourceHelper
}
func NewNetworkHelper ¶
func NewNetworkHelper(s *mcclient.ClientSession) *NetworkHelper
func (*NetworkHelper) GetDetails ¶
func (h *NetworkHelper) GetDetails(id string) (*api.NetworkDetails, error)
func (*NetworkHelper) Networks ¶
func (h *NetworkHelper) Networks() modulebase.Manager
type ResourceHelper ¶
type ResourceHelper struct { modulebase.Manager // contains filtered or unexported fields }
func NewResourceHelper ¶
func NewResourceHelper(s *mcclient.ClientSession, manager modulebase.Manager) *ResourceHelper
func (*ResourceHelper) GetDetails ¶
func (h *ResourceHelper) GetDetails(id string, output interface{}) error
func (*ResourceHelper) ObjectIsExists ¶
func (h *ResourceHelper) ObjectIsExists(id string) (jsonutils.JSONObject, error)
func (*ResourceHelper) WaitObjectCondition ¶
func (h *ResourceHelper) WaitObjectCondition( id string, doneF func(obj jsonutils.JSONObject) (bool, error), ) error
func (*ResourceHelper) WaitObjectDelete ¶
func (h *ResourceHelper) WaitObjectDelete(id string, continueWait func(status string) bool) error
func (*ResourceHelper) WaitObjectStatus ¶
type ServerHelper ¶
type ServerHelper struct {
*ResourceHelper
}
func NewServerHelper ¶
func NewServerHelper(s *mcclient.ClientSession) *ServerHelper
func (*ServerHelper) AttachNetworkAddress ¶
func (h *ServerHelper) AttachNetworkAddress(id string, ip string) error
func (*ServerHelper) CreateEIP ¶
func (h *ServerHelper) CreateEIP(srv *api.ServerDetails) (*ServerEIP, error)
func (*ServerHelper) GetDetails ¶
func (h *ServerHelper) GetDetails(id string) (*api.ServerDetails, error)
func (*ServerHelper) GetLoginInfo ¶
func (h *ServerHelper) GetLoginInfo(id string) (*ServerLoginInfo, error)
func (*ServerHelper) GetPrivateIP ¶
func (h *ServerHelper) GetPrivateIP(id string) (string, error)
func (*ServerHelper) GetSSHLoginInfo ¶
func (h *ServerHelper) GetSSHLoginInfo(id string) (*ServerSSHLoginInfo, error)
func (*ServerHelper) ListNetworkAddress ¶
func (h *ServerHelper) ListNetworkAddress(id string) ([]*api.NetworkAddressDetails, error)
func (*ServerHelper) ListServerNetworks ¶
func (h *ServerHelper) ListServerNetworks(id string) ([]*api.SGuestnetwork, error)
func (*ServerHelper) Servers ¶
func (h *ServerHelper) Servers() *modules.ServerManager
func (*ServerHelper) WaitDelete ¶
func (h *ServerHelper) WaitDelete(id string) error
func (*ServerHelper) WaitRunning ¶
func (h *ServerHelper) WaitRunning(id string) error
type ServerLoginInfo ¶
type ServerSSHLoginInfo ¶
type ServerSSHLoginInfo struct { *ServerLoginInfo Hostname string EIP string PrivateIP string PrivateKey string ExternalId string Cloudregion string CloudregionExternalId string }
func (ServerSSHLoginInfo) GetAccessIP ¶
func (info ServerSSHLoginInfo) GetAccessIP() string
type SkuHelper ¶
type SkuHelper struct {
*ResourceHelper
}
func NewSkuHelper ¶
func NewSkuHelper(s *mcclient.ClientSession) *SkuHelper
func (*SkuHelper) GetDetails ¶
func (*SkuHelper) Skus ¶
func (h *SkuHelper) Skus() *modules.ServerSkusManager
type VpcHelper ¶
type VpcHelper struct {
*ResourceHelper
}
func NewVpcHelper ¶
func NewVpcHelper(s *mcclient.ClientSession) *VpcHelper
func (*VpcHelper) GetDetails ¶
func (h *VpcHelper) GetDetails(id string) (*api.VpcDetails, error)
func (*VpcHelper) Vpcs ¶
func (h *VpcHelper) Vpcs() modulebase.Manager
type ZoneHelper ¶
type ZoneHelper struct {
*ResourceHelper
}
func NewZoneHelper ¶
func NewZoneHelper(s *mcclient.ClientSession) *ZoneHelper
func (*ZoneHelper) GetDetails ¶
func (h *ZoneHelper) GetDetails(id string) (*api.ZoneDetails, error)
func (*ZoneHelper) Zones ¶
func (h *ZoneHelper) Zones() modulebase.Manager
Click to show internal directories.
Click to hide internal directories.