Finalizing snapshots
diff --git a/rackspace/blockstorage/v1/snapshots/results.go b/rackspace/blockstorage/v1/snapshots/results.go
index b35e719..9acf0bb 100644
--- a/rackspace/blockstorage/v1/snapshots/results.go
+++ b/rackspace/blockstorage/v1/snapshots/results.go
@@ -68,6 +68,11 @@
os.GetResult
}
+// UpdateResult represents the result of an update operation
+type UpdateResult struct {
+ gophercloud.CommonResult
+}
+
func commonExtract(resp map[string]interface{}, err error) (*Snapshot, error) {
if err != nil {
return nil, err
@@ -92,6 +97,11 @@
return commonExtract(r.Resp, r.Err)
}
+// Extract will get the Snapshot object out of the UpdateResult object.
+func (r UpdateResult) Extract() (*Snapshot, error) {
+ return commonExtract(r.Resp, r.Err)
+}
+
// ExtractSnapshots extracts and returns Snapshots. It is used while iterating over a snapshots.List call.
func ExtractSnapshots(page pagination.Page) ([]Snapshot, error) {
var response struct {