Identity v3 Projects List (#163)
* Identity v3 Projects List
* Rename ToListQuery to ToProjectListQuery
diff --git a/acceptance/openstack/identity/v3/projects_test.go b/acceptance/openstack/identity/v3/projects_test.go
new file mode 100644
index 0000000..c78cbfe
--- /dev/null
+++ b/acceptance/openstack/identity/v3/projects_test.go
@@ -0,0 +1,36 @@
+// +build acceptance
+
+package v3
+
+import (
+ "testing"
+
+ "github.com/gophercloud/gophercloud/acceptance/clients"
+ "github.com/gophercloud/gophercloud/openstack/identity/v3/projects"
+)
+
+func TestProjectsList(t *testing.T) {
+ client, err := clients.NewIdentityV3Client()
+ if err != nil {
+ t.Fatalf("Unable to obtain an identity client: %v")
+ }
+
+ var iTrue bool = true
+ listOpts := projects.ListOpts{
+ Enabled: &iTrue,
+ }
+
+ allPages, err := projects.List(client, listOpts).AllPages()
+ if err != nil {
+ t.Fatalf("Unable to list projects: %v", err)
+ }
+
+ allProjects, err := projects.ExtractProjects(allPages)
+ if err != nil {
+ t.Fatalf("Unable to extract projects: %v", err)
+ }
+
+ for _, project := range allProjects {
+ PrintProject(t, &project)
+ }
+}