Brad Ison | 53e997c | 2016-03-26 18:02:05 -0400 | [diff] [blame^] | 1 | package policies |
| 2 | |
| 3 | import ( |
| 4 | "github.com/rackspace/gophercloud" |
| 5 | "github.com/rackspace/gophercloud/pagination" |
| 6 | ) |
| 7 | |
| 8 | // List returns all scaling policies for a group. |
| 9 | func 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 | } |