def handleProbeQuery(cls): """Handle request to give the probes""" probes = ProbeStorage.getAllProbes() dprobes = [] for probe in probes: status = [] if probe.getId() == Identification.PROBE_ID: status.append(pd.ProbeStatus.LOCAL) status.append(pd.ProbeStatus.ADDED) if probe.connected: status.append(pd.ProbeStatus.CONNECTED) dprobes.append( pd.Probe(probe.getId(), probe.getIp(), pd.statusFactory(status))) return cconsts.Params.CODEC.encode(dprobes)
def handleProbeQuery(cls): """Handle request to give the probes""" probes = ProbeStorage.getAllProbes() dprobes = [] for probe in probes: status = [] if probe.getId() == Identification.PROBE_ID: status.append(pd.ProbeStatus.LOCAL) status.append(pd.ProbeStatus.ADDED) if probe.connected: status.append(pd.ProbeStatus.CONNECTED) dprobes.append(pd.Probe(probe.getId(), probe.getIp(), pd.statusFactory(status))) return cconsts.Params.CODEC.encode(dprobes)
def getAllProbes(cls): return ProbeStorage.getAllProbes()