Nova Hypervisors API
Adds in support to list all available hypervisors (detailed) for applications
such as monitoring and capacity planning.
For #179
Fix more API weirdness
For some reason this morning storage space started to (in gophercloud only
not via curl) return sizes as scientific notation
Stylistic changes for jrperritt
Change to be a marker paged type
Revert to single page results
Our environment doesn't support marker pages, so go for the backwards compatible
option.
Adding Aggregate to hypervisors API
Change-Id: I191f5a45de29ee3eb7e7e6554dcb4614ed73b39a
diff --git a/openstack/compute/v2/hypervisors/requests.go b/openstack/compute/v2/hypervisors/requests.go
new file mode 100644
index 0000000..3a66fcc
--- /dev/null
+++ b/openstack/compute/v2/hypervisors/requests.go
@@ -0,0 +1,21 @@
+package hypervisors
+
+import (
+ "github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/pagination"
+)
+
+// List makes a request against the API to list hypervisors.
+func List(client *gophercloud.ServiceClient) pagination.Pager {
+ return pagination.NewPager(client, hypervisorsListDetailURL(client), func(r pagination.PageResult) pagination.Page {
+ return HypervisorPage{pagination.SinglePageBase(r)}
+ })
+}
+
+
+func AggregateList(client *gophercloud.ServiceClient) pagination.Pager {
+ return pagination.NewPager(client, aggregatesListURL(client), func(r pagination.PageResult) pagination.Page {
+ return AggregatePage{pagination.SinglePageBase(r)}
+ })
+}
+