Adding GetConfig operation for Rackspace provider
diff --git a/rackspace/db/v1/instances/results.go b/rackspace/db/v1/instances/results.go
index cab403a..2b7f4fd 100644
--- a/rackspace/db/v1/instances/results.go
+++ b/rackspace/db/v1/instances/results.go
@@ -53,3 +53,22 @@
func (r GetResult) Extract() (*Instance, error) {
return commonExtract(r.Err, r.Body)
}
+
+type ConfigResult struct {
+ gophercloud.Result
+}
+
+func (r ConfigResult) Extract() (map[string]string, error) {
+ if err != nil {
+ return nil, err
+ }
+
+ var response struct {
+ Instance struct {
+ Config map[string]string `mapstructure:"configuration"`
+ } `mapstructure:"instance"`
+ }
+
+ err = mapstructure.Decode(body, &response)
+ return &response.Instance, err
+}