Adding support for replicas
diff --git a/rackspace/db/v1/instances/delegate.go b/rackspace/db/v1/instances/delegate.go
index d2e3c25..ca223eb 100644
--- a/rackspace/db/v1/instances/delegate.go
+++ b/rackspace/db/v1/instances/delegate.go
@@ -58,6 +58,8 @@
// - You can create new users or databases if you want, but they cannot be
// the same as the ones from the instance that was backed up.
RestorePoint string
+
+ ReplicaOf string
}
func (opts CreateOpts) ToInstanceCreateMap() (map[string]interface{}, error) {
@@ -91,6 +93,10 @@
instance["restorePoint"] = map[string]string{"backupRef": opts.RestorePoint}
}
+ if opts.ReplicaOf != "" {
+ instance["replica_of"] = opts.ReplicaOf
+ }
+
return map[string]interface{}{"instance": instance}, nil
}