diff --git a/rackspace/blockstorage/snapshots/delegate_test.go b/rackspace/blockstorage/snapshots/delegate_test.go
deleted file mode 100644
index 1e77fbd..0000000
--- a/rackspace/blockstorage/snapshots/delegate_test.go
+++ /dev/null
@@ -1 +0,0 @@
-package snapshots
diff --git a/rackspace/blockstorage/snapshots/results.go b/rackspace/blockstorage/snapshots/results.go
index 5fc4986..c2c608e 100644
--- a/rackspace/blockstorage/snapshots/results.go
+++ b/rackspace/blockstorage/snapshots/results.go
@@ -3,6 +3,8 @@
 import (
 	"github.com/rackspace/gophercloud"
 	os "github.com/rackspace/gophercloud/openstack/blockstorage/v1/snapshots"
+
+	"github.com/mitchellh/mapstructure"
 )
 
 // Status is the type used to represent a snapshot's status
@@ -66,3 +68,18 @@
 	Common os.GetResult
 	commonResult
 }
+
+// Extract will get the Snapshot object out of the commonResult object.
+func (r commonResult) Extract() (*Snapshot, error) {
+	if r.Err != nil {
+		return nil, r.Err
+	}
+
+	var res struct {
+		Snapshot *Snapshot `json:"snapshot"`
+	}
+
+	err := mapstructure.Decode(r.Resp, &res)
+
+	return res.Snapshot, err
+}
diff --git a/rackspace/blockstorage/snapshots/delegate.go b/rackspace/blockstorage/v1/snapshots/delegate.go
similarity index 95%
rename from rackspace/blockstorage/snapshots/delegate.go
rename to rackspace/blockstorage/v1/snapshots/delegate.go
index b835136..fa87360 100644
--- a/rackspace/blockstorage/snapshots/delegate.go
+++ b/rackspace/blockstorage/v1/snapshots/delegate.go
@@ -57,7 +57,7 @@
 // extract the Snapshot object from the response, call the Extract method on the
 // CreateResult.
 func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult {
-	return CreateResult{Common: os.Create(client, opts)}
+	return CreateResult{os.Create(client, opts)}
 }
 
 // Delete will delete the existing Snapshot with the provided ID.
@@ -68,7 +68,7 @@
 // Get retrieves the Snapshot with the provided ID. To extract the Snapshot
 // object from the response, call the Extract method on the GetResult.
 func Get(client *gophercloud.ServiceClient, id string) GetResult {
-	return GetResult{Common: os.Get(client, id)}
+	return GetResult{os.Get(client, id)}
 }
 
 // List returns Snapshots.
