Enable root user
diff --git a/openstack/db/v1/instances/results.go b/openstack/db/v1/instances/results.go
index d2ea794..60f0c04 100644
--- a/openstack/db/v1/instances/results.go
+++ b/openstack/db/v1/instances/results.go
@@ -27,6 +27,11 @@
Volume Volume
}
+type User struct {
+ Name string
+ Password string
+}
+
type commonResult struct {
gophercloud.Result
}
@@ -95,3 +100,21 @@
return response.Instances, err
}
+
+type UserRootResult struct {
+ gophercloud.Result
+}
+
+func (r UserRootResult) Extract() (*User, error) {
+ if r.Err != nil {
+ return nil, r.Err
+ }
+
+ var response struct {
+ User User `mapstructure:"user"`
+ }
+
+ err := mapstructure.Decode(r.Body, &response)
+
+ return &response.User, err
+}