Merge remote-tracking branch 'upstream/v0.2.0' into identity-v3

Conflicts:
	acceptance/openstack/compute/tools_test.go
diff --git a/README.asciidoc b/README.asciidoc
index 534f40a..505e357 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -1,4 +1,4 @@
-== Gophercloud -- V0.2.0 image:https://secure.travis-ci.org/rackspace/gophercloud.png?branch=master["build status",link="https://travis-ci.org/rackspace/gophercloud"]
+== Gophercloud -- V0.2.0 image:https://secure.travis-ci.org/rackspace/gophercloud.png?branch=v0.2.0["build status",link="https://travis-ci.org/rackspace/gophercloud"]
 
 Gophercloud currently lets you authenticate with OpenStack providers to create and manage servers (compute service) and objects (object-storage service).
 We are working on extending the API to further include block storage, DNS, databases, security groups, and other features.
@@ -13,6 +13,39 @@
 5.  Gophercloud supports automatic reauthentication upon auth token timeout, if enabled by your software.
 6.  Gophercloud is the only SDK implementation with actual acceptance-level integration tests.
 
+=== Dependencies
+* Go 1.*  (For information on installing Go and setting up your environment, go link:https://golang.org/doc/install[here])
+* git
+
+=== Getting the code
+
+To download Gophercloud, simpy run
+```
+go get github.com/rackspace/gophercloud
+```
+It will automatically retrieve all dependencies. Goperhcloud and its dependencies will be located within your $GOPATH.
+
+=== Running the tests
+
+Gophercloud has both unit tests and acceptance (integration) tests.
+
+To run the unit tests, run
+```
+go test -v github.com/rackspace/gophercloud
+```
+from the Gophercloud root directory.
+
+To run the acceptance tests, run
+```
+go test -v -tags acceptance github.com/rackspace/gophercloud
+```
+*Note: Running the acceptance tests briefly creates (and deletes) real resources. You may incur costs from your provider by running these.*
+
+To run specific tests, use a regular expression with the `run` flag. For example, to just run the authentication test (named TestAuthentication), run
+```
+go test -v -run "Authentication" -tags acceptance github.com/rackspace/gophercloud
+```
+
 === What Does it Look Like?
 
 The Gophercloud 0.1.0 and earlier APIs are now deprecated and obsolete.
diff --git a/acceptance/README.md b/acceptance/README.md
new file mode 100644
index 0000000..95c174d
--- /dev/null
+++ b/acceptance/README.md
@@ -0,0 +1,56 @@
+# Gophercloud Acceptance tests
+
+The purpose of these acceptance tests is to validate that SDK features meet
+the requirements of a contract - to consumers, other parts of the library, and
+to a remote API.
+
+> **Note:** Because every test will be run against a real API endpoint, you
+> may incur bandwidth and service charges for all the resource usage. These
+> tests *should* remove their remote products automatically. However, there may
+> be certain cases where this does not happen; always double-check to make sure
+> you have no stragglers left behind.
+
+### Step 1. Set environment variables
+
+A lot of tests rely on environment variables for configuration - so you will need 
+to set them before running the suite. If you're testing against pure OpenStack APIs,
+you can download a file that contains all of these variables for you: just visit 
+the `project/access_and_security` page in your control panel and click the "Download 
+OpenStack RC File" button at the top right. For all other providers, you will need 
+to set them manually.
+
+#### Authentication
+
+|Name|Description|
+|---|---|
+|`OS_USERNAME`|Your API username|
+|`OS_PASSWORD`|Your API password|
+|`OS_AUTH_URL`|The identity URL you need to authenticate|
+|`OS_TENANT_NAME`|Your API tenant name|
+|`OS_TENANT_ID`|Your API tenant ID|
+
+#### General
+
+|Name|Description|
+|---|---|
+|`OS_REGION_NAME`|The region you want your resources to reside in|
+
+#### Compute
+
+|Name|Description|
+|---|---|
+|`OS_IMAGE_ID`|The ID of the image your want your server to be based on|
+|`OS_FLAVOR_ID`|The ID of the flavor you want your server to be based on|
+|`OS_FLAVOR_ID_RESIZE`|The ID of the flavor you want your server to be resized to|
+
+### 2. Run the test suite
+
+From any directory, run:
+
+```
+go test -v -tags acceptance github.com/rackspace/gophercloud/...
+```
+
+Alternatively, you can execute the above from your nested git folder (i.e. the
+  workspace visible when browsing the Github repository) by replacing
+  `github.com/rackspace/gophercloud/...` with `./...`
diff --git a/acceptance/openstack/compute/compute_test.go b/acceptance/openstack/compute/compute_test.go
index 7473f13..2310858 100644
--- a/acceptance/openstack/compute/compute_test.go
+++ b/acceptance/openstack/compute/compute_test.go
@@ -4,12 +4,13 @@
 
 import (
 	"fmt"
-	"github.com/rackspace/gophercloud/openstack/compute/flavors"
-	"github.com/rackspace/gophercloud/openstack/compute/images"
-	"github.com/rackspace/gophercloud/openstack/compute/servers"
 	"os"
 	"testing"
+
 	"github.com/rackspace/gophercloud/acceptance/tools"
+	"github.com/rackspace/gophercloud/openstack/compute/v2/flavors"
+	"github.com/rackspace/gophercloud/openstack/compute/v2/images"
+	"github.com/rackspace/gophercloud/openstack/compute/v2/servers"
 )
 
 var service = "compute"
@@ -226,7 +227,7 @@
 		t.Fatal(err)
 	}
 
