Documentation ¶
Index ¶
- func AttachVolume(restClient *client.RestClient, serverId string, ...) error
- func DetachVolume(restClient *client.RestClient, serverId string, volumeId string, ...) error
- func GetRawVmVolumes(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) (*[]disk.DiskInfo, error)
- func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]ServerInfo, error)
- func Reboot(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
- func Resume(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
- func Suspend(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
- func Terminate(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
- type SecGroupInfo
- type ServerInfo
- type VMReqInfo
- type VmTagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachVolume ¶ added in v0.6.9
func AttachVolume(restClient *client.RestClient, serverId string, requestOpts *client.RequestOpts) error
func DetachVolume ¶ added in v0.6.9
func DetachVolume(restClient *client.RestClient, serverId string, volumeId string, requestOpts *client.RequestOpts) error
func GetRawVmVolumes ¶ added in v0.6.9
func GetRawVmVolumes(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) (*[]disk.DiskInfo, error)
get VM attached Volumes
func List ¶
func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]ServerInfo, error)
func Reboot ¶
func Reboot(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
reboot
func Resume ¶
func Resume(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
start
func Suspend ¶
func Suspend(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
shutdown
func Terminate ¶
func Terminate(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error
delete
Types ¶
type SecGroupInfo ¶
type SecGroupInfo struct {
Id string `json:"id" required:"true"`
}
type ServerInfo ¶
type ServerInfo struct { VolumeInfoList interface{} VmNicInfoList interface{} NicMapInfo []struct { Name string Count int Address string `json:"addr"` } PoolMapInfo []struct { Name string Count int PoolID string `json:"pool_id"` FileSystem string } AdaptiveIpMapInfo []struct { IP string Count int PrivateIP string `json:"private_ip"` } ID string TenantID string CpuNum float32 MemSize float32 VncPort int RepeaterPort int State string NodeIp string NodeHostName string Name string Protection int CreatedAt string IsoId string IsoPath string Iso string Template string TemplateID string OsType string RootPassword string HostName string Creator string VolumeId string VolumeSize int VolumeMode string MacAddr string Spec string SpecId string Pool string PoolId string Cycle int Metric int MigrationPort int MigrationIp string Cloudinit bool DeleteVolume bool ServerCount int PrivateIp string AdaptiveIp string InitCloud int ClusterId string ClusterName string NicType string Secgroups []securitygroup.SecurityGroupInfo Ip string SubnetAddr string DeviceId string Gpu string GpuCount int GpuId string Description string DiskSize int DiskCount int IsoInsertedAt string Puppet int SshKeyName string SshPublicKey string TemplateOwnership string TemplateType string VmStatInfo string }
func Get ¶
func Get(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) (*ServerInfo, error)
func Start ¶
func Start(restClient *client.RestClient, requestOpts *client.RequestOpts) (*ServerInfo, error)
create
type VMReqInfo ¶
type VMReqInfo struct { TemplateId string `json:"templateId,omitempty"` SnapshotId string `json:"snapshotId,omitempty"` SpecId string `json:"specId" required:"true"` Name string `json:"name" required:"true"` HostName string `json:"hostName" required:"true"` RootPassword string `json:"rootPassword" required:"true"` SubnetAddr string `json:"subnetAddr" required:"true"` Secgroups []SecGroupInfo `json:"secgroups" required:"true"` Description string `json:"description" required:"false"` Protection int `json:"protection" required:"false"` ClusterId string `json:"clusterId,omitempty"` }
Click to show internal directories.
Click to hide internal directories.