blob: d948d8f3064ff095793ba6e5f32bb6e8a91f0f8d [file] [log] [blame]
Brad Ison53e997c2016-03-26 18:02:05 -04001package policies
2
3import (
4 "github.com/rackspace/gophercloud"
5 "github.com/rackspace/gophercloud/pagination"
6)
7
8// List returns all scaling policies for a group.
9func List(client *gophercloud.ServiceClient, groupID string) pagination.Pager {
10 url := listURL(client, groupID)
11
12 createPageFn := func(r pagination.PageResult) pagination.Page {
13 return PolicyPage{pagination.SinglePageBase(r)}
14 }
15
16 return pagination.NewPager(client, url, createPageFn)
17}