package unipede import "net/http" type ( DeviceDependents struct { Count int `json:"count" bson:"count"` Data []Dependent `json:"data" bson:"data"` } Dependent struct { DC string `json:"dc" bson:"dc"` Id int `json:"id" bson:"id"` Hostname string `json:"hostname" bson:"hostname"` ManagementIP string `json:"management_ip" bson:"management_ip"` ChassisModel string `json:"chassis_model" bson:"chassis_model"` ZenossUID string `json:"zenoss_uid" bson:"zenoss_uid"` ZenossUUID string `json:"zenoss_uuid" bson:"zenoss_uuid"` ZenossState string `json:"zenoss_state" bson:"zenoss_state"` OSVersion string `json:"os_version" bson:"os_version"` CoreID int `json:"core_id" bson:"core_id"` PathNorth string `json:"path_north" bson:"path_north"` Depth int `json:"depth" bson:"depth"` Role string `json:"role" bson:"role"` Service string `json:"service" bson:"service"` Cabinet string `json:"cabinet" bson:"cabinet"` OS string `json:"os" bson:"os"` Address string `json:"address" bson:"address"` UpDeviceID int `json:"up_device_id" bson:"up_device_id"` CoreAccount int `json:"core_account" bson:"core_account"` CoreDevice int `json:"core_device" bson:"core_device"` FEPort int `json:"fe_port" bson:"fe_port"` PortType string `json:"port_type" bson:"port_type"` Created string `json:"created" bson:"created"` Updated string `json:"updated" bson:"updated"` } ) func (u *Client) DeviceDependents(switchName string, refresh *int, options ...*UnipedeOptions) (DeviceDependents, error) { ret := new(DeviceDependents) o := processOptions(refresh, nil, options...) req, err := u.newRequest(unipedeURL+"devices/"+switchName+"/dependents", http.MethodGet, o, nil) if err != nil { return *ret, err } _, err = u.do(req, o, ret) return *ret, err }