| package agents | |
| import "gerrit.mcp.mirantis.net/debian/gophercloud.git/pagination" | |
| type Agent struct { | |
| Host string `json:"host"` | |
| Binary string `json:"binary"` | |
| AvailabilityZone string `json:"availability_zone"` | |
| AdminStateUp bool `json:"admin_state_up"` | |
| Alive bool `json:"alive"` | |
| } | |
| type AgentPage struct { | |
| pagination.SinglePageBase | |
| } | |
| func ExtractAgents(r pagination.Page) ([]Agent, error) { | |
| var s struct { | |
| Agents []Agent `json:"agents"` | |
| } | |
| err := (r.(AgentPage)).ExtractInto(&s) | |
| return s.Agents, err | |
| } |