Simon Murray | a9d5de4 | 2016-11-03 15:06:44 +0000 | [diff] [blame^] | 1 | package hypervisors |
| 2 | |
| 3 | import ( |
| 4 | "github.com/gophercloud/gophercloud" |
| 5 | "github.com/gophercloud/gophercloud/pagination" |
| 6 | ) |
| 7 | |
| 8 | // List makes a request against the API to list hypervisors. |
| 9 | func List(client *gophercloud.ServiceClient) pagination.Pager { |
| 10 | return pagination.NewPager(client, hypervisorsListDetailURL(client), func(r pagination.PageResult) pagination.Page { |
| 11 | return HypervisorPage{pagination.SinglePageBase(r)} |
| 12 | }) |
| 13 | } |
| 14 | |
| 15 | |
| 16 | func AggregateList(client *gophercloud.ServiceClient) pagination.Pager { |
| 17 | return pagination.NewPager(client, aggregatesListURL(client), func(r pagination.PageResult) pagination.Page { |
| 18 | return AggregatePage{pagination.SinglePageBase(r)} |
| 19 | }) |
| 20 | } |
| 21 | |