diff --git a/rackspace/db/v1/flavors/delegate.go b/rackspace/db/v1/flavors/delegate.go
new file mode 100644
index 0000000..0d50f55
--- /dev/null
+++ b/rackspace/db/v1/flavors/delegate.go
@@ -0,0 +1,15 @@
+package flavors
+
+import (
+	"github.com/rackspace/gophercloud"
+	os "github.com/rackspace/gophercloud/openstack/db/v1/flavors"
+	"github.com/rackspace/gophercloud/pagination"
+)
+
+func List(client *gophercloud.ServiceClient) pagination.Pager {
+	return os.List(client)
+}
+
+func Get(client *gophercloud.ServiceClient, flavorID string) os.GetResult {
+	return os.Get(client, flavorID)
+}
diff --git a/rackspace/db/v1/flavors/delegate_test.go b/rackspace/db/v1/flavors/delegate_test.go
new file mode 100644
index 0000000..5c67d55
--- /dev/null
+++ b/rackspace/db/v1/flavors/delegate_test.go
@@ -0,0 +1,97 @@
+package flavors
+
+import (
+	"testing"
+
+	"github.com/rackspace/gophercloud"
+	os "github.com/rackspace/gophercloud/openstack/db/v1/flavors"
+	"github.com/rackspace/gophercloud/pagination"
+	th "github.com/rackspace/gophercloud/testhelper"
+	fake "github.com/rackspace/gophercloud/testhelper/client"
+)
+
+func TestListFlavors(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	os.HandleListFlavorsSuccessfully(t)
+
+	pages := 0
+	err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
+		pages++
+
+		actual, err := os.ExtractFlavors(page)
+		if err != nil {
+			return false, err
+		}
+
+		expected := []os.Flavor{
+			os.Flavor{
+				ID:   1,
+				Name: "m1.tiny",
+				RAM:  512,
+				Links: []gophercloud.Link{
+					gophercloud.Link{Href: "https://openstack.example.com/v1.0/1234/flavors/1", Rel: "self"},
+					gophercloud.Link{Href: "https://openstack.example.com/flavors/1", Rel: "bookmark"},
+				},
+			},
+			os.Flavor{
+				ID:   2,
+				Name: "m1.small",
+				RAM:  1024,
+				Links: []gophercloud.Link{
+					gophercloud.Link{Href: "https://openstack.example.com/v1.0/1234/flavors/2", Rel: "self"},
+					gophercloud.Link{Href: "https://openstack.example.com/flavors/2", Rel: "bookmark"},
+				},
+			},
+			os.Flavor{
+				ID:   3,
+				Name: "m1.medium",
+				RAM:  2048,
+				Links: []gophercloud.Link{
+					gophercloud.Link{Href: "https://openstack.example.com/v1.0/1234/flavors/3", Rel: "self"},
+					gophercloud.Link{Href: "https://openstack.example.com/flavors/3", Rel: "bookmark"},
+				},
+			},
+			os.Flavor{
+				ID:   4,
+				Name: "m1.large",
+				RAM:  4096,
+				Links: []gophercloud.Link{
+					gophercloud.Link{Href: "https://openstack.example.com/v1.0/1234/flavors/4", Rel: "self"},
+					gophercloud.Link{Href: "https://openstack.example.com/flavors/4", Rel: "bookmark"},
+				},
+			},
+		}
+
+		th.AssertDeepEquals(t, expected, actual)
+
+		return true, nil
+	})
+
+	th.AssertNoErr(t, err)
+	if pages != 1 {
+		t.Errorf("Expected one page, got %d", pages)
+	}
+}
+
+func TestGetFlavor(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	os.HandleGetFlavorSuccessfully(t, "12345")
+
+	actual, err := Get(fake.ServiceClient(), "12345").Extract()
+	th.AssertNoErr(t, err)
+
+	expected := &os.Flavor{
+		ID:   1,
+		Name: "m1.tiny",
+		RAM:  512,
+		Links: []gophercloud.Link{
+			gophercloud.Link{Href: "https://openstack.example.com/v1.0/1234/flavors/1", Rel: "self"},
+		},
+	}
+
+	th.AssertDeepEquals(t, expected, actual)
+}
