Moving network v2 to new(est) pagination idiom
diff --git a/acceptance/openstack/networking/v2/apiversion_test.go b/acceptance/openstack/networking/v2/apiversion_test.go
index 79198c5..99e1d01 100644
--- a/acceptance/openstack/networking/v2/apiversion_test.go
+++ b/acceptance/openstack/networking/v2/apiversion_test.go
@@ -5,8 +5,8 @@
import (
"testing"
- "github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/openstack/networking/v2/apiversions"
+ "github.com/rackspace/gophercloud/pagination"
th "github.com/rackspace/gophercloud/testhelper"
)
@@ -15,7 +15,7 @@
defer Teardown()
pager := apiversions.ListVersions(Client)
- err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+ err := pager.EachPage(func(page pagination.Page) (bool, error) {
t.Logf("--- Page ---")
versions, err := apiversions.ExtractAPIVersions(page)
@@ -35,7 +35,7 @@
defer Teardown()
pager := apiversions.ListVersionResources(Client, "v2.0")
- err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+ err := pager.EachPage(func(page pagination.Page) (bool, error) {
t.Logf("--- Page ---")
vrs, err := apiversions.ExtractVersionResources(page)
diff --git a/acceptance/openstack/networking/v2/extension_test.go b/acceptance/openstack/networking/v2/extension_test.go
index 2cbe3a7..99c0ecd 100644
--- a/acceptance/openstack/networking/v2/extension_test.go
+++ b/acceptance/openstack/networking/v2/extension_test.go
@@ -5,8 +5,8 @@
import (
"testing"
- "github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/openstack/networking/v2/extensions"
+ "github.com/rackspace/gophercloud/pagination"
th "github.com/rackspace/gophercloud/testhelper"
)
@@ -15,7 +15,7 @@
defer Teardown()
pager := extensions.List(Client)
- err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+ err := pager.EachPage(func(page pagination.Page) (bool, error) {
t.Logf("--- Page ---")
exts, err := extensions.ExtractExtensions(page)
diff --git a/acceptance/openstack/networking/v2/network_test.go b/acceptance/openstack/networking/v2/network_test.go
index 6eb7182..b24b490 100644
--- a/acceptance/openstack/networking/v2/network_test.go
+++ b/acceptance/openstack/networking/v2/network_test.go
@@ -11,6 +11,7 @@
"github.com/rackspace/gophercloud/openstack"
"github.com/rackspace/gophercloud/openstack/networking/v2/networks"
"github.com/rackspace/gophercloud/openstack/utils"
+ "github.com/rackspace/gophercloud/pagination"
th "github.com/rackspace/gophercloud/testhelper"
)
@@ -47,8 +48,8 @@
Setup(t)
defer Teardown()
- pager := networks.List(Client, networks.ListOpts{})
- err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+ pager := networks.List(Client, networks.ListOpts{Limit: 2})
+ err := pager.EachPage(func(page pagination.Page) (bool, error) {
t.Logf("--- Page ---")
networks, err := networks.ExtractNetworks(page)