blob: 3ed14872ccba4ba48d18ac3ccc0d8cdd97a9eb99 [file] [log] [blame]
package agents
import "gerrit.mcp.mirantis.net/debian/gophercloud.git/pagination"
type Agent struct {
Host string `json:"host"`
Service string `json:"service"`
AvailabilityZone string `json:"availability_zone"`
AdminStateUp string `json:"admin_state_up"`
Alive bool `json:"alive"`
}
type AgentPage struct {
pagination.LinkedPageBase
}
func ExtractAgents(r pagination.Page) ([]Agent, error) {
var s struct {
Agents []Agent `json:"agents"`
}
err := (r.(AgentPage)).ExtractInto(&s)
return s.Agents, err
}