Merge pull request #526 from Fodoj/add-router-type
Add CreateOptsBuilder for routers
diff --git a/acceptance/openstack/compute/v2/quotaset_test.go b/acceptance/openstack/compute/v2/quotaset_test.go
new file mode 100644
index 0000000..3851edf
--- /dev/null
+++ b/acceptance/openstack/compute/v2/quotaset_test.go
@@ -0,0 +1,60 @@
+// +build acceptance compute
+
+package v2
+
+import (
+ "testing"
+
+ "github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack"
+ "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/quotasets"
+ "github.com/rackspace/gophercloud/openstack/identity/v2/tenants"
+ "github.com/rackspace/gophercloud/pagination"
+ th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func TestGetQuotaset(t *testing.T) {
+ client, err := newClient()
+ if err != nil {
+ t.Fatalf("Unable to create a compute client: %v", err)
+ }
+
+ idclient := openstack.NewIdentityV2(client.ProviderClient)
+ quotaset, err := quotasets.Get(client, findTenant(t, idclient)).Extract()
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ t.Logf("QuotaSet details:\n")
+ t.Logf(" instances=[%d]\n", quotaset.Instances)
+ t.Logf(" cores=[%d]\n", quotaset.Cores)
+ t.Logf(" ram=[%d]\n", quotaset.Ram)
+ t.Logf(" key_pairs=[%d]\n", quotaset.KeyPairs)
+ t.Logf(" metadata_items=[%d]\n", quotaset.MetadataItems)
+ t.Logf(" security_groups=[%d]\n", quotaset.SecurityGroups)
+ t.Logf(" security_group_rules=[%d]\n", quotaset.SecurityGroupRules)
+ t.Logf(" fixed_ips=[%d]\n", quotaset.FixedIps)
+ t.Logf(" floating_ips=[%d]\n", quotaset.FloatingIps)
+ t.Logf(" injected_file_content_bytes=[%d]\n", quotaset.InjectedFileContentBytes)
+ t.Logf(" injected_file_path_bytes=[%d]\n", quotaset.InjectedFilePathBytes)
+ t.Logf(" injected_files=[%d]\n", quotaset.InjectedFiles)
+
+}
+
+func findTenant(t *testing.T, client *gophercloud.ServiceClient) string {
+ var tenantID string
+ err := tenants.List(client, nil).EachPage(func(page pagination.Page) (bool, error) {
+ tenantList, err := tenants.ExtractTenants(page)
+ th.AssertNoErr(t, err)
+
+ for _, t := range tenantList {
+ tenantID = t.ID
+ break
+ }
+
+ return true, nil
+ })
+ th.AssertNoErr(t, err)
+
+ return tenantID
+}
diff --git a/openstack/blockstorage/v1/apiversions/urls.go b/openstack/blockstorage/v1/apiversions/urls.go
index 56f8260..78f9645 100644
--- a/openstack/blockstorage/v1/apiversions/urls.go
+++ b/openstack/blockstorage/v1/apiversions/urls.go
@@ -2,6 +2,7 @@
import (
"strings"
+ "net/url"
"github.com/rackspace/gophercloud"
)
@@ -11,5 +12,7 @@
}
func listURL(c *gophercloud.ServiceClient) string {
- return c.ServiceURL("")
+ u, _ := url.Parse(c.ServiceURL(""))
+ u.Path = "/"
+ return u.String()
}
diff --git a/openstack/blockstorage/v1/apiversions/urls_test.go b/openstack/blockstorage/v1/apiversions/urls_test.go
index 37e9142..68cfb8c 100644
--- a/openstack/blockstorage/v1/apiversions/urls_test.go
+++ b/openstack/blockstorage/v1/apiversions/urls_test.go
@@ -8,11 +8,16 @@
)
const endpoint = "http://localhost:57909/"
+const endpoint2 = "http://localhost:57909/v1/3a02ee0b5cf14816b41b17e851d29a94"
func endpointClient() *gophercloud.ServiceClient {
return &gophercloud.ServiceClient{Endpoint: endpoint}
}
+func endpointClient2() *gophercloud.ServiceClient {
+ return &gophercloud.ServiceClient{Endpoint: endpoint2}
+}
+
func TestGetURL(t *testing.T) {
actual := getURL(endpointClient(), "v1")
expected := endpoint + "v1/"
@@ -20,7 +25,7 @@
}
func TestListURL(t *testing.T) {
- actual := listURL(endpointClient())
+ actual := listURL(endpointClient2())
expected := endpoint
th.AssertEquals(t, expected, actual)
}
diff --git a/openstack/blockstorage/v1/snapshots/fixtures.go b/openstack/blockstorage/v1/snapshots/fixtures.go
index d1461fb..eba5f82 100644
--- a/openstack/blockstorage/v1/snapshots/fixtures.go
+++ b/openstack/blockstorage/v1/snapshots/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package snapshots
import (
diff --git a/openstack/blockstorage/v1/volumes/testing/fixtures.go b/openstack/blockstorage/v1/volumes/testing/fixtures.go
index 3df7653..5d1e669 100644
--- a/openstack/blockstorage/v1/volumes/testing/fixtures.go
+++ b/openstack/blockstorage/v1/volumes/testing/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package testing
import (
diff --git a/openstack/blockstorage/v1/volumetypes/fixtures.go b/openstack/blockstorage/v1/volumetypes/fixtures.go
index e3326ea..e78f137 100644
--- a/openstack/blockstorage/v1/volumetypes/fixtures.go
+++ b/openstack/blockstorage/v1/volumetypes/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package volumetypes
import (
diff --git a/openstack/cdn/v1/base/fixtures.go b/openstack/cdn/v1/base/fixtures.go
index 19b5ece..5568074 100644
--- a/openstack/cdn/v1/base/fixtures.go
+++ b/openstack/cdn/v1/base/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package base
import (
diff --git a/openstack/cdn/v1/flavors/fixtures.go b/openstack/cdn/v1/flavors/fixtures.go
index d7ec1a0..166b2c8 100644
--- a/openstack/cdn/v1/flavors/fixtures.go
+++ b/openstack/cdn/v1/flavors/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package flavors
import (
diff --git a/openstack/cdn/v1/serviceassets/fixtures.go b/openstack/cdn/v1/serviceassets/fixtures.go
index 5c6b5d0..c4739ae 100644
--- a/openstack/cdn/v1/serviceassets/fixtures.go
+++ b/openstack/cdn/v1/serviceassets/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package serviceassets
import (
diff --git a/openstack/cdn/v1/services/fixtures.go b/openstack/cdn/v1/services/fixtures.go
index d9bc9f2..3d53900 100644
--- a/openstack/cdn/v1/services/fixtures.go
+++ b/openstack/cdn/v1/services/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package services
import (
diff --git a/openstack/compute/v2/extensions/defsecrules/fixtures.go b/openstack/compute/v2/extensions/defsecrules/fixtures.go
index 2870b6a..9b3c2b6 100644
--- a/openstack/compute/v2/extensions/defsecrules/fixtures.go
+++ b/openstack/compute/v2/extensions/defsecrules/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package defsecrules
import (
diff --git a/openstack/compute/v2/extensions/quotasets/doc.go b/openstack/compute/v2/extensions/quotasets/doc.go
new file mode 100644
index 0000000..721024e
--- /dev/null
+++ b/openstack/compute/v2/extensions/quotasets/doc.go
@@ -0,0 +1,3 @@
+// Package quotasets provides information and interaction with QuotaSet
+// extension for the OpenStack Compute service.
+package quotasets
diff --git a/openstack/compute/v2/extensions/quotasets/fixtures.go b/openstack/compute/v2/extensions/quotasets/fixtures.go
new file mode 100644
index 0000000..c1bb4ea
--- /dev/null
+++ b/openstack/compute/v2/extensions/quotasets/fixtures.go
@@ -0,0 +1,59 @@
+// +build fixtures
+
+package quotasets
+
+import (
+ "fmt"
+ "net/http"
+ "testing"
+
+ th "github.com/rackspace/gophercloud/testhelper"
+ "github.com/rackspace/gophercloud/testhelper/client"
+)
+
+// GetOutput is a sample response to a Get call.
+const GetOutput = `
+{
+ "quota_set" : {
+ "instances" : 25,
+ "security_groups" : 10,
+ "security_group_rules" : 20,
+ "cores" : 200,
+ "injected_file_content_bytes" : 10240,
+ "injected_files" : 5,
+ "metadata_items" : 128,
+ "ram" : 200000,
+ "keypairs" : 10,
+ "injected_file_path_bytes" : 255
+ }
+}
+`
+
+const FirstTenantID = "555544443333222211110000ffffeeee"
+
+// FirstQuotaSet is the first result in ListOutput.
+var FirstQuotaSet = QuotaSet{
+ FixedIps: 0,
+ FloatingIps: 0,
+ InjectedFileContentBytes: 10240,
+ InjectedFilePathBytes: 255,
+ InjectedFiles: 5,
+ KeyPairs: 10,
+ MetadataItems: 128,
+ Ram: 200000,
+ SecurityGroupRules: 20,
+ SecurityGroups: 10,
+ Cores: 200,
+ Instances: 25,
+}
+
+// HandleGetSuccessfully configures the test server to respond to a Get request for sample tenant
+func HandleGetSuccessfully(t *testing.T) {
+ th.Mux.HandleFunc("/os-quota-sets/"+FirstTenantID, func(w http.ResponseWriter, r *http.Request) {
+ th.TestMethod(t, r, "GET")
+ th.TestHeader(t, r, "X-Auth-Token", client.TokenID)
+
+ w.Header().Add("Content-Type", "application/json")
+ fmt.Fprintf(w, GetOutput)
+ })
+}
diff --git a/openstack/compute/v2/extensions/quotasets/requests.go b/openstack/compute/v2/extensions/quotasets/requests.go
new file mode 100644
index 0000000..52f0839
--- /dev/null
+++ b/openstack/compute/v2/extensions/quotasets/requests.go
@@ -0,0 +1,12 @@
+package quotasets
+
+import (
+ "github.com/rackspace/gophercloud"
+)
+
+// Get returns public data about a previously created QuotaSet.
+func Get(client *gophercloud.ServiceClient, tenantID string) GetResult {
+ var res GetResult
+ _, res.Err = client.Get(getURL(client, tenantID), &res.Body, nil)
+ return res
+}
diff --git a/openstack/compute/v2/extensions/quotasets/requests_test.go b/openstack/compute/v2/extensions/quotasets/requests_test.go
new file mode 100644
index 0000000..5d766fa
--- /dev/null
+++ b/openstack/compute/v2/extensions/quotasets/requests_test.go
@@ -0,0 +1,16 @@
+package quotasets
+
+import (
+ th "github.com/rackspace/gophercloud/testhelper"
+ "github.com/rackspace/gophercloud/testhelper/client"
+ "testing"
+)
+
+func TestGet(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandleGetSuccessfully(t)
+ actual, err := Get(client.ServiceClient(), FirstTenantID).Extract()
+ th.AssertNoErr(t, err)
+ th.CheckDeepEquals(t, &FirstQuotaSet, actual)
+}
diff --git a/openstack/compute/v2/extensions/quotasets/results.go b/openstack/compute/v2/extensions/quotasets/results.go
new file mode 100644
index 0000000..cbf4d6b
--- /dev/null
+++ b/openstack/compute/v2/extensions/quotasets/results.go
@@ -0,0 +1,86 @@
+package quotasets
+
+import (
+ "github.com/mitchellh/mapstructure"
+ "github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/pagination"
+)
+
+// QuotaSet is a set of operational limits that allow for control of compute usage.
+type QuotaSet struct {
+ //ID is tenant associated with this quota_set
+ ID string `mapstructure:"id"`
+ //FixedIps is number of fixed ips alloted this quota_set
+ FixedIps int `mapstructure:"fixed_ips"`
+ // FloatingIps is number of floating ips alloted this quota_set
+ FloatingIps int `mapstructure:"floating_ips"`
+ // InjectedFileContentBytes is content bytes allowed for each injected file
+ InjectedFileContentBytes int `mapstructure:"injected_file_content_bytes"`
+ // InjectedFilePathBytes is allowed bytes for each injected file path
+ InjectedFilePathBytes int `mapstructure:"injected_file_path_bytes"`
+ // InjectedFiles is injected files allowed for each project
+ InjectedFiles int `mapstructure:"injected_files"`
+ // KeyPairs is number of ssh keypairs
+ KeyPairs int `mapstructure:"keypairs"`
+ // MetadataItems is number of metadata items allowed for each instance
+ MetadataItems int `mapstructure:"metadata_items"`
+ // Ram is megabytes allowed for each instance
+ Ram int `mapstructure:"ram"`
+ // SecurityGroupRules is rules allowed for each security group
+ SecurityGroupRules int `mapstructure:"security_group_rules"`
+ // SecurityGroups security groups allowed for each project
+ SecurityGroups int `mapstructure:"security_groups"`
+ // Cores is number of instance cores allowed for each project
+ Cores int `mapstructure:"cores"`
+ // Instances is number of instances allowed for each project
+ Instances int `mapstructure:"instances"`
+}
+
+// QuotaSetPage stores a single, only page of QuotaSet results from a List call.
+type QuotaSetPage struct {
+ pagination.SinglePageBase
+}
+
+// IsEmpty determines whether or not a QuotaSetsetPage is empty.
+func (page QuotaSetPage) IsEmpty() (bool, error) {
+ ks, err := ExtractQuotaSets(page)
+ return len(ks) == 0, err
+}
+
+// ExtractQuotaSets interprets a page of results as a slice of QuotaSets.
+func ExtractQuotaSets(page pagination.Page) ([]QuotaSet, error) {
+ var resp struct {
+ QuotaSets []QuotaSet `mapstructure:"quotas"`
+ }
+
+ err := mapstructure.Decode(page.(QuotaSetPage).Body, &resp)
+ results := make([]QuotaSet, len(resp.QuotaSets))
+ for i, q := range resp.QuotaSets {
+ results[i] = q
+ }
+ return results, err
+}
+
+type quotaResult struct {
+ gophercloud.Result
+}
+
+// Extract is a method that attempts to interpret any QuotaSet resource response as a QuotaSet struct.
+func (r quotaResult) Extract() (*QuotaSet, error) {
+ if r.Err != nil {
+ return nil, r.Err
+ }
+
+ var res struct {
+ QuotaSet *QuotaSet `json:"quota_set" mapstructure:"quota_set"`
+ }
+
+ err := mapstructure.Decode(r.Body, &res)
+ return res.QuotaSet, err
+}
+
+// GetResult is the response from a Get operation. Call its Extract method to interpret it
+// as a QuotaSet.
+type GetResult struct {
+ quotaResult
+}
diff --git a/openstack/compute/v2/extensions/quotasets/urls.go b/openstack/compute/v2/extensions/quotasets/urls.go
new file mode 100644
index 0000000..c04d941
--- /dev/null
+++ b/openstack/compute/v2/extensions/quotasets/urls.go
@@ -0,0 +1,13 @@
+package quotasets
+
+import "github.com/rackspace/gophercloud"
+
+const resourcePath = "os-quota-sets"
+
+func resourceURL(c *gophercloud.ServiceClient) string {
+ return c.ServiceURL(resourcePath)
+}
+
+func getURL(c *gophercloud.ServiceClient, tenantID string) string {
+ return c.ServiceURL(resourcePath, tenantID)
+}
diff --git a/openstack/compute/v2/extensions/quotasets/urls_test.go b/openstack/compute/v2/extensions/quotasets/urls_test.go
new file mode 100644
index 0000000..f19a6ad
--- /dev/null
+++ b/openstack/compute/v2/extensions/quotasets/urls_test.go
@@ -0,0 +1,16 @@
+package quotasets
+
+import (
+ "testing"
+
+ th "github.com/rackspace/gophercloud/testhelper"
+ "github.com/rackspace/gophercloud/testhelper/client"
+)
+
+func TestGetURL(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ c := client.ServiceClient()
+
+ th.CheckEquals(t, c.Endpoint+"os-quota-sets/wat", getURL(c, "wat"))
+}
diff --git a/openstack/compute/v2/extensions/secgroups/fixtures.go b/openstack/compute/v2/extensions/secgroups/fixtures.go
index 28b1c06..d58d908 100644
--- a/openstack/compute/v2/extensions/secgroups/fixtures.go
+++ b/openstack/compute/v2/extensions/secgroups/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package secgroups
import (
diff --git a/openstack/compute/v2/extensions/startstop/fixtures.go b/openstack/compute/v2/extensions/startstop/fixtures.go
index 670828a..e2c33fe 100644
--- a/openstack/compute/v2/extensions/startstop/fixtures.go
+++ b/openstack/compute/v2/extensions/startstop/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package startstop
import (
diff --git a/openstack/db/v1/configurations/fixtures.go b/openstack/db/v1/configurations/fixtures.go
index ae65416..9064c6c 100644
--- a/openstack/db/v1/configurations/fixtures.go
+++ b/openstack/db/v1/configurations/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package configurations
import (
diff --git a/openstack/db/v1/databases/fixtures.go b/openstack/db/v1/databases/fixtures.go
index 3e67721..8d21e90 100644
--- a/openstack/db/v1/databases/fixtures.go
+++ b/openstack/db/v1/databases/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package databases
import (
diff --git a/openstack/db/v1/datastores/fixtures.go b/openstack/db/v1/datastores/fixtures.go
index fd767cd..eb796eb 100644
--- a/openstack/db/v1/datastores/fixtures.go
+++ b/openstack/db/v1/datastores/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package datastores
import (
diff --git a/openstack/db/v1/flavors/fixtures.go b/openstack/db/v1/flavors/fixtures.go
index f0016bc..9839324 100644
--- a/openstack/db/v1/flavors/fixtures.go
+++ b/openstack/db/v1/flavors/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package flavors
import (
diff --git a/openstack/db/v1/instances/fixtures.go b/openstack/db/v1/instances/fixtures.go
index af7b185..eb1da6a 100644
--- a/openstack/db/v1/instances/fixtures.go
+++ b/openstack/db/v1/instances/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package instances
import (
diff --git a/openstack/db/v1/users/fixtures.go b/openstack/db/v1/users/fixtures.go
index 516b335..f5a4cc1 100644
--- a/openstack/db/v1/users/fixtures.go
+++ b/openstack/db/v1/users/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package users
import (
diff --git a/openstack/identity/v2/extensions/admin/roles/fixtures.go b/openstack/identity/v2/extensions/admin/roles/fixtures.go
index 8256f0f..88bfecc 100644
--- a/openstack/identity/v2/extensions/admin/roles/fixtures.go
+++ b/openstack/identity/v2/extensions/admin/roles/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package roles
import (
diff --git a/openstack/identity/v2/users/fixtures.go b/openstack/identity/v2/users/fixtures.go
index 8941868..df3f774 100644
--- a/openstack/identity/v2/users/fixtures.go
+++ b/openstack/identity/v2/users/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package users
import (
diff --git a/openstack/orchestration/v1/buildinfo/fixtures.go b/openstack/orchestration/v1/buildinfo/fixtures.go
index 20ea09b..d1240b8 100644
--- a/openstack/orchestration/v1/buildinfo/fixtures.go
+++ b/openstack/orchestration/v1/buildinfo/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package buildinfo
import (
diff --git a/openstack/orchestration/v1/stackevents/fixtures.go b/openstack/orchestration/v1/stackevents/fixtures.go
index 235787a..1004702 100644
--- a/openstack/orchestration/v1/stackevents/fixtures.go
+++ b/openstack/orchestration/v1/stackevents/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package stackevents
import (
diff --git a/openstack/orchestration/v1/stackresources/fixtures.go b/openstack/orchestration/v1/stackresources/fixtures.go
index 952dc54..8f5df7d 100644
--- a/openstack/orchestration/v1/stackresources/fixtures.go
+++ b/openstack/orchestration/v1/stackresources/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package stackresources
import (
diff --git a/openstack/orchestration/v1/stacks/fixtures.go b/openstack/orchestration/v1/stacks/fixtures.go
index 83f5dec..9c95a89 100644
--- a/openstack/orchestration/v1/stacks/fixtures.go
+++ b/openstack/orchestration/v1/stacks/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package stacks
import (
diff --git a/openstack/orchestration/v1/stacktemplates/fixtures.go b/openstack/orchestration/v1/stacktemplates/fixtures.go
index fa9b301..ff544d4 100644
--- a/openstack/orchestration/v1/stacktemplates/fixtures.go
+++ b/openstack/orchestration/v1/stacktemplates/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package stacktemplates
import (
diff --git a/rackspace/db/v1/backups/fixtures.go b/rackspace/db/v1/backups/fixtures.go
index 45c2376..6bbe651 100644
--- a/rackspace/db/v1/backups/fixtures.go
+++ b/rackspace/db/v1/backups/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package backups
import "time"
diff --git a/rackspace/db/v1/configurations/fixtures.go b/rackspace/db/v1/configurations/fixtures.go
index d8a2233..01a9325 100644
--- a/rackspace/db/v1/configurations/fixtures.go
+++ b/rackspace/db/v1/configurations/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package configurations
import (
diff --git a/rackspace/db/v1/instances/fixtures.go b/rackspace/db/v1/instances/fixtures.go
index c5ff37a..92d7bed 100644
--- a/rackspace/db/v1/instances/fixtures.go
+++ b/rackspace/db/v1/instances/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package instances
import (
diff --git a/rackspace/db/v1/users/fixtures.go b/rackspace/db/v1/users/fixtures.go
index 5314e85..bc54867 100644
--- a/rackspace/db/v1/users/fixtures.go
+++ b/rackspace/db/v1/users/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package users
const singleDB = `{"databases": [{"name": "databaseE"}]}`
diff --git a/rackspace/identity/v2/roles/fixtures.go b/rackspace/identity/v2/roles/fixtures.go
index 5f22d0f..e194e31 100644
--- a/rackspace/identity/v2/roles/fixtures.go
+++ b/rackspace/identity/v2/roles/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package roles
import (
diff --git a/rackspace/identity/v2/users/fixtures.go b/rackspace/identity/v2/users/fixtures.go
index 973f39e..d5091b9 100644
--- a/rackspace/identity/v2/users/fixtures.go
+++ b/rackspace/identity/v2/users/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package users
import (
diff --git a/rackspace/lb/v1/acl/fixtures.go b/rackspace/lb/v1/acl/fixtures.go
index e3c941c..6761b9f 100644
--- a/rackspace/lb/v1/acl/fixtures.go
+++ b/rackspace/lb/v1/acl/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package acl
import (
diff --git a/rackspace/lb/v1/lbs/fixtures.go b/rackspace/lb/v1/lbs/fixtures.go
index 6325310..a002c67 100644
--- a/rackspace/lb/v1/lbs/fixtures.go
+++ b/rackspace/lb/v1/lbs/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package lbs
import (
diff --git a/rackspace/lb/v1/monitors/fixtures.go b/rackspace/lb/v1/monitors/fixtures.go
index a565abc..72bfdcd 100644
--- a/rackspace/lb/v1/monitors/fixtures.go
+++ b/rackspace/lb/v1/monitors/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package monitors
import (
diff --git a/rackspace/lb/v1/nodes/fixtures.go b/rackspace/lb/v1/nodes/fixtures.go
index 8899fc5..350eefa 100644
--- a/rackspace/lb/v1/nodes/fixtures.go
+++ b/rackspace/lb/v1/nodes/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package nodes
import (
diff --git a/rackspace/lb/v1/sessions/fixtures.go b/rackspace/lb/v1/sessions/fixtures.go
index 077ef04..e59dd6c 100644
--- a/rackspace/lb/v1/sessions/fixtures.go
+++ b/rackspace/lb/v1/sessions/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package sessions
import (
diff --git a/rackspace/lb/v1/ssl/fixtures.go b/rackspace/lb/v1/ssl/fixtures.go
index 5a52962..d03d6de 100644
--- a/rackspace/lb/v1/ssl/fixtures.go
+++ b/rackspace/lb/v1/ssl/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package ssl
import (
diff --git a/rackspace/lb/v1/throttle/fixtures.go b/rackspace/lb/v1/throttle/fixtures.go
index f3e49fa..61e601c 100644
--- a/rackspace/lb/v1/throttle/fixtures.go
+++ b/rackspace/lb/v1/throttle/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package throttle
import (
diff --git a/rackspace/lb/v1/vips/fixtures.go b/rackspace/lb/v1/vips/fixtures.go
index 158759f..080e617 100644
--- a/rackspace/lb/v1/vips/fixtures.go
+++ b/rackspace/lb/v1/vips/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package vips
import (
diff --git a/rackspace/orchestration/v1/stacks/fixtures.go b/rackspace/orchestration/v1/stacks/fixtures.go
index c9afeb1..c79c2a6 100644
--- a/rackspace/orchestration/v1/stacks/fixtures.go
+++ b/rackspace/orchestration/v1/stacks/fixtures.go
@@ -1,3 +1,5 @@
+// +build fixtures
+
package stacks
import (