Finalize Rackspace acceptance tests and fix various things
diff --git a/rackspace/db/v1/instances/delegate.go b/rackspace/db/v1/instances/delegate.go
index ca223eb..53d9289 100644
--- a/rackspace/db/v1/instances/delegate.go
+++ b/rackspace/db/v1/instances/delegate.go
@@ -8,19 +8,6 @@
"github.com/rackspace/gophercloud/pagination"
)
-// DatastoreOpts represents the configuration for how an instance stores data.
-type DatastoreOpts struct {
- Version string
- Type string
-}
-
-func (opts DatastoreOpts) ToMap() (map[string]string, error) {
- return map[string]string{
- "version": opts.Version,
- "type": opts.Type,
- }, nil
-}
-
// CreateOpts is the struct responsible for configuring a new database instance.
type CreateOpts struct {
// Either the integer UUID (in string form) of the flavor, or its URI
@@ -46,7 +33,7 @@
// Options to configure the type of datastore the instance will use. This is
// optional, and if excluded will default to MySQL.
- Datastore *DatastoreOpts
+ Datastore *os.DatastoreOpts
// Specifies the backup ID from which to restore the database instance. There
// are some things to be aware of before using this field. When you execute
diff --git a/rackspace/db/v1/instances/requests.go b/rackspace/db/v1/instances/requests.go
index 7a1a4f8..bd8a899 100644
--- a/rackspace/db/v1/instances/requests.go
+++ b/rackspace/db/v1/instances/requests.go
@@ -39,6 +39,11 @@
return res
}
+// DetachFromConfigGroup will detach an instance from all config groups.
+func DetachFromConfigGroup(client *gophercloud.ServiceClient, instanceID string) UpdateResult {
+ return AssociateWithConfigGroup(client, instanceID, "")
+}
+
// ListBackups will list all the backups for a specified database instance.
func ListBackups(client *gophercloud.ServiceClient, instanceID string) pagination.Pager {
pageFn := func(r pagination.PageResult) pagination.Page {