Change identity endpoints and services.
diff --git a/openstack/identity/v3/services/requests.go b/openstack/identity/v3/services/requests.go
index 7bc4a82..af2ce54 100644
--- a/openstack/identity/v3/services/requests.go
+++ b/openstack/identity/v3/services/requests.go
@@ -6,6 +6,7 @@
"github.com/racker/perigee"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/openstack/utils"
+ "github.com/rackspace/gophercloud/pagination"
)
type response struct {
@@ -42,7 +43,7 @@
}
// List enumerates the services available to a specific user.
-func List(client *gophercloud.ServiceClient, opts ListOpts) gophercloud.Pager {
+func List(client *gophercloud.ServiceClient, opts ListOpts) pagination.Pager {
q := make(map[string]string)
if opts.ServiceType != "" {
q["type"] = opts.ServiceType
@@ -55,15 +56,11 @@
}
u := getListURL(client) + utils.BuildQuery(q)
- countPage := func(p gophercloud.Page) (int, error) {
- services, err := ExtractServices(p)
- if err != nil {
- return 0, err
- }
- return len(services), nil
+ createPage := func(r pagination.LastHTTPResponse) pagination.Page {
+ return ServicePage{pagination.LinkedPageBase(r)}
}
- return gophercloud.NewLinkedPager(client, u, countPage)
+ return pagination.NewLinkedPager(client, u, createPage)
}
// Get returns additional information about a service, given its ID.