fix general issues
diff --git a/rackspace/db/v1/configurations/doc.go b/openstack/db/v1/configurations/doc.go
similarity index 100%
rename from rackspace/db/v1/configurations/doc.go
rename to openstack/db/v1/configurations/doc.go
diff --git a/rackspace/db/v1/configurations/fixtures.go b/openstack/db/v1/configurations/fixtures.go
similarity index 100%
rename from rackspace/db/v1/configurations/fixtures.go
rename to openstack/db/v1/configurations/fixtures.go
diff --git a/rackspace/db/v1/configurations/requests.go b/openstack/db/v1/configurations/requests.go
similarity index 97%
rename from rackspace/db/v1/configurations/requests.go
rename to openstack/db/v1/configurations/requests.go
index bb75f5a..83c7102 100644
--- a/rackspace/db/v1/configurations/requests.go
+++ b/openstack/db/v1/configurations/requests.go
@@ -187,9 +187,8 @@
}
_, res.Err = client.Request("PATCH", resourceURL(client, configID), gophercloud.RequestOpts{
- OkCodes: []int{200},
- JSONBody: &reqBody,
- JSONResponse: &res.Body,
+ OkCodes: []int{200},
+ JSONBody: &reqBody,
})
return res
@@ -208,9 +207,8 @@
}
_, res.Err = client.Request("PUT", resourceURL(client, configID), gophercloud.RequestOpts{
- OkCodes: []int{202},
- JSONBody: &reqBody,
- JSONResponse: &res.Body,
+ OkCodes: []int{202},
+ JSONBody: &reqBody,
})
return res
diff --git a/rackspace/db/v1/configurations/requests_test.go b/openstack/db/v1/configurations/requests_test.go
similarity index 99%
rename from rackspace/db/v1/configurations/requests_test.go
rename to openstack/db/v1/configurations/requests_test.go
index f026be4..ca085d8 100644
--- a/rackspace/db/v1/configurations/requests_test.go
+++ b/openstack/db/v1/configurations/requests_test.go
@@ -58,7 +58,7 @@
func TestCreate(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, _baseURL, "POST", createReq, createConfigJSON, 201)
+ fixture.SetupHandler(t, _baseURL, "POST", createReq, createConfigJSON, 200)
opts := CreateOpts{
Datastore: &DatastoreOpts{
diff --git a/rackspace/db/v1/configurations/results.go b/openstack/db/v1/configurations/results.go
similarity index 100%
rename from rackspace/db/v1/configurations/results.go
rename to openstack/db/v1/configurations/results.go
diff --git a/rackspace/db/v1/configurations/urls.go b/openstack/db/v1/configurations/urls.go
similarity index 100%
rename from rackspace/db/v1/configurations/urls.go
rename to openstack/db/v1/configurations/urls.go
diff --git a/openstack/db/v1/databases/requests.go b/openstack/db/v1/databases/requests.go
index 18a0798..4a1b40c 100644
--- a/openstack/db/v1/databases/requests.go
+++ b/openstack/db/v1/databases/requests.go
@@ -84,9 +84,8 @@
}
_, res.Err = client.Request("POST", baseURL(client, instanceID), gophercloud.RequestOpts{
- JSONBody: &reqBody,
- JSONResponse: &res.Body,
- OkCodes: []int{202},
+ JSONBody: &reqBody,
+ OkCodes: []int{202},
})
return res
diff --git a/openstack/db/v1/datastores/doc.go b/openstack/db/v1/datastores/doc.go
new file mode 100644
index 0000000..ae14026
--- /dev/null
+++ b/openstack/db/v1/datastores/doc.go
@@ -0,0 +1,3 @@
+// Package datastores provides information and interaction with the datastore
+// API resource in the Rackspace Database service.
+package datastores
diff --git a/openstack/db/v1/datastores/fixtures.go b/openstack/db/v1/datastores/fixtures.go
new file mode 100644
index 0000000..fd767cd
--- /dev/null
+++ b/openstack/db/v1/datastores/fixtures.go
@@ -0,0 +1,100 @@
+package datastores
+
+import (
+ "fmt"
+
+ "github.com/rackspace/gophercloud"
+)
+
+const version1JSON = `
+{
+ "id": "b00000b0-00b0-0b00-00b0-000b000000bb",
+ "links": [
+ {
+ "href": "https://10.240.28.38:8779/v1.0/1234/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb",
+ "rel": "self"
+ },
+ {
+ "href": "https://10.240.28.38:8779/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "5.1"
+}
+`
+
+const version2JSON = `
+{
+ "id": "c00000b0-00c0-0c00-00c0-000b000000cc",
+ "links": [
+ {
+ "href": "https://10.240.28.38:8779/v1.0/1234/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc",
+ "rel": "self"
+ },
+ {
+ "href": "https://10.240.28.38:8779/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "5.2"
+}
+`
+
+var versionsJSON = fmt.Sprintf(`"versions": [%s, %s]`, version1JSON, version2JSON)
+
+var singleDSJSON = fmt.Sprintf(`
+{
+ "default_version": "c00000b0-00c0-0c00-00c0-000b000000cc",
+ "id": "10000000-0000-0000-0000-000000000001",
+ "links": [
+ {
+ "href": "https://10.240.28.38:8779/v1.0/1234/datastores/10000000-0000-0000-0000-000000000001",
+ "rel": "self"
+ },
+ {
+ "href": "https://10.240.28.38:8779/datastores/10000000-0000-0000-0000-000000000001",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "mysql",
+ %s
+}
+`, versionsJSON)
+
+var (
+ ListDSResp = fmt.Sprintf(`{"datastores":[%s]}`, singleDSJSON)
+ GetDSResp = fmt.Sprintf(`{"datastore":%s}`, singleDSJSON)
+ ListVersionsResp = fmt.Sprintf(`{%s}`, versionsJSON)
+ GetVersionResp = fmt.Sprintf(`{"version":%s}`, version1JSON)
+)
+
+var ExampleVersion1 = Version{
+ ID: "b00000b0-00b0-0b00-00b0-000b000000bb",
+ Links: []gophercloud.Link{
+ gophercloud.Link{Rel: "self", Href: "https://10.240.28.38:8779/v1.0/1234/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb"},
+ gophercloud.Link{Rel: "bookmark", Href: "https://10.240.28.38:8779/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb"},
+ },
+ Name: "5.1",
+}
+
+var exampleVersion2 = Version{
+ ID: "c00000b0-00c0-0c00-00c0-000b000000cc",
+ Links: []gophercloud.Link{
+ gophercloud.Link{Rel: "self", Href: "https://10.240.28.38:8779/v1.0/1234/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc"},
+ gophercloud.Link{Rel: "bookmark", Href: "https://10.240.28.38:8779/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc"},
+ },
+ Name: "5.2",
+}
+
+var ExampleVersions = []Version{ExampleVersion1, exampleVersion2}
+
+var ExampleDatastore = Datastore{
+ DefaultVersion: "c00000b0-00c0-0c00-00c0-000b000000cc",
+ ID: "10000000-0000-0000-0000-000000000001",
+ Links: []gophercloud.Link{
+ gophercloud.Link{Rel: "self", Href: "https://10.240.28.38:8779/v1.0/1234/datastores/10000000-0000-0000-0000-000000000001"},
+ gophercloud.Link{Rel: "bookmark", Href: "https://10.240.28.38:8779/datastores/10000000-0000-0000-0000-000000000001"},
+ },
+ Name: "mysql",
+ Versions: ExampleVersions,
+}
diff --git a/rackspace/db/v1/datastores/requests.go b/openstack/db/v1/datastores/requests.go
similarity index 100%
rename from rackspace/db/v1/datastores/requests.go
rename to openstack/db/v1/datastores/requests.go
diff --git a/rackspace/db/v1/datastores/requests_test.go b/openstack/db/v1/datastores/requests_test.go
similarity index 78%
rename from rackspace/db/v1/datastores/requests_test.go
rename to openstack/db/v1/datastores/requests_test.go
index 5246310..b4ce871 100644
--- a/rackspace/db/v1/datastores/requests_test.go
+++ b/openstack/db/v1/datastores/requests_test.go
@@ -12,7 +12,7 @@
func TestList(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores", "GET", "", listDSResp, 200)
+ fixture.SetupHandler(t, "/datastores", "GET", "", ListDSResp, 200)
pages := 0
@@ -24,7 +24,7 @@
return false, err
}
- th.CheckDeepEquals(t, []Datastore{exampleDatastore}, actual)
+ th.CheckDeepEquals(t, []Datastore{ExampleDatastore}, actual)
return true, nil
})
@@ -36,17 +36,17 @@
func TestGet(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores/{dsID}", "GET", "", getDSResp, 200)
+ fixture.SetupHandler(t, "/datastores/{dsID}", "GET", "", GetDSResp, 200)
ds, err := Get(fake.ServiceClient(), "{dsID}").Extract()
th.AssertNoErr(t, err)
- th.AssertDeepEquals(t, &exampleDatastore, ds)
+ th.AssertDeepEquals(t, &ExampleDatastore, ds)
}
func TestListVersions(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores/{dsID}/versions", "GET", "", listVersionsResp, 200)
+ fixture.SetupHandler(t, "/datastores/{dsID}/versions", "GET", "", ListVersionsResp, 200)
pages := 0
@@ -58,7 +58,7 @@
return false, err
}
- th.CheckDeepEquals(t, exampleVersions, actual)
+ th.CheckDeepEquals(t, ExampleVersions, actual)
return true, nil
})
@@ -70,9 +70,9 @@
func TestGetVersion(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores/{dsID}/versions/{versionID}", "GET", "", getVersionResp, 200)
+ fixture.SetupHandler(t, "/datastores/{dsID}/versions/{versionID}", "GET", "", GetVersionResp, 200)
ds, err := GetVersion(fake.ServiceClient(), "{dsID}", "{versionID}").Extract()
th.AssertNoErr(t, err)
- th.AssertDeepEquals(t, &exampleVersion1, ds)
+ th.AssertDeepEquals(t, &ExampleVersion1, ds)
}
diff --git a/rackspace/db/v1/datastores/results.go b/openstack/db/v1/datastores/results.go
similarity index 100%
rename from rackspace/db/v1/datastores/results.go
rename to openstack/db/v1/datastores/results.go
diff --git a/rackspace/db/v1/datastores/urls.go b/openstack/db/v1/datastores/urls.go
similarity index 100%
rename from rackspace/db/v1/datastores/urls.go
rename to openstack/db/v1/datastores/urls.go
diff --git a/openstack/db/v1/instances/fixtures.go b/openstack/db/v1/instances/fixtures.go
index 502d87f..9b4b209 100644
--- a/openstack/db/v1/instances/fixtures.go
+++ b/openstack/db/v1/instances/fixtures.go
@@ -5,6 +5,7 @@
"testing"
"github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/openstack/db/v1/flavors"
"github.com/rackspace/gophercloud/testhelper/fixture"
)
@@ -119,6 +120,10 @@
Name: "json_rack_instance",
Status: "BUILD",
Volume: Volume{Size: 2},
+ Datastore: datastores.DatastorePartial{
+ Type: "mysql",
+ Version: "5.6",
+ },
}
func HandleCreate(t *testing.T) {
diff --git a/openstack/db/v1/instances/requests.go b/openstack/db/v1/instances/requests.go
index 1872d75..bd70295 100644
--- a/openstack/db/v1/instances/requests.go
+++ b/openstack/db/v1/instances/requests.go
@@ -179,7 +179,7 @@
var res ActionResult
_, res.Err = client.Request("POST", actionURL(client, id), gophercloud.RequestOpts{
- JSONBody: map[string]interface{}{"restart": map[string]string{}},
+ JSONBody: map[string]interface{}{"restart": true},
OkCodes: []int{202},
})
diff --git a/openstack/db/v1/instances/results.go b/openstack/db/v1/instances/results.go
index b7eeb86..61dc021 100644
--- a/openstack/db/v1/instances/results.go
+++ b/openstack/db/v1/instances/results.go
@@ -3,10 +3,10 @@
import (
"github.com/mitchellh/mapstructure"
"github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/openstack/db/v1/flavors"
"github.com/rackspace/gophercloud/openstack/db/v1/users"
"github.com/rackspace/gophercloud/pagination"
- "github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
)
// Volume represents information about an attached volume for a database instance.
diff --git a/rackspace/db/v1/backups/requests_test.go b/rackspace/db/v1/backups/requests_test.go
index a56bc35..ac0e6bd 100644
--- a/rackspace/db/v1/backups/requests_test.go
+++ b/rackspace/db/v1/backups/requests_test.go
@@ -3,8 +3,8 @@
import (
"testing"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/pagination"
- "github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
th "github.com/rackspace/gophercloud/testhelper"
fake "github.com/rackspace/gophercloud/testhelper/client"
"github.com/rackspace/gophercloud/testhelper/fixture"
diff --git a/rackspace/db/v1/backups/results.go b/rackspace/db/v1/backups/results.go
index b6a5f17..071cd33 100644
--- a/rackspace/db/v1/backups/results.go
+++ b/rackspace/db/v1/backups/results.go
@@ -3,8 +3,8 @@
import (
"github.com/mitchellh/mapstructure"
"github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/pagination"
- "github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
)
// Status represents the various states a Backup can be in.
diff --git a/rackspace/db/v1/datastores/delegate.go b/rackspace/db/v1/datastores/delegate.go
new file mode 100644
index 0000000..573496d
--- /dev/null
+++ b/rackspace/db/v1/datastores/delegate.go
@@ -0,0 +1,28 @@
+package datastores
+
+import (
+ "github.com/rackspace/gophercloud"
+ os "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
+ "github.com/rackspace/gophercloud/pagination"
+)
+
+// List will list all available flavors.
+func List(client *gophercloud.ServiceClient) pagination.Pager {
+ return os.List(client)
+}
+
+// Get retrieves the details for a particular flavor.
+func Get(client *gophercloud.ServiceClient, flavorID string) os.GetResult {
+ return os.Get(client, flavorID)
+}
+
+// ListVersions will list all of the available versions for a specified
+// datastore type.
+func ListVersions(client *gophercloud.ServiceClient, datastoreID string) pagination.Pager {
+ return os.ListVersions(client, datastoreID)
+}
+
+// GetVersion will retrieve the details of a specified datastore version.
+func GetVersion(client *gophercloud.ServiceClient, datastoreID, versionID string) os.GetVersionResult {
+ return os.GetVersion(client, datastoreID, versionID)
+}
diff --git a/rackspace/db/v1/datastores/requests_test.go b/rackspace/db/v1/datastores/delegate_test.go
similarity index 69%
copy from rackspace/db/v1/datastores/requests_test.go
copy to rackspace/db/v1/datastores/delegate_test.go
index 5246310..71111b9 100644
--- a/rackspace/db/v1/datastores/requests_test.go
+++ b/rackspace/db/v1/datastores/delegate_test.go
@@ -3,6 +3,7 @@
import (
"testing"
+ os "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/pagination"
th "github.com/rackspace/gophercloud/testhelper"
fake "github.com/rackspace/gophercloud/testhelper/client"
@@ -12,19 +13,19 @@
func TestList(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores", "GET", "", listDSResp, 200)
+ fixture.SetupHandler(t, "/datastores", "GET", "", os.ListDSResp, 200)
pages := 0
err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
pages++
- actual, err := ExtractDatastores(page)
+ actual, err := os.ExtractDatastores(page)
if err != nil {
return false, err
}
- th.CheckDeepEquals(t, []Datastore{exampleDatastore}, actual)
+ th.CheckDeepEquals(t, []os.Datastore{os.ExampleDatastore}, actual)
return true, nil
})
@@ -36,29 +37,29 @@
func TestGet(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores/{dsID}", "GET", "", getDSResp, 200)
+ fixture.SetupHandler(t, "/datastores/{dsID}", "GET", "", os.GetDSResp, 200)
ds, err := Get(fake.ServiceClient(), "{dsID}").Extract()
th.AssertNoErr(t, err)
- th.AssertDeepEquals(t, &exampleDatastore, ds)
+ th.AssertDeepEquals(t, &os.ExampleDatastore, ds)
}
func TestListVersions(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores/{dsID}/versions", "GET", "", listVersionsResp, 200)
+ fixture.SetupHandler(t, "/datastores/{dsID}/versions", "GET", "", os.ListVersionsResp, 200)
pages := 0
err := ListVersions(fake.ServiceClient(), "{dsID}").EachPage(func(page pagination.Page) (bool, error) {
pages++
- actual, err := ExtractVersions(page)
+ actual, err := os.ExtractVersions(page)
if err != nil {
return false, err
}
- th.CheckDeepEquals(t, exampleVersions, actual)
+ th.CheckDeepEquals(t, os.ExampleVersions, actual)
return true, nil
})
@@ -70,9 +71,9 @@
func TestGetVersion(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- fixture.SetupHandler(t, "/datastores/{dsID}/versions/{versionID}", "GET", "", getVersionResp, 200)
+ fixture.SetupHandler(t, "/datastores/{dsID}/versions/{versionID}", "GET", "", os.GetVersionResp, 200)
ds, err := GetVersion(fake.ServiceClient(), "{dsID}", "{versionID}").Extract()
th.AssertNoErr(t, err)
- th.AssertDeepEquals(t, &exampleVersion1, ds)
+ th.AssertDeepEquals(t, &os.ExampleVersion1, ds)
}
diff --git a/rackspace/db/v1/datastores/doc.go b/rackspace/db/v1/datastores/doc.go
index ae14026..f36997a 100644
--- a/rackspace/db/v1/datastores/doc.go
+++ b/rackspace/db/v1/datastores/doc.go
@@ -1,3 +1 @@
-// Package datastores provides information and interaction with the datastore
-// API resource in the Rackspace Database service.
package datastores
diff --git a/rackspace/db/v1/datastores/fixtures.go b/rackspace/db/v1/datastores/fixtures.go
deleted file mode 100644
index 842aa77..0000000
--- a/rackspace/db/v1/datastores/fixtures.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package datastores
-
-import (
- "fmt"
-
- "github.com/rackspace/gophercloud"
-)
-
-const version1JSON = `
-{
- "id": "b00000b0-00b0-0b00-00b0-000b000000bb",
- "links": [
- {
- "href": "https://api.staging.ord1.clouddb.rackspace.net/v1.0/1234/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb",
- "rel": "self"
- },
- {
- "href": "https://api.staging.ord1.clouddb.rackspace.net/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb",
- "rel": "bookmark"
- }
- ],
- "name": "5.1"
-}
-`
-
-const version2JSON = `
-{
- "id": "c00000b0-00c0-0c00-00c0-000b000000cc",
- "links": [
- {
- "href": "https://api.staging.ord1.clouddb.rackspace.net/v1.0/1234/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc",
- "rel": "self"
- },
- {
- "href": "https://api.staging.ord1.clouddb.rackspace.net/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc",
- "rel": "bookmark"
- }
- ],
- "name": "5.2"
-}
-`
-
-var versionsJSON = fmt.Sprintf(`"versions": [%s, %s]`, version1JSON, version2JSON)
-
-var singleDSJSON = fmt.Sprintf(`
-{
- "default_version": "c00000b0-00c0-0c00-00c0-000b000000cc",
- "id": "10000000-0000-0000-0000-000000000001",
- "links": [
- {
- "href": "https://api.staging.ord1.clouddb.rackspace.net/v1.0/1234/datastores/10000000-0000-0000-0000-000000000001",
- "rel": "self"
- },
- {
- "href": "https://api.staging.ord1.clouddb.rackspace.net/datastores/10000000-0000-0000-0000-000000000001",
- "rel": "bookmark"
- }
- ],
- "name": "mysql",
- %s
-}
-`, versionsJSON)
-
-var (
- listDSResp = fmt.Sprintf(`{"datastores":[%s]}`, singleDSJSON)
- getDSResp = fmt.Sprintf(`{"datastore":%s}`, singleDSJSON)
- listVersionsResp = fmt.Sprintf(`{%s}`, versionsJSON)
- getVersionResp = fmt.Sprintf(`{"version":%s}`, version1JSON)
-)
-
-var exampleVersion1 = Version{
- ID: "b00000b0-00b0-0b00-00b0-000b000000bb",
- Links: []gophercloud.Link{
- gophercloud.Link{Rel: "self", Href: "https://api.staging.ord1.clouddb.rackspace.net/v1.0/1234/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb"},
- gophercloud.Link{Rel: "bookmark", Href: "https://api.staging.ord1.clouddb.rackspace.net/datastores/versions/b00000b0-00b0-0b00-00b0-000b000000bb"},
- },
- Name: "5.1",
-}
-
-var exampleVersion2 = Version{
- ID: "c00000b0-00c0-0c00-00c0-000b000000cc",
- Links: []gophercloud.Link{
- gophercloud.Link{Rel: "self", Href: "https://api.staging.ord1.clouddb.rackspace.net/v1.0/1234/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc"},
- gophercloud.Link{Rel: "bookmark", Href: "https://api.staging.ord1.clouddb.rackspace.net/datastores/versions/c00000b0-00c0-0c00-00c0-000b000000cc"},
- },
- Name: "5.2",
-}
-
-var exampleVersions = []Version{exampleVersion1, exampleVersion2}
-
-var exampleDatastore = Datastore{
- DefaultVersion: "c00000b0-00c0-0c00-00c0-000b000000cc",
- ID: "10000000-0000-0000-0000-000000000001",
- Links: []gophercloud.Link{
- gophercloud.Link{Rel: "self", Href: "https://api.staging.ord1.clouddb.rackspace.net/v1.0/1234/datastores/10000000-0000-0000-0000-000000000001"},
- gophercloud.Link{Rel: "bookmark", Href: "https://api.staging.ord1.clouddb.rackspace.net/datastores/10000000-0000-0000-0000-000000000001"},
- },
- Name: "mysql",
- Versions: exampleVersions,
-}
diff --git a/rackspace/db/v1/instances/delegate_test.go b/rackspace/db/v1/instances/delegate_test.go
index 03a4828..60a13c4 100644
--- a/rackspace/db/v1/instances/delegate_test.go
+++ b/rackspace/db/v1/instances/delegate_test.go
@@ -5,10 +5,10 @@
"github.com/rackspace/gophercloud"
osDBs "github.com/rackspace/gophercloud/openstack/db/v1/databases"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/openstack/db/v1/flavors"
os "github.com/rackspace/gophercloud/openstack/db/v1/instances"
osUsers "github.com/rackspace/gophercloud/openstack/db/v1/users"
- "github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
th "github.com/rackspace/gophercloud/testhelper"
fake "github.com/rackspace/gophercloud/testhelper/client"
"github.com/rackspace/gophercloud/testhelper/fixture"
diff --git a/rackspace/db/v1/instances/fixtures.go b/rackspace/db/v1/instances/fixtures.go
index b59aeae..7275a32 100644
--- a/rackspace/db/v1/instances/fixtures.go
+++ b/rackspace/db/v1/instances/fixtures.go
@@ -2,9 +2,9 @@
import (
"github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/openstack/db/v1/flavors"
os "github.com/rackspace/gophercloud/openstack/db/v1/instances"
- "github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
)
const instance = `
diff --git a/rackspace/db/v1/instances/requests_test.go b/rackspace/db/v1/instances/requests_test.go
index aab057d..b242c0f 100644
--- a/rackspace/db/v1/instances/requests_test.go
+++ b/rackspace/db/v1/instances/requests_test.go
@@ -4,11 +4,11 @@
"testing"
"github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/openstack/db/v1/flavors"
os "github.com/rackspace/gophercloud/openstack/db/v1/instances"
"github.com/rackspace/gophercloud/pagination"
"github.com/rackspace/gophercloud/rackspace/db/v1/backups"
- "github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
th "github.com/rackspace/gophercloud/testhelper"
fake "github.com/rackspace/gophercloud/testhelper/client"
"github.com/rackspace/gophercloud/testhelper/fixture"
diff --git a/rackspace/db/v1/instances/results.go b/rackspace/db/v1/instances/results.go
index a516cb4..e884288 100644
--- a/rackspace/db/v1/instances/results.go
+++ b/rackspace/db/v1/instances/results.go
@@ -3,10 +3,10 @@
import (
"github.com/mitchellh/mapstructure"
"github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/gophercloud/openstack/db/v1/flavors"
os "github.com/rackspace/gophercloud/openstack/db/v1/instances"
"github.com/rackspace/gophercloud/pagination"
- "github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
)
// Instance represents a remote MySQL instance.
diff --git a/rackspace/db/v1/users/requests_test.go b/rackspace/db/v1/users/requests_test.go
index f18492d..655d229 100644
--- a/rackspace/db/v1/users/requests_test.go
+++ b/rackspace/db/v1/users/requests_test.go
@@ -37,7 +37,7 @@
defer th.TeardownHTTP()
fixture.SetupHandler(t, _userURL, "PUT", updateReq, "", 202)
- opts := os.CreateOpts{
+ opts := UpdateOpts{
Name: "new_username",
Password: "new_password",
}