Пример #1
0
func (s *Server) Shutdown(uuid string) ([]byte, error) {
	cs := cloudsigma.NewServers()
	args := cs.NewShutdown(uuid)
	args, err := cloud.setArgs(args)
	if err != nil {
		return nil, err
	}
	return cloud.sendRequest(args)
}
Пример #2
0
func (s *Servers) List() ([]byte, error) {
	cs := cloudsigma.NewServers()
	args := cs.NewList()
	args, err := cloud.setArgs(args)
	if err != nil {
		return nil, err
	}
	return cloud.sendRequest(args)
}
Пример #3
0
func (s *Server) Create(name string, cpu int, memory int, vncPassword string) ([]byte, error) {
	o := cloudsigma.ServerRequest{Name: name, Cpu: cpu, Memory: memory, VncPassword: vncPassword}
	l := []cloudsigma.ServerRequest{o}
	cs := cloudsigma.NewServers()
	args := cs.NewCreate(l)
	args, err := cloud.setArgs(args)
	if err != nil {
		return nil, err
	}
	return cloud.sendRequest(args)
}