Example #1
0
        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)
Example #2
0
        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)
Example #3
0
 def getAllProbes(cls):
     return ProbeStorage.getAllProbes()