Adding support for os-servcies in compute
Change-Id: I8f52c074d9f3a4f1cff231fd5da93523c172b43d
diff --git a/openstack/compute/v2/extensions/os-services/results.go b/openstack/compute/v2/extensions/os-services/results.go
new file mode 100644
index 0000000..17cf1b4
--- /dev/null
+++ b/openstack/compute/v2/extensions/os-services/results.go
@@ -0,0 +1,24 @@
+package os_services
+
+import "gerrit.mcp.mirantis.net/debian/gophercloud.git/pagination"
+
+type OsService struct {
+ ID string `json:"id"`
+ Host string `json:"host"`
+ State string `json:"state"`
+ Status string `json:"status"`
+ Zone string `json:"zone"`
+ Binary string `json:"binary"`
+}
+
+type OsServicePage struct {
+ pagination.SinglePageBase
+}
+
+func ExtractOsServices(r pagination.Page) ([]OsService, error) {
+ var s struct {
+ OsServices []OsService `json:"agents"`
+ }
+ err := (r.(OsServicePage)).ExtractInto(&s)
+ return s.OsServices, err
+}