get volume
diff --git a/openstack/blockstorage/v1/volumes/requests.go b/openstack/blockstorage/v1/volumes/requests.go
index a6d51fb..5dcbca0 100644
--- a/openstack/blockstorage/v1/volumes/requests.go
+++ b/openstack/blockstorage/v1/volumes/requests.go
@@ -24,6 +24,22 @@
return v, err
}
+func Get(c *blockstorage.Client, opts GetOpts) (Volume, error) {
+ var v Volume
+ h, err := c.GetHeaders()
+ if err != nil {
+ return v, err
+ }
+ url := c.GetVolumeURL(opts["id"])
+ _, err = perigee.Request("GET", url, perigee.Options{
+ Results: &struct {
+ Volume *Volume `json:"volume"`
+ }{&v},
+ MoreHeaders: h,
+ })
+ return v, err
+}
+
func Delete(c *blockstorage.Client, opts DeleteOpts) error {
h, err := c.GetHeaders()
if err != nil {