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 | |
} |