Exemplo n.º 1
0
func (s *Drive) Delete(uuid string) ([]byte, error) {
	cs := cloudsigma.NewDrives()
	args := cs.NewDelete(uuid)
	args, err := cloud.setArgs(args)
	if err != nil {
		return nil, err
	}
	return cloud.sendRequest(args)
}
Exemplo n.º 2
0
func (d *Drives) List() ([]byte, error) {
	cs := cloudsigma.NewDrives()
	args := cs.NewList()
	args, err := cloud.setArgs(args)
	if err != nil {
		return nil, err
	}
	return cloud.sendRequest(args)
}
Exemplo n.º 3
0
func (s *Drive) Create(name string, size int, media string) ([]byte, error) {
	o := cloudsigma.DriveRequest{Media: media, Name: name, Size: size}
	l := []cloudsigma.DriveRequest{o}
	cs := cloudsigma.NewDrives()
	args := cs.NewCreate(l)
	args, err := cloud.setArgs(args)
	if err != nil {
		return nil, err
	}
	return cloud.sendRequest(args)
}