-	defer func(){
+	defer func() {
 		servers.Delete(ts.Client, ts.CreatedServer.Id)
 	}()
 
@@ -254,7 +255,7 @@
 		t.Fatal(err)
 	}
 
-	defer func(){
+	defer func() {
 		servers.Delete(ts.Client, ts.CreatedServer.Id)
 	}()
 
@@ -287,7 +288,7 @@
 		t.Fatal(err)
 	}
 
-	defer func(){
+	defer func() {
 		servers.Delete(ts.Client, ts.CreatedServer.Id)
 	}()
 
@@ -304,31 +305,31 @@
 
 func TestActionResizeConfirm(t *testing.T) {
 	t.Parallel()
-	
+
 	ts, err := tools.SetupForCRUD()
 	if err != nil {
 		t.Fatal(err)
 	}
-	
+
 	err = tools.CreateServer(ts)
 	if err != nil {
 		t.Fatal(err)
 	}
-	
-	defer func(){
+
+	defer func() {
 		servers.Delete(ts.Client, ts.CreatedServer.Id)
 	}()
-	
+
 	err = tools.WaitForStatus(ts, "ACTIVE")
 	if err != nil {
 		t.Fatal(err)
 	}
-	
+
 	err = tools.ResizeServer(ts)
 	if err != nil {
 		t.Fatal(err)
 	}
-	
+
 	err = tools.ConfirmResize(ts)
 	if err != nil {
 		t.Fatal(err)
@@ -337,31 +338,31 @@
 
 func TestActionResizeRevert(t *testing.T) {
 	t.Parallel()
-	
+
 	ts, err := tools.SetupForCRUD()
 	if err != nil {
 		t.Fatal(err)
 	}
-	
+
 	err = tools.CreateServer(ts)
 	if err != nil {
 		t.Fatal(err)
 	}
-	
-	defer func(){
+
+	defer func() {
 		servers.Delete(ts.Client, ts.CreatedServer.Id)
 	}()
-	
+
 	err = tools.WaitForStatus(ts, "ACTIVE")
 	if err != nil {
 		t.Fatal(err)
 	}
-	
+
 	err = tools.ResizeServer(ts)
 	if err != nil {
 		t.Fatal(err)
 	}
-	
+
 	err = tools.RevertResize(ts)
 	if err != nil {
 		t.Fatal(err)
diff --git a/acceptance/openstack/compute/tools_test.go b/acceptance/openstack/compute/tools_test.go
index b5d3909..1acb824 100644
--- a/acceptance/openstack/compute/tools_test.go
+++ b/acceptance/openstack/compute/tools_test.go
@@ -10,7 +10,7 @@
 	"time"
 
 	"github.com/rackspace/gophercloud"
-	"github.com/rackspace/gophercloud/openstack/compute/servers"
+	"github.com/rackspace/gophercloud/openstack/compute/v2/servers"
 	identity "github.com/rackspace/gophercloud/openstack/identity/v2"
 	"github.com/rackspace/gophercloud/openstack/utils"
 )
diff --git a/openstack/compute/flavors/client.go b/openstack/compute/v2/flavors/client.go
similarity index 100%
rename from openstack/compute/flavors/client.go
rename to openstack/compute/v2/flavors/client.go
diff --git a/openstack/compute/flavors/flavors.go b/openstack/compute/v2/flavors/flavors.go
similarity index 100%
rename from openstack/compute/flavors/flavors.go
rename to openstack/compute/v2/flavors/flavors.go
diff --git a/openstack/compute/flavors/requests.go b/openstack/compute/v2/flavors/requests.go
similarity index 100%
rename from openstack/compute/flavors/requests.go
rename to openstack/compute/v2/flavors/requests.go
diff --git a/openstack/compute/images/client.go b/openstack/compute/v2/images/client.go
similarity index 100%
rename from openstack/compute/images/client.go
rename to openstack/compute/v2/images/client.go
diff --git a/openstack/compute/images/images.go b/openstack/compute/v2/images/images.go
similarity index 100%
rename from openstack/compute/images/images.go
rename to openstack/compute/v2/images/images.go
diff --git a/openstack/compute/images/images_test.go b/openstack/compute/v2/images/images_test.go
similarity index 100%
rename from openstack/compute/images/images_test.go
rename to openstack/compute/v2/images/images_test.go
diff --git a/openstack/compute/images/requests.go b/openstack/compute/v2/images/requests.go
similarity index 100%
rename from openstack/compute/images/requests.go
rename to openstack/compute/v2/images/requests.go
diff --git a/openstack/compute/servers/client.go b/openstack/compute/v2/servers/client.go
similarity index 100%
rename from openstack/compute/servers/client.go
rename to openstack/compute/v2/servers/client.go
diff --git a/openstack/compute/servers/doc.go b/openstack/compute/v2/servers/doc.go
similarity index 100%
rename from openstack/compute/servers/doc.go
rename to openstack/compute/v2/servers/doc.go
diff --git a/openstack/compute/servers/requests.go b/openstack/compute/v2/servers/requests.go
similarity index 100%
rename from openstack/compute/servers/requests.go
rename to openstack/compute/v2/servers/requests.go
diff --git a/openstack/compute/servers/servers.go b/openstack/compute/v2/servers/servers.go
similarity index 100%
rename from openstack/compute/servers/servers.go
rename to openstack/compute/v2/servers/servers.go
diff --git a/openstack/compute/servers/servers_test.go b/openstack/compute/v2/servers/servers_test.go
similarity index 100%
rename from openstack/compute/servers/servers_test.go
rename to openstack/compute/v2/servers/servers_test.go