Use CommonResult in flavors.
diff --git a/openstack/compute/v2/flavors/requests.go b/openstack/compute/v2/flavors/requests.go
index c798f17..f34a9ea 100644
--- a/openstack/compute/v2/flavors/requests.go
+++ b/openstack/compute/v2/flavors/requests.go
@@ -32,9 +32,6 @@
return flavors[len(flavors)-1].ID, nil
}
-// GetResults temporarily encodes the result of a Get operation.
-type GetResults map[string]interface{}
-
// ListFilterOptions helps control the results returned by the List() function.
// For example, a flavor with a minDisk field of 10 will not be returned if you specify MinDisk set to 20.
// Typically, software will use the last ID of the previous call to List to set the Marker for the current call.
@@ -69,11 +66,11 @@
// Get instructs OpenStack to provide details on a single flavor, identified by its ID.
// Use ExtractFlavor to convert its result into a Flavor.
-func Get(client *gophercloud.ServiceClient, id string) (GetResults, error) {
- var gr GetResults
- err := perigee.Get(getFlavorURL(client, id), perigee.Options{
- Results: &gr,
+func Get(client *gophercloud.ServiceClient, id string) GetResult {
+ var gr GetResult
+ gr.Err = perigee.Get(getFlavorURL(client, id), perigee.Options{
+ Results: &gr.Resp,
MoreHeaders: client.Provider.AuthenticatedHeaders(),
})
- return gr, err
+ return gr
}