blob: 344e675f55b8c5cbf08e389121b2855d3ae8148c [file] [log] [blame]
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
}