UpdateMetadata for snapshots
diff --git a/openstack/blockstorage/v1/snapshots/results.go b/openstack/blockstorage/v1/snapshots/results.go
index 3a27592..9509bca 100644
--- a/openstack/blockstorage/v1/snapshots/results.go
+++ b/openstack/blockstorage/v1/snapshots/results.go
@@ -60,11 +60,22 @@
return response.Snapshots, err
}
-// UpdateResult contains the response body and error from an Update request.
-type UpdateResult struct {
+// UpdateMetadataResult contains the response body and error from an UpdateMetadata request.
+type UpdateMetadataResult struct {
commonResult
}
+// ExtractMetadata returns the metadata from a response from snapshots.UpdateMetadata.
+func (r UpdateMetadataResult) ExtractMetadata() (map[string]interface{}, error) {
+ if r.Err != nil {
+ return nil, r.Err
+ }
+
+ m := r.Resp["metadata"].(map[string]interface{})
+
+ return m, nil
+}
+
type commonResult struct {
gophercloud.CommonResult
}