diff --git a/rackspace/blockstorage/v1/snapshots/delegate_test.go b/rackspace/blockstorage/v1/snapshots/delegate_test.go
new file mode 100644
index 0000000..45ab0ac
--- /dev/null
+++ b/rackspace/blockstorage/v1/snapshots/delegate_test.go
@@ -0,0 +1,85 @@
+package snapshots
+
+import (
+	"testing"
+
+	os "github.com/rackspace/gophercloud/openstack/blockstorage/v1/snapshots"
+	"github.com/rackspace/gophercloud/pagination"
+	th "github.com/rackspace/gophercloud/testhelper"
+	fake "github.com/rackspace/gophercloud/testhelper/client"
+)
+
+func TestList(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	os.MockListResponse(t)
+
+	count := 0
+
+	List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
+		count++
+		actual, err := ExtractSnapshots(page)
+		if err != nil {
+			t.Errorf("Failed to extract snapshots: %v", err)
+			return false, err
+		}
+
+		expected := []Snapshot{
+			Snapshot{
+				ID:   "289da7f8-6440-407c-9fb4-7db01ec49164",
+				Name: "snapshot-001",
+			},
+			Snapshot{
+				ID:   "96c3bda7-c82a-4f50-be73-ca7621794835",
+				Name: "snapshot-002",
+			},
+		}
+
+		th.CheckDeepEquals(t, expected, actual)
+
+		return true, nil
+	})
+
+	if count != 1 {
+		t.Errorf("Expected 1 page, got %d", count)
+	}
+}
+
+func TestGet(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	os.MockGetResponse(t)
+
+	v, err := Get(fake.ServiceClient(), "d32019d3-bc6e-4319-9c1d-6722fc136a22").Extract()
+	th.AssertNoErr(t, err)
+
+	th.AssertEquals(t, v.Name, "snapshot-001")
+	th.AssertEquals(t, v.ID, "d32019d3-bc6e-4319-9c1d-6722fc136a22")
+}
+
+func TestCreate(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	os.MockCreateResponse(t)
+
+	options := &CreateOpts{VolumeID: "1234", Name: "snapshot-001"}
+	n, err := Create(fake.ServiceClient(), options).Extract()
+	th.AssertNoErr(t, err)
+
+	th.AssertEquals(t, n.VolumeID, "1234")
+	th.AssertEquals(t, n.Name, "snapshot-001")
+	th.AssertEquals(t, n.ID, "d32019d3-bc6e-4319-9c1d-6722fc136a22")
+}
+
+func TestDelete(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	os.MockDeleteResponse(t)
+
+	err := Delete(fake.ServiceClient(), "d32019d3-bc6e-4319-9c1d-6722fc136a22")
+	th.AssertNoErr(t, err)
+}
diff --git a/rackspace/blockstorage/v1/snapshots/results.go b/rackspace/blockstorage/v1/snapshots/results.go
new file mode 100644
index 0000000..b35e719
--- /dev/null
+++ b/rackspace/blockstorage/v1/snapshots/results.go
@@ -0,0 +1,103 @@
+package snapshots
+
+import (
+	"github.com/rackspace/gophercloud"
+	os "github.com/rackspace/gophercloud/openstack/blockstorage/v1/snapshots"
+	"github.com/rackspace/gophercloud/pagination"
+
+	"github.com/mitchellh/mapstructure"
+)
+
+// Status is the type used to represent a snapshot's status
+type Status string
+
+// Constants to use for supported statuses
+const (
+	Creating    Status = "CREATING"
+	Available   Status = "AVAILABLE"
+	Deleting    Status = "DELETING"
+	Error       Status = "ERROR"
+	DeleteError Status = "ERROR_DELETING"
+)
+
+// Snapshot is the Rackspace representation of an external block storage device.
+type Snapshot struct {
+	// The timestamp when this snapshot was created.
+	CreatedAt string `mapstructure:"created_at"`
+
+	// The human-readable description for this snapshot.
+	Description string `mapstructure:"display_description"`
+
+	// The human-readable name for this snapshot.
+	Name string `mapstructure:"display_name"`
+
+	// The UUID for this snapshot.
+	ID string `mapstructure:"id"`
+
+	// The random metadata associated with this snapshot. Note: unlike standard
+	// OpenStack snapshots, this cannot actually be set.
+	Metadata map[string]string `mapstructure:"metadata"`
+
+	// Indicates the current progress of the snapshot's backup procedure.
+	Progress string `mapstructure:"os-extended-snapshot-attributes:progress"`
+
+	// The project ID.
+	ProjectID string `mapstructure:"os-extended-snapshot-attributes:project_id"`
+
+	// The size of the volume which this snapshot backs up.
+	Size int `mapstructure:"size"`
+
+	// The status of the snapshot.
+	Status Status `mapstructure:"status"`
+
+	// The ID of the volume which this snapshot seeks to back up.
+	VolumeID string `mapstructure:"volume_id"`
+}
+
+type commonResult struct {
+	gophercloud.CommonResult
+}
+
+// CreateResult represents the result of a create operation
+type CreateResult struct {
+	os.CreateResult
+}
+
+// GetResult represents the result of a get operation
+type GetResult struct {
+	os.GetResult
+}
+
+func commonExtract(resp map[string]interface{}, err error) (*Snapshot, error) {
+	if err != nil {
+		return nil, err
+	}
+
+	var respStruct struct {
+		Snapshot *Snapshot `json:"snapshot"`
+	}
+
+	err = mapstructure.Decode(resp, &respStruct)
+
+	return respStruct.Snapshot, err
+}
+
+// Extract will get the Snapshot object out of the GetResult object.
+func (r GetResult) Extract() (*Snapshot, error) {
+	return commonExtract(r.Resp, r.Err)
+}
+
+// Extract will get the Snapshot object out of the CreateResult object.
+func (r CreateResult) Extract() (*Snapshot, error) {
+	return commonExtract(r.Resp, r.Err)
+}
+
+// ExtractSnapshots extracts and returns Snapshots. It is used while iterating over a snapshots.List call.
+func ExtractSnapshots(page pagination.Page) ([]Snapshot, error) {
+	var response struct {
+		Snapshots []Snapshot `json:"snapshots"`
+	}
+
+	err := mapstructure.Decode(page.(os.ListResult).Body, &response)
+	return response.Snapshots, err
+}
