Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
feat(endpoints): add show volumes call

See merge request enix/dothill-api-go!13
  • Loading branch information
arcln committed Mar 10, 2020
2 parents 3b65b1a + e4774e9 commit cc80886
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package dothill
import (
"crypto/md5"
"fmt"
"strings"
)

// Login : Called automatically, may be called manually if credentials changed
Expand Down Expand Up @@ -34,6 +35,11 @@ func (client *Client) MapVolume(name, host, access string, lun int) (*Response,
return client.Request(fmt.Sprintf("/map/volume/access/%s/lun/%d/host/%s/\"%s\"", access, lun, host, name))
}

// ShowVolumes : get informations about volumes
func (client *Client) ShowVolumes(volumes ...string) (*Response, *ResponseStatus, error) {
return client.Request(fmt.Sprintf("/show/volumes/\"%s\"", strings.Join(volumes, ",")))
}

// UnmapVolume : unmap a volume from host
func (client *Client) UnmapVolume(name, host string) (*Response, *ResponseStatus, error) {
var url string
Expand Down

0 comments on commit cc80886

Please sign in to comment.