diff --git a/acceptance/openstack/compute/tools_test.go b/acceptance/openstack/compute/tools_test.go
index 0469053..5140caf 100644
--- a/acceptance/openstack/compute/tools_test.go
+++ b/acceptance/openstack/compute/tools_test.go
@@ -6,7 +6,7 @@
 	"crypto/rand"
 	"fmt"
 	"github.com/rackspace/gophercloud/openstack/compute/servers"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"github.com/rackspace/gophercloud/openstack/utils"
 	"os"
 	"text/tabwriter"
@@ -16,21 +16,21 @@
 var errTimeout = fmt.Errorf("Timeout.")
 
 type testState struct {
-	o             identity.AuthOptions
-	a             identity.AuthResults
-	sc            *identity.ServiceCatalog
-	eps           []identity.Endpoint
-	w             *tabwriter.Writer
-	imageId       string
-	flavorId      string
-	region        string
-	ep            string
-	client        *servers.Client
-	createdServer *servers.Server
-	gottenServer  *servers.Server
-	updatedServer *servers.Server
-	serverName    string
-	alternateName string
+	o              identity.AuthOptions
+	a              identity.AuthResults
+	sc             *identity.ServiceCatalog
+	eps            []identity.Endpoint
+	w              *tabwriter.Writer
+	imageId        string
+	flavorId       string
+	region         string
+	ep             string
+	client         *servers.Client
+	createdServer  *servers.Server
+	gottenServer   *servers.Server
+	updatedServer  *servers.Server
+	serverName     string
+	alternateName  string
 	flavorIdResize string
 }
 
