server.go
func (c *Client) AttachVolume(dcid string, srvid string, volid string) (*Volume, error) {
	data := struct {
		ID string `json:"id,omitempty"`
	}{
		volid,
	}
	url := serverVolumeColPath(dcid, srvid) + `?depth=` + c.client.depth + `&pretty=` + strconv.FormatBool(c.client.pretty)
	ret := &Volume{}
	err := c.client.Post(url, data, ret, http.StatusAccepted)

	return ret, err
}
func (c *Client) AttachVolume(dcid string, srvid string, volid string) (*Volume, error) {
	data := struct {
		ID string `json:"id,omitempty"`
	}{
		volid,
	}
	url := serverVolumeColPath(dcid, srvid) + `?depth=` + c.client.depth + `&pretty=` + strconv.FormatBool(c.client.pretty)
	ret := &Volume{}
	err := c.client.Post(url, data, ret, http.StatusAccepted)

	return ret, err
}
//AttachVolume attaches a volume