| // +build acceptance networking |
| "github.com/rackspace/gophercloud/openstack/networking/v2/apiversions" |
| "github.com/rackspace/gophercloud/pagination" |
| th "github.com/rackspace/gophercloud/testhelper" |
| func TestListAPIVersions(t *testing.T) { |
| pager := apiversions.ListVersions(Client) |
| err := pager.EachPage(func(page pagination.Page) (bool, error) { |
| versions, err := apiversions.ExtractAPIVersions(page) |
| for _, v := range versions { |
| t.Logf("API Version: ID [%s] Status [%s]", v.ID, v.Status) |
| func TestListAPIResources(t *testing.T) { |
| pager := apiversions.ListVersionResources(Client, "v2.0") |
| err := pager.EachPage(func(page pagination.Page) (bool, error) { |
| vrs, err := apiversions.ExtractVersionResources(page) |
| t.Logf("Network: Name [%s] Collection [%s]", vr.Name, vr.Collection) |