Simon Murray | a9d5de4 | 2016-11-03 15:06:44 +0000 | [diff] [blame] | 1 | package hypervisors |
| 2 | |
| 3 | import ( |
Krzysztof Szukiełojć | 3f41d08 | 2017-05-07 14:43:06 +0200 | [diff] [blame] | 4 | "gerrit.mcp.mirantis.net/debian/gophercloud.git" |
Krzysztof Szukiełojć | 24a29ce | 2017-05-07 14:24:02 +0200 | [diff] [blame] | 5 | "gerrit.mcp.mirantis.net/debian/gophercloud.git/pagination" |
Simon Murray | a9d5de4 | 2016-11-03 15:06:44 +0000 | [diff] [blame] | 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 | |