Adding support for replicas
diff --git a/rackspace/db/v1/instances/requests.go b/rackspace/db/v1/instances/requests.go
index b311289..66bc872 100644
--- a/rackspace/db/v1/instances/requests.go
+++ b/rackspace/db/v1/instances/requests.go
@@ -41,3 +41,15 @@
}
return pagination.NewPager(client, backupsURL(client, instanceID), pageFn)
}
+
+func DetachReplica(client *gophercloud.ServiceClient, replicaID string) DetachResult {
+ var res DetachResult
+
+ _, res.Err = perigee.Request("PATCH", resourceURL(client, replicaID), perigee.Options{
+ MoreHeaders: client.AuthenticatedHeaders(),
+ ReqBody: map[string]interface{}{"instance": map[string]string{"replica_of": "", "slave_of": ""}},
+ OkCodes: []int{202},
+ })
+
+ return res
+}