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/configurations/doc.go b/rackspace/db/v1/configurations/doc.go
deleted file mode 100644
index 45b9cfb..0000000
--- a/rackspace/db/v1/configurations/doc.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Package configurations provides information and interaction with the
-// configuration API resource in the Rackspace Database service.
-//
-// A configuration group is a collection of key/value pairs which define how a
-// particular database operates. These key/value pairs are specific to each
-// datastore type and serve like settings. Some directives are capable of being
-// applied dynamically, while other directives require a server restart to take
-// effect. The configuration group can be applied to an instance at creation or
-// applied to an existing instance to modify the behavior of the running
-// datastore on the instance.
-package configurations
diff --git a/rackspace/db/v1/configurations/fixtures.go b/rackspace/db/v1/configurations/fixtures.go
deleted file mode 100644
index c3723ab..0000000
--- a/rackspace/db/v1/configurations/fixtures.go
+++ /dev/null
@@ -1,149 +0,0 @@
-package configurations
-
-import "fmt"
-
-const singleConfigJSON = `
-{
-  "created": "2014-07-31T18:56:09",
-  "datastore_name": "mysql",
-  "datastore_version_id": "b00000b0-00b0-0b00-00b0-000b000000bb",
-  "datastore_version_name": "5.6",
-  "description": "example_description",
-  "id": "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
-  "name": "example-configuration-name",
-  "updated": "2014-07-31T18:56:09"
-}
-`
-
-const singleConfigWithValuesJSON = `
-{
-  "created": "2014-07-31T15:02:52",
-  "datastore_name": "mysql",
-  "datastore_version_id": "b00000b0-00b0-0b00-00b0-000b000000bb",
-  "datastore_version_name": "5.6",
-  "description": "example description",
-  "id": "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
-  "instance_count": 0,
-  "name": "example-configuration-name",
-  "updated": "2014-07-31T15:02:52",
-  "values": {
-    "collation_server": "latin1_swedish_ci",
-    "connect_timeout": 120
-  }
-}
-`
-
-var (
-	listConfigsJSON  = fmt.Sprintf(`{"configurations": [%s]}`, singleConfigJSON)
-	getConfigJSON    = fmt.Sprintf(`{"configuration": %s}`, singleConfigJSON)
-	createConfigJSON = fmt.Sprintf(`{"configuration": %s}`, singleConfigWithValuesJSON)
-)
-
-var createReq = `
-{
-  "configuration": {
-    "datastore": {
-      "type": "a00000a0-00a0-0a00-00a0-000a000000aa",
-      "version": "b00000b0-00b0-0b00-00b0-000b000000bb"
-    },
-    "description": "example description",
-    "name": "example-configuration-name",
-    "values": {
-      "collation_server": "latin1_swedish_ci",
-      "connect_timeout": 120
-    }
-  }
-}
-`
-
-var updateReq = `
-{
-  "configuration": {
-    "values": {
-      "connect_timeout": 300
-    }
-  }
-}
-`
-
-var listInstancesJSON = `
-{
-  "instances": [
-    {
-      "id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
-      "name": "json_rack_instance"
-    }
-  ]
-}
-`
-
-var listParamsJSON = `
-{
-  "configuration-parameters": [
-    {
-      "max": 1,
-      "min": 0,
-      "name": "innodb_file_per_table",
-      "restart_required": true,
-      "type": "integer"
-    },
-    {
-      "max": 4294967296,
-      "min": 0,
-      "name": "key_buffer_size",
-      "restart_required": false,
-      "type": "integer"
-    },
-    {
-      "max": 65535,
-      "min": 2,
-      "name": "connect_timeout",
-      "restart_required": false,
-      "type": "integer"
-    },
-    {
-      "max": 4294967296,
-      "min": 0,
-      "name": "join_buffer_size",
-      "restart_required": false,
-      "type": "integer"
-    }
-  ]
-}
-`
-
-var getParamJSON = `
-{
-  "max": 1,
-  "min": 0,
-  "name": "innodb_file_per_table",
-  "restart_required": true,
-  "type": "integer"
-}
-`
-
-var exampleConfig = Config{
-	Created:              "2014-07-31T18:56:09",
-	DatastoreName:        "mysql",
-	DatastoreVersionID:   "b00000b0-00b0-0b00-00b0-000b000000bb",
-	DatastoreVersionName: "5.6",
-	Description:          "example_description",
-	ID:                   "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
-	Name:                 "example-configuration-name",
-	Updated:              "2014-07-31T18:56:09",
-}
-
-var exampleConfigWithValues = Config{
-	Created:              "2014-07-31T15:02:52",
-	DatastoreName:        "mysql",
-	DatastoreVersionID:   "b00000b0-00b0-0b00-00b0-000b000000bb",
-	DatastoreVersionName: "5.6",
-	Description:          "example description",
-	ID:                   "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
-	Name:                 "example-configuration-name",
-	Updated:              "2014-07-31T15:02:52",
-	Values: map[string]interface{}{
-		"collation_server": "latin1_swedish_ci",
-		"connect_timeout":  120,
-	},
-}
diff --git a/rackspace/db/v1/configurations/requests.go b/rackspace/db/v1/configurations/requests.go
deleted file mode 100644
index bb75f5a..0000000
--- a/rackspace/db/v1/configurations/requests.go
+++ /dev/null
@@ -1,289 +0,0 @@
-package configurations
-
-import (
-	"errors"
-
-	"github.com/rackspace/gophercloud"
-	"github.com/rackspace/gophercloud/openstack/db/v1/instances"
-	"github.com/rackspace/gophercloud/pagination"
-)
-
-// List will list all of the available configurations.
-func List(client *gophercloud.ServiceClient) pagination.Pager {
-	pageFn := func(r pagination.PageResult) pagination.Page {
-		return ConfigPage{pagination.SinglePageBase(r)}
-	}
-
-	return pagination.NewPager(client, baseURL(client), pageFn)
-}
-
-// CreateOptsBuilder is a top-level interface which renders a JSON map.
-type CreateOptsBuilder interface {
-	ToConfigCreateMap() (map[string]interface{}, error)
-}
-
-// DatastoreOpts is the primary options struct for creating and modifying
-// how configuration resources are associated with datastores.
-type DatastoreOpts struct {
-	// [OPTIONAL] The type of datastore. Defaults to "MySQL".
-	Type string
-
-	// [OPTIONAL] The specific version of a datastore. Defaults to "5.6".
-	Version string
-}
-
-// ToMap renders a JSON map for a datastore setting.
-func (opts DatastoreOpts) ToMap() (map[string]string, error) {
-	datastore := map[string]string{}
-
-	if opts.Type != "" {
-		datastore["type"] = opts.Type
-	}
-
-	if opts.Version != "" {
-		datastore["version"] = opts.Version
-	}
-
-	return datastore, nil
-}
-
-// CreateOpts is the struct responsible for configuring new configurations.
-type CreateOpts struct {
-	// [REQUIRED] The configuration group name
-	Name string
-
-	// [REQUIRED] A map of user-defined configuration settings that will define
-	// how each associated datastore works. Each key/value pair is specific to a
-	// datastore type.
-	Values map[string]interface{}
-
-	// [OPTIONAL] Associates the configuration group with a particular datastore.
-	Datastore *DatastoreOpts
-
-	// [OPTIONAL] A human-readable explanation for the group.
-	Description string
-}
-
-// ToConfigCreateMap casts a CreateOpts struct into a JSON map.
-func (opts CreateOpts) ToConfigCreateMap() (map[string]interface{}, error) {
-	if opts.Name == "" {
-		return nil, errors.New("Name is a required field")
-	}
-	if len(opts.Values) == 0 {
-		return nil, errors.New("Values must be a populated map")
-	}
-
-	config := map[string]interface{}{
-		"name":   opts.Name,
-		"values": opts.Values,
-	}
-
-	if opts.Datastore != nil {
-		ds, err := opts.Datastore.ToMap()
-		if err != nil {
-			return config, err
-		}
-		config["datastore"] = ds
-	}
-
-	if opts.Description != "" {
-		config["description"] = opts.Description
-	}
-
-	return map[string]interface{}{"configuration": config}, nil
-}
-
-// Create will create a new configuration group.
-func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult {
-	var res CreateResult
-
-	reqBody, err := opts.ToConfigCreateMap()
-	if err != nil {
-		res.Err = err
-		return res
-	}
-
-	_, res.Err = client.Request("POST", baseURL(client), gophercloud.RequestOpts{
-		OkCodes:      []int{200},
-		JSONBody:     &reqBody,
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
-
-// Get will retrieve the details for a specified configuration group.
-func Get(client *gophercloud.ServiceClient, configID string) GetResult {
-	var res GetResult
-
-	_, res.Err = client.Request("GET", resourceURL(client, configID), gophercloud.RequestOpts{
-		OkCodes:      []int{200},
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
-
-// UpdateOptsBuilder is the top-level interface for casting update options into
-// JSON maps.
-type UpdateOptsBuilder interface {
-	ToConfigUpdateMap() (map[string]interface{}, error)
-}
-
-// UpdateOpts is the struct responsible for modifying existing configurations.
-type UpdateOpts struct {
-	// [OPTIONAL] The configuration group name
-	Name string
-
-	// [OPTIONAL] A map of user-defined configuration settings that will define
-	// how each associated datastore works. Each key/value pair is specific to a
-	// datastore type.
-	Values map[string]interface{}
-
-	// [OPTIONAL] Associates the configuration group with a particular datastore.
-	Datastore *DatastoreOpts
-
-	// [OPTIONAL] A human-readable explanation for the group.
-	Description string
-}
-
-// ToConfigUpdateMap will cast an UpdateOpts struct into a JSON map.
-func (opts UpdateOpts) ToConfigUpdateMap() (map[string]interface{}, error) {
-	config := map[string]interface{}{}
-
-	if opts.Name != "" {
-		config["name"] = opts.Name
-	}
-
-	if opts.Description != "" {
-		config["description"] = opts.Description
-	}
-
-	if opts.Datastore != nil {
-		ds, err := opts.Datastore.ToMap()
-		if err != nil {
-			return config, err
-		}
-		config["datastore"] = ds
-	}
-
-	if len(opts.Values) > 0 {
-		config["values"] = opts.Values
-	}
-
-	return map[string]interface{}{"configuration": config}, nil
-}
-
-// Update will modify an existing configuration group by performing a merge
-// between new and existing values. If the key already exists, the new value
-// will overwrite. All other keys will remain unaffected.
-func Update(client *gophercloud.ServiceClient, configID string, opts UpdateOptsBuilder) UpdateResult {
-	var res UpdateResult
-
-	reqBody, err := opts.ToConfigUpdateMap()
-	if err != nil {
-		res.Err = err
-		return res
-	}
-
-	_, res.Err = client.Request("PATCH", resourceURL(client, configID), gophercloud.RequestOpts{
-		OkCodes:      []int{200},
-		JSONBody:     &reqBody,
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
-
-// Replace will modify an existing configuration group by overwriting the
-// entire parameter group with the new values provided. Any existing keys not
-// included in UpdateOptsBuilder will be deleted.
-func Replace(client *gophercloud.ServiceClient, configID string, opts UpdateOptsBuilder) ReplaceResult {
-	var res ReplaceResult
-
-	reqBody, err := opts.ToConfigUpdateMap()
-	if err != nil {
-		res.Err = err
-		return res
-	}
-
-	_, res.Err = client.Request("PUT", resourceURL(client, configID), gophercloud.RequestOpts{
-		OkCodes:      []int{202},
-		JSONBody:     &reqBody,
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
-
-// Delete will permanently delete a configuration group. Please note that
-// config groups cannot be deleted whilst still attached to running instances -
-// you must detach and then delete them.
-func Delete(client *gophercloud.ServiceClient, configID string) DeleteResult {
-	var res DeleteResult
-
-	_, res.Err = client.Request("DELETE", resourceURL(client, configID), gophercloud.RequestOpts{
-		OkCodes: []int{202},
-	})
-
-	return res
-}
-
-// ListInstances will list all the instances associated with a particular
-// configuration group.
-func ListInstances(client *gophercloud.ServiceClient, configID string) pagination.Pager {
-	pageFn := func(r pagination.PageResult) pagination.Page {
-		return instances.InstancePage{pagination.LinkedPageBase{PageResult: r}}
-	}
-	return pagination.NewPager(client, instancesURL(client, configID), pageFn)
-}
-
-// ListDatastoreParams will list all the available and supported parameters
-// that can be used for a particular datastore ID and a particular version.
-// For example, if you are wondering how you can configure a MySQL 5.6 instance,
-// you can use this operation (you will need to retrieve the MySQL datastore ID
-// by using the datastores API).
-func ListDatastoreParams(client *gophercloud.ServiceClient, datastoreID, versionID string) pagination.Pager {
-	pageFn := func(r pagination.PageResult) pagination.Page {
-		return ParamPage{pagination.SinglePageBase(r)}
-	}
-	return pagination.NewPager(client, listDSParamsURL(client, datastoreID, versionID), pageFn)
-}
-
-// GetDatastoreParam will retrieve information about a specific configuration
-// parameter. For example, you can use this operation to understand more about
-// "innodb_file_per_table" configuration param for MySQL datastores. You will
-// need the param's ID first, which can be attained by using the ListDatastoreParams
-// operation.
-func GetDatastoreParam(client *gophercloud.ServiceClient, datastoreID, versionID, paramID string) ParamResult {
-	var res ParamResult
-
-	_, res.Err = client.Request("GET", getDSParamURL(client, datastoreID, versionID, paramID), gophercloud.RequestOpts{
-		OkCodes:      []int{200},
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
-
-// ListGlobalParams is similar to ListDatastoreParams but does not require a
-// DatastoreID.
-func ListGlobalParams(client *gophercloud.ServiceClient, versionID string) pagination.Pager {
-	pageFn := func(r pagination.PageResult) pagination.Page {
-		return ParamPage{pagination.SinglePageBase(r)}
-	}
-	return pagination.NewPager(client, listGlobalParamsURL(client, versionID), pageFn)
-}
-
-// GetGlobalParam is similar to GetDatastoreParam but does not require a
-// DatastoreID.
-func GetGlobalParam(client *gophercloud.ServiceClient, versionID, paramID string) ParamResult {
-	var res ParamResult
-
-	_, res.Err = client.Request("GET", getGlobalParamURL(client, versionID, paramID), gophercloud.RequestOpts{
-		OkCodes:      []int{200},
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
diff --git a/rackspace/db/v1/configurations/requests_test.go b/rackspace/db/v1/configurations/requests_test.go
deleted file mode 100644
index f026be4..0000000
--- a/rackspace/db/v1/configurations/requests_test.go
+++ /dev/null
@@ -1,236 +0,0 @@
-package configurations
-
-import (
-	"testing"
-
-	"github.com/rackspace/gophercloud/pagination"
-	"github.com/rackspace/gophercloud/rackspace/db/v1/instances"
-	th "github.com/rackspace/gophercloud/testhelper"
-	fake "github.com/rackspace/gophercloud/testhelper/client"
-	"github.com/rackspace/gophercloud/testhelper/fixture"
-)
-
-var (
-	configID = "{configID}"
-	_baseURL = "/configurations"
-	resURL   = _baseURL + "/" + configID
-
-	dsID               = "{datastoreID}"
-	versionID          = "{versionID}"
-	paramID            = "{paramID}"
-	dsParamListURL     = "/datastores/" + dsID + "/versions/" + versionID + "/parameters"
-	dsParamGetURL      = "/datastores/" + dsID + "/versions/" + versionID + "/parameters/" + paramID
-	globalParamListURL = "/datastores/versions/" + versionID + "/parameters"
-	globalParamGetURL  = "/datastores/versions/" + versionID + "/parameters/" + paramID
-)
-
-func TestList(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, _baseURL, "GET", "", listConfigsJSON, 200)
-
-	count := 0
-	err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
-		count++
-		actual, err := ExtractConfigs(page)
-		th.AssertNoErr(t, err)
-
-		expected := []Config{exampleConfig}
-		th.AssertDeepEquals(t, expected, actual)
-
-		return true, nil
-	})
-
-	th.AssertEquals(t, 1, count)
-	th.AssertNoErr(t, err)
-}
-
-func TestGet(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL, "GET", "", getConfigJSON, 200)
-
-	config, err := Get(fake.ServiceClient(), configID).Extract()
-	th.AssertNoErr(t, err)
-	th.AssertDeepEquals(t, &exampleConfig, config)
-}
-
-func TestCreate(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, _baseURL, "POST", createReq, createConfigJSON, 201)
-
-	opts := CreateOpts{
-		Datastore: &DatastoreOpts{
-			Type:    "a00000a0-00a0-0a00-00a0-000a000000aa",
-			Version: "b00000b0-00b0-0b00-00b0-000b000000bb",
-		},
-		Description: "example description",
-		Name:        "example-configuration-name",
-		Values: map[string]interface{}{
-			"collation_server": "latin1_swedish_ci",
-			"connect_timeout":  120,
-		},
-	}
-
-	config, err := Create(fake.ServiceClient(), opts).Extract()
-	th.AssertNoErr(t, err)
-	th.AssertDeepEquals(t, &exampleConfigWithValues, config)
-}
-
-func TestUpdate(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL, "PATCH", updateReq, "", 200)
-
-	opts := UpdateOpts{
-		Values: map[string]interface{}{
-			"connect_timeout": 300,
-		},
-	}
-
-	err := Update(fake.ServiceClient(), configID, opts).ExtractErr()
-	th.AssertNoErr(t, err)
-}
-
-func TestReplace(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL, "PUT", updateReq, "", 202)
-
-	opts := UpdateOpts{
-		Values: map[string]interface{}{
-			"connect_timeout": 300,
-		},
-	}
-
-	err := Replace(fake.ServiceClient(), configID, opts).ExtractErr()
-	th.AssertNoErr(t, err)
-}
-
-func TestDelete(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL, "DELETE", "", "", 202)
-
-	err := Delete(fake.ServiceClient(), configID).ExtractErr()
-	th.AssertNoErr(t, err)
-}
-
-func TestListInstances(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL+"/instances", "GET", "", listInstancesJSON, 200)
-
-	expectedInstance := instances.Instance{
-		ID:   "d4603f69-ec7e-4e9b-803f-600b9205576f",
-		Name: "json_rack_instance",
-	}
-
-	pages := 0
-	err := ListInstances(fake.ServiceClient(), configID).EachPage(func(page pagination.Page) (bool, error) {
-		pages++
-
-		actual, err := instances.ExtractInstances(page)
-		if err != nil {
-			return false, err
-		}
-
-		th.AssertDeepEquals(t, actual, []instances.Instance{expectedInstance})
-
-		return true, nil
-	})
-
-	th.AssertNoErr(t, err)
-	th.AssertEquals(t, 1, pages)
-}
-
-func TestListDSParams(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, dsParamListURL, "GET", "", listParamsJSON, 200)
-
-	pages := 0
-	err := ListDatastoreParams(fake.ServiceClient(), dsID, versionID).EachPage(func(page pagination.Page) (bool, error) {
-		pages++
-
-		actual, err := ExtractParams(page)
-		if err != nil {
-			return false, err
-		}
-
-		expected := []Param{
-			Param{Max: 1, Min: 0, Name: "innodb_file_per_table", RestartRequired: true, Type: "integer"},
-			Param{Max: 4294967296, Min: 0, Name: "key_buffer_size", RestartRequired: false, Type: "integer"},
-			Param{Max: 65535, Min: 2, Name: "connect_timeout", RestartRequired: false, Type: "integer"},
-			Param{Max: 4294967296, Min: 0, Name: "join_buffer_size", RestartRequired: false, Type: "integer"},
-		}
-
-		th.AssertDeepEquals(t, actual, expected)
-
-		return true, nil
-	})
-
-	th.AssertNoErr(t, err)
-	th.AssertEquals(t, 1, pages)
-}
-
-func TestGetDSParam(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, dsParamGetURL, "GET", "", getParamJSON, 200)
-
-	param, err := GetDatastoreParam(fake.ServiceClient(), dsID, versionID, paramID).Extract()
-	th.AssertNoErr(t, err)
-
-	expected := &Param{
-		Max: 1, Min: 0, Name: "innodb_file_per_table", RestartRequired: true, Type: "integer",
-	}
-
-	th.AssertDeepEquals(t, expected, param)
-}
-
-func TestListGlobalParams(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, globalParamListURL, "GET", "", listParamsJSON, 200)
-
-	pages := 0
-	err := ListGlobalParams(fake.ServiceClient(), versionID).EachPage(func(page pagination.Page) (bool, error) {
-		pages++
-
-		actual, err := ExtractParams(page)
-		if err != nil {
-			return false, err
-		}
-
-		expected := []Param{
-			Param{Max: 1, Min: 0, Name: "innodb_file_per_table", RestartRequired: true, Type: "integer"},
-			Param{Max: 4294967296, Min: 0, Name: "key_buffer_size", RestartRequired: false, Type: "integer"},
-			Param{Max: 65535, Min: 2, Name: "connect_timeout", RestartRequired: false, Type: "integer"},
-			Param{Max: 4294967296, Min: 0, Name: "join_buffer_size", RestartRequired: false, Type: "integer"},
-		}
-
-		th.AssertDeepEquals(t, actual, expected)
-
-		return true, nil
-	})
-
-	th.AssertNoErr(t, err)
-	th.AssertEquals(t, 1, pages)
-}
-
-func TestGetGlobalParam(t *testing.T) {
-	th.SetupHTTP()
-	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, globalParamGetURL, "GET", "", getParamJSON, 200)
-
-	param, err := GetGlobalParam(fake.ServiceClient(), versionID, paramID).Extract()
-	th.AssertNoErr(t, err)
-
-	expected := &Param{
-		Max: 1, Min: 0, Name: "innodb_file_per_table", RestartRequired: true, Type: "integer",
-	}
-
-	th.AssertDeepEquals(t, expected, param)
-}
diff --git a/rackspace/db/v1/configurations/results.go b/rackspace/db/v1/configurations/results.go
deleted file mode 100644
index 98ce25f..0000000
--- a/rackspace/db/v1/configurations/results.go
+++ /dev/null
@@ -1,142 +0,0 @@
-package configurations
-
-import (
-	"github.com/mitchellh/mapstructure"
-	"github.com/rackspace/gophercloud"
-	"github.com/rackspace/gophercloud/pagination"
-)
-
-// Config represents a configuration group API resource.
-type Config struct {
-	Created              string
-	Updated              string
-	DatastoreName        string `mapstructure:"datastore_name"`
-	DatastoreVersionID   string `mapstructure:"datastore_version_id"`
-	DatastoreVersionName string `mapstructure:"datastore_version_name"`
-	Description          string
-	ID                   string
-	Name                 string
-	Values               map[string]interface{}
-}
-
-// ConfigPage contains a page of Config resources in a paginated collection.
-type ConfigPage struct {
-	pagination.SinglePageBase
-}
-
-// IsEmpty indicates whether a ConfigPage is empty.
-func (r ConfigPage) IsEmpty() (bool, error) {
-	is, err := ExtractConfigs(r)
-	if err != nil {
-		return true, err
-	}
-	return len(is) == 0, nil
-}
-
-// ExtractConfigs will retrieve a slice of Config structs from a page.
-func ExtractConfigs(page pagination.Page) ([]Config, error) {
-	casted := page.(ConfigPage).Body
-
-	var resp struct {
-		Configs []Config `mapstructure:"configurations" json:"configurations"`
-	}
-
-	err := mapstructure.Decode(casted, &resp)
-	return resp.Configs, err
-}
-
-type commonResult struct {
-	gophercloud.Result
-}
-
-// Extract will retrieve a Config resource from an operation result.
-func (r commonResult) Extract() (*Config, error) {
-	if r.Err != nil {
-		return nil, r.Err
-	}
-
-	var response struct {
-		Config Config `mapstructure:"configuration"`
-	}
-
-	err := mapstructure.Decode(r.Body, &response)
-	return &response.Config, err
-}
-
-// GetResult represents the result of a Get operation.
-type GetResult struct {
-	commonResult
-}
-
-// CreateResult represents the result of a Create operation.
-type CreateResult struct {
-	commonResult
-}
-
-// UpdateResult represents the result of an Update operation.
-type UpdateResult struct {
-	gophercloud.ErrResult
-}
-
-// ReplaceResult represents the result of a Replace operation.
-type ReplaceResult struct {
-	gophercloud.ErrResult
-}
-
-// DeleteResult represents the result of a Delete operation.
-type DeleteResult struct {
-	gophercloud.ErrResult
-}
-
-// Param represents a configuration parameter API resource.
-type Param struct {
-	Max             int
-	Min             int
-	Name            string
-	RestartRequired bool `mapstructure:"restart_required" json:"restart_required"`
-	Type            string
-}
-
-// ParamPage contains a page of Param resources in a paginated collection.
-type ParamPage struct {
-	pagination.SinglePageBase
-}
-
-// IsEmpty indicates whether a ParamPage is empty.
-func (r ParamPage) IsEmpty() (bool, error) {
-	is, err := ExtractParams(r)
-	if err != nil {
-		return true, err
-	}
-	return len(is) == 0, nil
-}
-
-// ExtractParams will retrieve a slice of Param structs from a page.
-func ExtractParams(page pagination.Page) ([]Param, error) {
-	casted := page.(ParamPage).Body
-
-	var resp struct {
-		Params []Param `mapstructure:"configuration-parameters" json:"configuration-parameters"`
-	}
-
-	err := mapstructure.Decode(casted, &resp)
-	return resp.Params, err
-}
-
-// ParamResult represents the result of an operation which retrieves details
-// about a particular configuration param.
-type ParamResult struct {
-	gophercloud.Result
-}
-
-// Extract will retrieve a param from an operation result.
-func (r ParamResult) Extract() (*Param, error) {
-	if r.Err != nil {
-		return nil, r.Err
-	}
-
-	var param Param
-
-	err := mapstructure.Decode(r.Body, &param)
-	return &param, err
-}
diff --git a/rackspace/db/v1/configurations/urls.go b/rackspace/db/v1/configurations/urls.go
deleted file mode 100644
index abea961..0000000
--- a/rackspace/db/v1/configurations/urls.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package configurations
-
-import "github.com/rackspace/gophercloud"
-
-func baseURL(c *gophercloud.ServiceClient) string {
-	return c.ServiceURL("configurations")
-}
-
-func resourceURL(c *gophercloud.ServiceClient, configID string) string {
-	return c.ServiceURL("configurations", configID)
-}
-
-func instancesURL(c *gophercloud.ServiceClient, configID string) string {
-	return c.ServiceURL("configurations", configID, "instances")
-}
-
-func listDSParamsURL(c *gophercloud.ServiceClient, datastoreID, versionID string) string {
-	return c.ServiceURL("datastores", datastoreID, "versions", versionID, "parameters")
-}
-
-func getDSParamURL(c *gophercloud.ServiceClient, datastoreID, versionID, paramID string) string {
-	return c.ServiceURL("datastores", datastoreID, "versions", versionID, "parameters", paramID)
-}
-
-func listGlobalParamsURL(c *gophercloud.ServiceClient, versionID string) string {
-	return c.ServiceURL("datastores", "versions", versionID, "parameters")
-}
-
-func getGlobalParamURL(c *gophercloud.ServiceClient, versionID, paramID string) string {
-	return c.ServiceURL("datastores", "versions", versionID, "parameters", paramID)
-}
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%
rename from rackspace/db/v1/datastores/requests_test.go
rename 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/datastores/requests.go b/rackspace/db/v1/datastores/requests.go
deleted file mode 100644
index 9e147ab..0000000
--- a/rackspace/db/v1/datastores/requests.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package datastores
-
-import (
-	"github.com/rackspace/gophercloud"
-	"github.com/rackspace/gophercloud/pagination"
-)
-
-// List will list all available datastore types that instances can use.
-func List(client *gophercloud.ServiceClient) pagination.Pager {
-	pageFn := func(r pagination.PageResult) pagination.Page {
-		return DatastorePage{pagination.SinglePageBase(r)}
-	}
-	return pagination.NewPager(client, baseURL(client), pageFn)
-}
-
-// Get will retrieve the details of a specified datastore type.
-func Get(client *gophercloud.ServiceClient, datastoreID string) GetResult {
-	var res GetResult
-
-	_, res.Err = client.Request("GET", resourceURL(client, datastoreID), gophercloud.RequestOpts{
-		OkCodes:      []int{200},
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
-
-// ListVersions will list all of the available versions for a specified
-// datastore type.
-func ListVersions(client *gophercloud.ServiceClient, datastoreID string) pagination.Pager {
-	pageFn := func(r pagination.PageResult) pagination.Page {
-		return VersionPage{pagination.SinglePageBase(r)}
-	}
-	return pagination.NewPager(client, versionsURL(client, datastoreID), pageFn)
-}
-
-// GetVersion will retrieve the details of a specified datastore version.
-func GetVersion(client *gophercloud.ServiceClient, datastoreID, versionID string) GetVersionResult {
-	var res GetVersionResult
-
-	_, res.Err = client.Request("GET", versionURL(client, datastoreID, versionID), gophercloud.RequestOpts{
-		OkCodes:      []int{200},
-		JSONResponse: &res.Body,
-	})
-
-	return res
-}
diff --git a/rackspace/db/v1/datastores/results.go b/rackspace/db/v1/datastores/results.go
deleted file mode 100644
index a86a3cc..0000000
--- a/rackspace/db/v1/datastores/results.go
+++ /dev/null
@@ -1,123 +0,0 @@
-package datastores
-
-import (
-	"github.com/mitchellh/mapstructure"
-	"github.com/rackspace/gophercloud"
-	"github.com/rackspace/gophercloud/pagination"
-)
-
-// Version represents a version API resource. Multiple versions belong to a Datastore.
-type Version struct {
-	ID    string
-	Links []gophercloud.Link
-	Name  string
-}
-
-// Datastore represents a Datastore API resource.
-type Datastore struct {
-	DefaultVersion string `json:"default_version" mapstructure:"default_version"`
-	ID             string
-	Links          []gophercloud.Link
-	Name           string
-	Versions       []Version
-}
-
-// DatastorePartial is a meta structure which is used in various API responses.
-// It is a lightweight and truncated version of a full Datastore resource,
-// offering details of the Version, Type and VersionID only.
-type DatastorePartial struct {
-	Version   string
-	Type      string
-	VersionID string `json:"version_id" mapstructure:"version_id"`
-}
-
-// GetResult represents the result of a Get operation.
-type GetResult struct {
-	gophercloud.Result
-}
-
-// GetVersionResult represents the result of getting a version.
-type GetVersionResult struct {
-	gophercloud.Result
-}
-
-// DatastorePage represents a page of datastore resources.
-type DatastorePage struct {
-	pagination.SinglePageBase
-}
-
-// IsEmpty indicates whether a Datastore collection is empty.
-func (r DatastorePage) IsEmpty() (bool, error) {
-	is, err := ExtractDatastores(r)
-	if err != nil {
-		return true, err
-	}
-	return len(is) == 0, nil
-}
-
-// ExtractDatastores retrieves a slice of datastore structs from a paginated
-// collection.
-func ExtractDatastores(page pagination.Page) ([]Datastore, error) {
-	casted := page.(DatastorePage).Body
-
-	var resp struct {
-		Datastores []Datastore `mapstructure:"datastores" json:"datastores"`
-	}
-
-	err := mapstructure.Decode(casted, &resp)
-	return resp.Datastores, err
-}
-
-// Extract retrieves a single Datastore struct from an operation result.
-func (r GetResult) Extract() (*Datastore, error) {
-	if r.Err != nil {
-		return nil, r.Err
-	}
-
-	var response struct {
-		Datastore Datastore `mapstructure:"datastore"`
-	}
-
-	err := mapstructure.Decode(r.Body, &response)
-	return &response.Datastore, err
-}
-
-// DatastorePage represents a page of version resources.
-type VersionPage struct {
-	pagination.SinglePageBase
-}
-
-// IsEmpty indicates whether a collection of version resources is empty.
-func (r VersionPage) IsEmpty() (bool, error) {
-	is, err := ExtractVersions(r)
-	if err != nil {
-		return true, err
-	}
-	return len(is) == 0, nil
-}
-
-// ExtractVersions retrieves a slice of versions from a paginated collection.
-func ExtractVersions(page pagination.Page) ([]Version, error) {
-	casted := page.(VersionPage).Body
-
-	var resp struct {
-		Versions []Version `mapstructure:"versions" json:"versions"`
-	}
-
-	err := mapstructure.Decode(casted, &resp)
-	return resp.Versions, err
-}
-
-// Extract retrieves a single Version struct from an operation result.
-func (r GetVersionResult) Extract() (*Version, error) {
-	if r.Err != nil {
-		return nil, r.Err
-	}
-
-	var response struct {
-		Version Version `mapstructure:"version"`
-	}
-
-	err := mapstructure.Decode(r.Body, &response)
-	return &response.Version, err
-}
diff --git a/rackspace/db/v1/datastores/urls.go b/rackspace/db/v1/datastores/urls.go
deleted file mode 100644
index c4d5248..0000000
--- a/rackspace/db/v1/datastores/urls.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package datastores
-
-import "github.com/rackspace/gophercloud"
-
-func baseURL(c *gophercloud.ServiceClient) string {
-	return c.ServiceURL("datastores")
-}
-
-func resourceURL(c *gophercloud.ServiceClient, dsID string) string {
-	return c.ServiceURL("datastores", dsID)
-}
-
-func versionsURL(c *gophercloud.ServiceClient, dsID string) string {
-	return c.ServiceURL("datastores", dsID, "versions")
-}
-
-func versionURL(c *gophercloud.ServiceClient, dsID, versionID string) string {
-	return c.ServiceURL("datastores", dsID, "versions", versionID)
-}
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",
 	}
