server

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.SecurityGroupRules
	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" required:"true"`
	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  int            `json:"description" required:"false"`
	Protection   int            `json:"protection" required:"false"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL