get snapshot
diff --git a/openstack/blockstorage/v1/snapshots/requests.go b/openstack/blockstorage/v1/snapshots/requests.go
index 90c2ec3..1fc3e27 100644
--- a/openstack/blockstorage/v1/snapshots/requests.go
+++ b/openstack/blockstorage/v1/snapshots/requests.go
@@ -24,6 +24,22 @@
return ss, err
}
+func Get(c *blockstorage.Client, opts GetOpts) (Snapshot, error) {
+ var ss Snapshot
+ h, err := c.GetHeaders()
+ if err != nil {
+ return ss, err
+ }
+ url := c.GetSnapshotURL(opts["id"])
+ _, err = perigee.Request("GET", url, perigee.Options{
+ Results: &struct {
+ Snapshot *Snapshot `json:"snapshot"`
+ }{&ss},
+ MoreHeaders: h,
+ })
+ return ss, err
+}
+
func Delete(c *blockstorage.Client, opts DeleteOpts) error {
h, err := c.GetHeaders()
if err != nil {