blob: 17cf1b4907826d7b1f715be5e67f3ad34d9e35ff [file] [log] [blame]
Krzysztof Szukiełojć6b2d29f2017-05-15 11:55:02 +02001package os_services
2
3import "gerrit.mcp.mirantis.net/debian/gophercloud.git/pagination"
4
5type OsService struct {
6 ID string `json:"id"`
7 Host string `json:"host"`
8 State string `json:"state"`
9 Status string `json:"status"`
10 Zone string `json:"zone"`
11 Binary string `json:"binary"`
12}
13
14type OsServicePage struct {
15 pagination.SinglePageBase
16}
17
18func ExtractOsServices(r pagination.Page) ([]OsService, error) {
19 var s struct {
20 OsServices []OsService `json:"agents"`
21 }
22 err := (r.(OsServicePage)).ExtractInto(&s)
23 return s.OsServices, err
24}