@@ -240,48 +240,48 @@
 }
 
 func MakeNewPassword(oldPass string) string {
-	fmt.Println("Current password: "+oldPass)
+	fmt.Println("Current password: " + oldPass)
 	randomPassword := RandomString("", 16)
 	for randomPassword == oldPass {
 		randomPassword = RandomString("", 16)
 	}
-	fmt.Println("    New password: "+randomPassword)
+	fmt.Println("    New password: " + randomPassword)
 	return randomPassword
 }
 
 func ChangeAdminPassword(ts *testState) error {
 	randomPassword := MakeNewPassword(ts.createdServer.AdminPass)
-	
+
 	err := servers.ChangeAdminPassword(ts.client, ts.createdServer.Id, randomPassword)
 	if err != nil {
 		return err
 	}
-	
+
 	err = WaitForStatus(ts, "PASSWORD")
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func RebootServer(ts *testState) error {
-	fmt.Println("Attempting reboot of server "+ts.createdServer.Id)
+	fmt.Println("Attempting reboot of server " + ts.createdServer.Id)
 	err := servers.Reboot(ts.client, ts.createdServer.Id, servers.OSReboot)
 	if err != nil {
 		return err
 	}
-	
+
 	err = WaitForStatus(ts, "REBOOT")
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func RebuildServer(ts *testState) error {
-	fmt.Println("Attempting to rebuild server "+ts.createdServer.Id)
+	fmt.Println("Attempting to rebuild server " + ts.createdServer.Id)
 
 	newPassword := MakeNewPassword(ts.createdServer.AdminPass)
 	newName := RandomString("ACPTTEST", 16)
@@ -289,7 +289,7 @@
 	if err != nil {
 		return err
 	}
-	
+
 	s, err := servers.GetServer(sr)
 	if err != nil {
 		return err
@@ -302,12 +302,12 @@
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func ResizeServer(ts *testState) error {
-	fmt.Println("Attempting to resize server "+ts.createdServer.Id)
+	fmt.Println("Attempting to resize server " + ts.createdServer.Id)
 
 	err := servers.Resize(ts.client, ts.createdServer.Id, ts.flavorIdResize)
 	if err != nil {
@@ -323,19 +323,19 @@
 }
 
 func ConfirmResize(ts *testState) error {
-	fmt.Println("Attempting to confirm resize for server "+ts.createdServer.Id)
-	
+	fmt.Println("Attempting to confirm resize for server " + ts.createdServer.Id)
+
 	err := servers.ConfirmResize(ts.client, ts.createdServer.Id)
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func RevertResize(ts *testState) error {
-	fmt.Println("Attempting to revert resize for server "+ts.createdServer.Id)
-	
+	fmt.Println("Attempting to revert resize for server " + ts.createdServer.Id)
+
 	err := servers.RevertResize(ts.client, ts.createdServer.Id)
 	if err != nil {
 		return err
diff --git a/acceptance/openstack/identity_test.go b/acceptance/openstack/identity_test.go
index 02f86ad..f9c26ae 100644
--- a/acceptance/openstack/identity_test.go
+++ b/acceptance/openstack/identity_test.go
@@ -4,7 +4,7 @@
 
 import (
 	"fmt"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"github.com/rackspace/gophercloud/openstack/utils"
 	"os"
 	"testing"
diff --git a/acceptance/openstack/storage_test.go b/acceptance/openstack/storage_test.go
index 9792335..5c835cf 100644
--- a/acceptance/openstack/storage_test.go
+++ b/acceptance/openstack/storage_test.go
@@ -4,94 +4,103 @@
 
 import (
 	"bytes"
+	"github.com/rackspace/gophercloud/acceptance/tools"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	storage "github.com/rackspace/gophercloud/openstack/storage/v1"
 	"github.com/rackspace/gophercloud/openstack/storage/v1/accounts"
 	"github.com/rackspace/gophercloud/openstack/storage/v1/containers"
 	"github.com/rackspace/gophercloud/openstack/storage/v1/objects"
-	"os"
+	"github.com/rackspace/gophercloud/openstack/utils"
 	"strings"
 	"testing"
-	"github.com/rackspace/gophercloud/acceptance/tools"
 )
 
-var objectStorage = "object-store"
 var metadata = map[string]string{"gopher": "cloud"}
 var numContainers = 2
 var numObjects = 2
 
+func newClient() (*storage.Client, error) {
+	ao, err := utils.AuthOptions()
+	if err != nil {
+		return nil, err
+	}
+
+	client, err := ao.NewClient(identity.ClientOpts{
+		Type: "object-store",
+	})
+	if err != nil {
+		return nil, err
+	}
+
+	return storage.NewClient(client.Endpoint, client.Authority, client.Options), nil
+}
+
 func TestAccount(t *testing.T) {
-	ts, err := tools.SetupForList(objectStorage)
+	client, err := newClient()
 	if err != nil {
 		t.Error(err)
 		return
 	}
 
-	region := os.Getenv("OS_REGION_NAME")
-	for _, ep := range ts.EPs {
-		if (region != "") && (region != ep.Region) {
-			continue
+	err = accounts.Update(client, accounts.UpdateOpts{
+		Metadata: metadata,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	defer func() {
+		tempMap := make(map[string]string)
+		for k := range metadata {
+			tempMap[k] = ""
 		}
-
-		client := storage.NewClient(ep.PublicURL, ts.A, ts.O)
-
-		err := accounts.Update(client, accounts.UpdateOpts{
-			Metadata: metadata,
+		err = accounts.Update(client, accounts.UpdateOpts{
+			Metadata: tempMap,
 		})
 		if err != nil {
 			t.Error(err)
 			return
 		}
-		defer func() {
-			tempMap := make(map[string]string)
-			for k := range metadata {
-				tempMap[k] = ""
-			}
-			err = accounts.Update(client, accounts.UpdateOpts{
-				Metadata: tempMap,
-			})
-			if err != nil {
-				t.Error(err)
-				return
-			}
-		}()
+	}()
 
-		gr, err := accounts.Get(client, accounts.GetOpts{})
-		if err != nil {
-			t.Error(err)
+	gr, err := accounts.Get(client, accounts.GetOpts{})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	am := accounts.ExtractMetadata(gr)
+	for k := range metadata {
+		if am[k] != metadata[strings.Title(k)] {
+			t.Errorf("Expected custom metadata with key: %s", k)
 			return
 		}
-		am := accounts.ExtractMetadata(gr)
-		for k := range metadata {
-			if am[k] != metadata[strings.Title(k)] {
-				t.Errorf("Expected custom metadata with key: %s", k)
-				return
-			}
-		}
 	}
 }
 
 func TestContainers(t *testing.T) {
-	ts, err := tools.SetupForList(objectStorage)
+	client, err := newClient()
 	if err != nil {
 		t.Error(err)
 		return
 	}
 
-	region := os.Getenv("OS_REGION_NAME")
-	for _, ep := range ts.EPs {
-		if (region != "") && (region != ep.Region) {
-			continue
+	cNames := make([]string, numContainers)
+	for i := 0; i < numContainers; i++ {
+		cNames[i] = tools.RandomString("test-container-", 8)
+	}
+
+	for i := 0; i < len(cNames); i++ {
+		_, err := containers.Create(client, containers.CreateOpts{
+			Name: cNames[i],
+		})
+		if err != nil {
+			t.Error(err)
+			return
 		}
-
-		client := storage.NewClient(ep.PublicURL, ts.A, ts.O)
-
-		cNames := make([]string, numContainers)
-		for i := 0; i < numContainers; i++ {
-			cNames[i] = tools.RandomString("test-container-", 8)
-		}
-
+	}
+	defer func() {
 		for i := 0; i < len(cNames); i++ {
-			_, err := containers.Create(client, containers.CreateOpts{
+			err = containers.Delete(client, containers.DeleteOpts{
 				Name: cNames[i],
 			})
 			if err != nil {
@@ -99,264 +108,243 @@
 				return
 			}
 		}
-		defer func() {
-			for i := 0; i < len(cNames); i++ {
-				err = containers.Delete(client, containers.DeleteOpts{
-					Name: cNames[i],
-				})
-				if err != nil {
-					t.Error(err)
-					return
-				}
-			}
-		}()
+	}()
 
-		lr, err := containers.List(client, containers.ListOpts{
-			Full: false,
-		})
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		cns, err := containers.ExtractNames(lr)
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		if len(cns) != len(cNames) {
-			t.Errorf("Expected %d names and got %d", len(cNames), len(cns))
-			return
-		}
+	lr, err := containers.List(client, containers.ListOpts{
+		Full: false,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	cns, err := containers.ExtractNames(lr)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	if len(cns) != len(cNames) {
+		t.Errorf("Expected %d names and got %d", len(cNames), len(cns))
+		return
+	}
 
-		lr, err = containers.List(client, containers.ListOpts{
-			Full: true,
-		})
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		cis, err := containers.ExtractInfo(lr)
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		if len(cis) != len(cNames) {
-			t.Errorf("Expected %d containers and got %d", len(cNames), len(cis))
-			return
-		}
+	lr, err = containers.List(client, containers.ListOpts{
+		Full: true,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	cis, err := containers.ExtractInfo(lr)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	if len(cis) != len(cNames) {
+		t.Errorf("Expected %d containers and got %d", len(cNames), len(cis))
+		return
+	}
 
+	err = containers.Update(client, containers.UpdateOpts{
+		Name:     cNames[0],
+		Metadata: metadata,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	defer func() {
+		tempMap := make(map[string]string)
+		for k := range metadata {
+			tempMap[k] = ""
+		}
 		err = containers.Update(client, containers.UpdateOpts{
 			Name:     cNames[0],
-			Metadata: metadata,
+			Metadata: tempMap,
 		})
 		if err != nil {
 			t.Error(err)
 			return
 		}
-		defer func() {
-			tempMap := make(map[string]string)
-			for k := range metadata {
-				tempMap[k] = ""
-			}
-			err = containers.Update(client, containers.UpdateOpts{
-				Name:     cNames[0],
-				Metadata: tempMap,
-			})
-			if err != nil {
-				t.Error(err)
-				return
-			}
-		}()
+	}()
 
-		gr, err := containers.Get(client, containers.GetOpts{})
-		if err != nil {
-			t.Error(err)
+	gr, err := containers.Get(client, containers.GetOpts{})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	cm := containers.ExtractMetadata(gr)
+	for k := range metadata {
+		if cm[k] != metadata[strings.Title(k)] {
+			t.Errorf("Expected custom metadata with key: %s", k)
 			return
 		}
-		cm := containers.ExtractMetadata(gr)
-		for k := range metadata {
-			if cm[k] != metadata[strings.Title(k)] {
-				t.Errorf("Expected custom metadata with key: %s", k)
-				return
-			}
-		}
 	}
 }
 
 func TestObjects(t *testing.T) {
-	ts, err := tools.SetupForList(objectStorage)
+	client, err := newClient()
 	if err != nil {
 		t.Error(err)
 		return
 	}
 
-	region := os.Getenv("OS_REGION_NAME")
+	oNames := make([]string, numObjects)
+	for i := 0; i < len(oNames); i++ {
+		oNames[i] = tools.RandomString("test-object-", 8)
+	}
 
-	for _, ep := range ts.EPs {
-		if (region != "") && (region != ep.Region) {
-			continue
-		}
-
-		client := storage.NewClient(ep.PublicURL, ts.A, ts.O)
-
-		oNames := make([]string, numObjects)
-		for i := 0; i < len(oNames); i++ {
-			oNames[i] = tools.RandomString("test-object-", 8)
-		}
-
-		cName := tools.RandomString("test-container-", 8)
-		_, err := containers.Create(client, containers.CreateOpts{
+	cName := tools.RandomString("test-container-", 8)
+	_, err = containers.Create(client, containers.CreateOpts{
+		Name: cName,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	defer func() {
+		err = containers.Delete(client, containers.DeleteOpts{
 			Name: cName,
 		})
 		if err != nil {
 			t.Error(err)
 			return
 		}
-		defer func() {
-			err = containers.Delete(client, containers.DeleteOpts{
-				Name: cName,
-			})
-			if err != nil {
-				t.Error(err)
-				return
-			}
-		}()
+	}()
 
-		oContents := make([]*bytes.Buffer, numObjects)
+	oContents := make([]*bytes.Buffer, numObjects)
+	for i := 0; i < numObjects; i++ {
+		oContents[i] = bytes.NewBuffer([]byte(tools.RandomString("", 10)))
+		err = objects.Create(client, objects.CreateOpts{
+			Container: cName,
+			Name:      oNames[i],
+			Content:   oContents[i],
+		})
+		if err != nil {
+			t.Error(err)
+			return
+		}
+	}
+	defer func() {
 		for i := 0; i < numObjects; i++ {
-			oContents[i] = bytes.NewBuffer([]byte(tools.RandomString("", 10)))
-			err = objects.Create(client, objects.CreateOpts{
+			err = objects.Delete(client, objects.DeleteOpts{
 				Container: cName,
 				Name:      oNames[i],
-				Content:   oContents[i],
 			})
-			if err != nil {
-				t.Error(err)
-				return
-			}
 		}
-		defer func() {
-			for i := 0; i < numObjects; i++ {
-				err = objects.Delete(client, objects.DeleteOpts{
-					Container: cName,
-					Name:      oNames[i],
-				})
-			}
-		}()
+	}()
 
-		lr, err := objects.List(client, objects.ListOpts{
-			Full:      false,
-			Container: cName,
-		})
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		ons, err := objects.ExtractNames(lr)
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		if len(ons) != len(oNames) {
-			t.Errorf("Expected %d names and got %d", len(oNames), len(ons))
-			return
-		}
+	lr, err := objects.List(client, objects.ListOpts{
+		Full:      false,
+		Container: cName,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	ons, err := objects.ExtractNames(lr)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	if len(ons) != len(oNames) {
+		t.Errorf("Expected %d names and got %d", len(oNames), len(ons))
+		return
+	}
 
-		lr, err = objects.List(client, objects.ListOpts{
-			Full:      true,
-			Container: cName,
-		})
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		ois, err := objects.ExtractInfo(lr)
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		if len(ois) != len(oNames) {
-			t.Errorf("Expected %d containers and got %d", len(oNames), len(ois))
-			return
-		}
+	lr, err = objects.List(client, objects.ListOpts{
+		Full:      true,
+		Container: cName,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	ois, err := objects.ExtractInfo(lr)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	if len(ois) != len(oNames) {
+		t.Errorf("Expected %d containers and got %d", len(oNames), len(ois))
+		return
+	}
 
-		err = objects.Copy(client, objects.CopyOpts{
-			Container:    cName,
-			Name:         oNames[0],
-			NewContainer: cName,
-			NewName:      oNames[1],
-		})
-		if err != nil {
-			t.Error(err)
-			return
-		}
+	err = objects.Copy(client, objects.CopyOpts{
+		Container:    cName,
+		Name:         oNames[0],
+		NewContainer: cName,
+		NewName:      oNames[1],
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
 
-		dr, err := objects.Download(client, objects.DownloadOpts{
-			Container: cName,
-			Name:      oNames[1],
-		})
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		o2Content, err := objects.ExtractContent(dr)
-		if err != nil {
-			t.Error(err)
-		}
-		dr, err = objects.Download(client, objects.DownloadOpts{
-			Container: cName,
-			Name:      oNames[0],
-		})
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		o1Content, err := objects.ExtractContent(dr)
-		if err != nil {
-			t.Error(err)
-			return
-		}
-		if string(o2Content) != string(o1Content) {
-			t.Errorf("Copy failed. Expected\n%s\nand got\n%s", string(o1Content), string(o2Content))
-			return
-		}
+	dr, err := objects.Download(client, objects.DownloadOpts{
+		Container: cName,
+		Name:      oNames[1],
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	o2Content, err := objects.ExtractContent(dr)
+	if err != nil {
+		t.Error(err)
+	}
+	dr, err = objects.Download(client, objects.DownloadOpts{
+		Container: cName,
+		Name:      oNames[0],
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	o1Content, err := objects.ExtractContent(dr)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	if string(o2Content) != string(o1Content) {
+		t.Errorf("Copy failed. Expected\n%s\nand got\n%s", string(o1Content), string(o2Content))
+		return
+	}
 
+	err = objects.Update(client, objects.UpdateOpts{
+		Container: cName,
+		Name:      oNames[0],
+		Metadata:  metadata,
+	})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	defer func() {
+		tempMap := make(map[string]string)
+		for k := range metadata {
+			tempMap[k] = ""
+		}
 		err = objects.Update(client, objects.UpdateOpts{
 			Container: cName,
 			Name:      oNames[0],
-			Metadata:  metadata,
+			Metadata:  tempMap,
 		})
 		if err != nil {
 			t.Error(err)
 			return
 		}
-		defer func() {
-			tempMap := make(map[string]string)
-			for k := range metadata {
-				tempMap[k] = ""
-			}
-			err = objects.Update(client, objects.UpdateOpts{
-				Container: cName,
-				Name:      oNames[0],
-				Metadata:  tempMap,
-			})
-			if err != nil {
-				t.Error(err)
-				return
-			}
-		}()
+	}()
 
-		gr, err := objects.Get(client, objects.GetOpts{})
-		if err != nil {
-			t.Error(err)
+	gr, err := objects.Get(client, objects.GetOpts{})
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	om := objects.ExtractMetadata(gr)
+	for k := range metadata {
+		if om[k] != metadata[strings.Title(k)] {
+			t.Errorf("Expected custom metadata with key: %s", k)
 			return
 		}
-		om := objects.ExtractMetadata(gr)
-		for k := range metadata {
-			if om[k] != metadata[strings.Title(k)] {
-				t.Errorf("Expected custom metadata with key: %s", k)
-				return
-			}
-		}
 	}
 }
diff --git a/acceptance/rackspace/monitoring/rbac_test.go b/acceptance/rackspace/monitoring/rbac_test.go
index a6d1d54..cd01891 100644
--- a/acceptance/rackspace/monitoring/rbac_test.go
+++ b/acceptance/rackspace/monitoring/rbac_test.go
@@ -4,11 +4,11 @@
 
 import (
 	"fmt"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"github.com/rackspace/gophercloud/openstack/utils"
 	"github.com/rackspace/gophercloud/rackspace/monitoring"
 	"github.com/rackspace/gophercloud/rackspace/monitoring/notificationPlans"
-  "testing"
+	"testing"
 )
 
 func TestRBACPermissions(t *testing.T) {
diff --git a/acceptance/tools/tools.go b/acceptance/tools/tools.go
index ebb660a..5891c7f 100644
--- a/acceptance/tools/tools.go
+++ b/acceptance/tools/tools.go
@@ -6,7 +6,7 @@
 	"crypto/rand"
 	"fmt"
 	"github.com/rackspace/gophercloud/openstack/compute/servers"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"github.com/rackspace/gophercloud/openstack/utils"
 	"os"
 	"text/tabwriter"
@@ -16,21 +16,21 @@
 var errTimeout = fmt.Errorf("Timeout.")
 
 type testState struct {
-	O             identity.AuthOptions
-	A             identity.AuthResults
-	SC            *identity.ServiceCatalog
-	EPs           []identity.Endpoint
-	W             *tabwriter.Writer
-	ImageId       string
-	FlavorId      string
-	Region        string
-	EP            string
-	Client        *servers.Client
-	CreatedServer *servers.Server
-	GottenServer  *servers.Server
-	UpdatedServer *servers.Server
-	ServerName    string
-	AlternateName string
+	O              identity.AuthOptions
+	A              identity.AuthResults
+	SC             *identity.ServiceCatalog
+	EPs            []identity.Endpoint
+	W              *tabwriter.Writer
+	ImageId        string
+	FlavorId       string
+	Region         string
+	EP             string
+	Client         *servers.Client
+	CreatedServer  *servers.Server
+	GottenServer   *servers.Server
+	UpdatedServer  *servers.Server
+	ServerName     string
+	AlternateName  string
 	FlavorIdResize string
 }
 
@@ -240,48 +240,48 @@
 }
 
 func MakeNewPassword(oldPass string) string {
-	fmt.Println("Current password: "+oldPass)
+	fmt.Println("Current password: " + oldPass)
 	randomPassword := RandomString("", 16)
 	for randomPassword == oldPass {
 		randomPassword = RandomString("", 16)
 	}
-	fmt.Println("    New password: "+randomPassword)
+	fmt.Println("    New password: " + randomPassword)
 	return randomPassword
 }
 
 func ChangeAdminPassword(ts *testState) error {
 	randomPassword := MakeNewPassword(ts.CreatedServer.AdminPass)
-	
+
 	err := servers.ChangeAdminPassword(ts.Client, ts.CreatedServer.Id, randomPassword)
 	if err != nil {
 		return err
 	}
-	
+
 	err = WaitForStatus(ts, "PASSWORD")
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func RebootServer(ts *testState) error {
-	fmt.Println("Attempting reboot of server "+ts.CreatedServer.Id)
+	fmt.Println("Attempting reboot of server " + ts.CreatedServer.Id)
 	err := servers.Reboot(ts.Client, ts.CreatedServer.Id, servers.OSReboot)
 	if err != nil {
 		return err
 	}
-	
+
 	err = WaitForStatus(ts, "REBOOT")
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func RebuildServer(ts *testState) error {
-	fmt.Println("Attempting to rebuild server "+ts.CreatedServer.Id)
+	fmt.Println("Attempting to rebuild server " + ts.CreatedServer.Id)
 
 	newPassword := MakeNewPassword(ts.CreatedServer.AdminPass)
 	newName := RandomString("ACPTTEST", 16)
@@ -289,7 +289,7 @@
 	if err != nil {
 		return err
 	}
-	
+
 	s, err := servers.GetServer(sr)
 	if err != nil {
 		return err
@@ -302,12 +302,12 @@
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func ResizeServer(ts *testState) error {
-	fmt.Println("Attempting to resize server "+ts.CreatedServer.Id)
+	fmt.Println("Attempting to resize server " + ts.CreatedServer.Id)
 
 	err := servers.Resize(ts.Client, ts.CreatedServer.Id, ts.FlavorIdResize)
 	if err != nil {
@@ -323,19 +323,19 @@
 }
 
 func ConfirmResize(ts *testState) error {
-	fmt.Println("Attempting to confirm resize for server "+ts.CreatedServer.Id)
-	
+	fmt.Println("Attempting to confirm resize for server " + ts.CreatedServer.Id)
+
 	err := servers.ConfirmResize(ts.Client, ts.CreatedServer.Id)
 	if err != nil {
 		return err
 	}
-	
+
 	return WaitForStatus(ts, "ACTIVE")
 }
 
 func RevertResize(ts *testState) error {
-	fmt.Println("Attempting to revert resize for server "+ts.CreatedServer.Id)
-	
+	fmt.Println("Attempting to revert resize for server " + ts.CreatedServer.Id)
+
 	err := servers.RevertResize(ts.Client, ts.CreatedServer.Id)
 	if err != nil {
 		return err
diff --git a/openstack/compute/flavors/client.go b/openstack/compute/flavors/client.go
index 2c64908..5676d36 100644
--- a/openstack/compute/flavors/client.go
+++ b/openstack/compute/flavors/client.go
@@ -2,8 +2,8 @@
 
 import (
 	"fmt"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"net/url"
-	"github.com/rackspace/gophercloud/openstack/identity"
 	"strconv"
 )
 
diff --git a/openstack/compute/images/client.go b/openstack/compute/images/client.go
index c5f1897..3390b99 100644
--- a/openstack/compute/images/client.go
+++ b/openstack/compute/images/client.go
@@ -1,7 +1,7 @@
 package images
 
 import (
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 )
 
 type Client struct {
diff --git a/openstack/compute/servers/client.go b/openstack/compute/servers/client.go
index 3ce6965..611ff22 100644
--- a/openstack/compute/servers/client.go
+++ b/openstack/compute/servers/client.go
@@ -2,7 +2,7 @@
 
 import (
 	"fmt"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 )
 
 // Client abstracts the connection information needed to make API requests for OpenStack compute endpoints.
diff --git a/openstack/identity/v2/client.go b/openstack/identity/v2/client.go
new file mode 100644
index 0000000..c736833
--- /dev/null
+++ b/openstack/identity/v2/client.go
@@ -0,0 +1,80 @@
+package identity
+
+import (
+	"os"
+)
+
+type Client struct {
+	Endpoint  string
+	Authority AuthResults
+	Options   AuthOptions
+}
+
+type ClientOpts struct {
+	Type    string
+	Name    string
+	Region  string
+	URLType string
+}
+
+func (ao AuthOptions) NewClient(opts ClientOpts) (Client, error) {
+	client := Client{
+		Options: ao,
+	}
+
+	ar, err := Authenticate(ao)
+	if err != nil {
+		return client, err
+	}
+
+	client.Authority = ar
+
+	sc, err := GetServiceCatalog(ar)
+	if err != nil {
+		return client, err
+	}
+
+	ces, err := sc.CatalogEntries()
+	if err != nil {
+		return client, err
+	}
+
+	var eps []Endpoint
+
+	if opts.Name != "" {
+		for _, ce := range ces {
+			if ce.Type == opts.Type && ce.Name == opts.Name {
+				eps = ce.Endpoints
+			}
+		}
+	} else {
+		for _, ce := range ces {
+			if ce.Type == opts.Type {
+				eps = ce.Endpoints
+			}
+		}
+	}
+
+	region := os.Getenv("OS_REGION_NAME")
+	if opts.Region != "" {
+		region = opts.Region
+	}
+
+	var rep string
+	for _, ep := range eps {
+		if ep.Region == region {
+			switch opts.URLType {
+			case "public":
+				rep = ep.PublicURL
+			case "private":
+				rep = ep.InternalURL
+			default:
+				rep = ep.PublicURL
+			}
+		}
+	}
+
+	client.Endpoint = rep
+
+	return client, nil
+}
diff --git a/openstack/identity/common_test.go b/openstack/identity/v2/common_test.go
similarity index 100%
rename from openstack/identity/common_test.go
rename to openstack/identity/v2/common_test.go
diff --git a/openstack/identity/doc.go b/openstack/identity/v2/doc.go
similarity index 100%
rename from openstack/identity/doc.go
rename to openstack/identity/v2/doc.go
diff --git a/openstack/identity/errors.go b/openstack/identity/v2/errors.go
similarity index 100%
rename from openstack/identity/errors.go
rename to openstack/identity/v2/errors.go
diff --git a/openstack/identity/extensions.go b/openstack/identity/v2/extensions.go
similarity index 100%
rename from openstack/identity/extensions.go
rename to openstack/identity/v2/extensions.go
diff --git a/openstack/identity/extensions_test.go b/openstack/identity/v2/extensions_test.go
similarity index 100%
rename from openstack/identity/extensions_test.go
rename to openstack/identity/v2/extensions_test.go
diff --git a/openstack/identity/requests.go b/openstack/identity/v2/requests.go
similarity index 100%
rename from openstack/identity/requests.go
rename to openstack/identity/v2/requests.go
diff --git a/openstack/identity/service_catalog.go b/openstack/identity/v2/service_catalog.go
similarity index 100%
rename from openstack/identity/service_catalog.go
rename to openstack/identity/v2/service_catalog.go
diff --git a/openstack/identity/service_catalog_test.go b/openstack/identity/v2/service_catalog_test.go
similarity index 100%
rename from openstack/identity/service_catalog_test.go
rename to openstack/identity/v2/service_catalog_test.go
diff --git a/openstack/identity/token.go b/openstack/identity/v2/token.go
similarity index 100%
rename from openstack/identity/token.go
rename to openstack/identity/v2/token.go
diff --git a/openstack/identity/token_test.go b/openstack/identity/v2/token_test.go
similarity index 100%
rename from openstack/identity/token_test.go
rename to openstack/identity/v2/token_test.go
diff --git a/openstack/storage/v1/client.go b/openstack/storage/v1/client.go
index f616038..a457a74 100644
--- a/openstack/storage/v1/client.go
+++ b/openstack/storage/v1/client.go
@@ -2,7 +2,7 @@
 
 import (
 	"fmt"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 )
 
 // Client is a structure that contains information for communicating with a provider.
diff --git a/openstack/utils/utils.go b/openstack/utils/utils.go
index a814c7e..99b0977 100644
--- a/openstack/utils/utils.go
+++ b/openstack/utils/utils.go
@@ -3,7 +3,7 @@
 
 import (
 	"fmt"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"os"
 )
 
diff --git a/rackspace/monitoring/common.go b/rackspace/monitoring/common.go
index d68a349..42c31ca 100644
--- a/rackspace/monitoring/common.go
+++ b/rackspace/monitoring/common.go
@@ -1,7 +1,7 @@
 package monitoring
 
 import (
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 )
 
 type Options struct {
diff --git a/rackspace/monitoring/notificationPlans/requests.go b/rackspace/monitoring/notificationPlans/requests.go
index 1bef64d..37fb40b 100644
--- a/rackspace/monitoring/notificationPlans/requests.go
+++ b/rackspace/monitoring/notificationPlans/requests.go
@@ -3,7 +3,7 @@
 import (
 	"fmt"
 	"github.com/racker/perigee"
-	"github.com/rackspace/gophercloud/openstack/identity"
+	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"github.com/rackspace/gophercloud/rackspace/monitoring"
 )
 
