Exemple #1
0
def onLogNotification(probeUri, logClass, logInfo):
    probeUri = str(probeUri)
    try:
        # if we receive the notification, that's we subscribe for the probe - normally
        if not WatchedProbes.has_key(probeUri):
            return

        if logClass == "system-sent":
            label = logInfo["label"]
            payload = logInfo["payload"]
            sutAddress = logInfo.get('sut-address', None)
            # TODO/FIXME: retrieve the tsiPort from the probeUri
            TestermanTCI.logSystemSent(tsiPort=probeUri,
                                       label=label,
                                       payload=payload,
                                       sutAddress=sutAddress)

        elif logClass == "system-received":
            label = logInfo["label"]
            payload = logInfo["payload"]
            sutAddress = logInfo.get('sut-address', None)
            # TODO/FIXME: retrieve the tsiPort from the probeUri
            TestermanTCI.logSystemReceived(tsiPort=probeUri,
                                           label=label,
                                           payload=payload,
                                           sutAddress=sutAddress)

    except Exception, e:
        log("Exception in onLogNotification: %s" % str(e))
Exemple #2
0
def onLogNotification(probeUri, logClass, logInfo):
	probeUri = str(probeUri)
	try:
		# if we receive the notification, that's we subscribe for the probe - normally
		if not WatchedProbes.has_key(probeUri): 
			return

		if logClass == "system-sent":
			label = logInfo["label"]
			payload = logInfo["payload"]
			sutAddress = logInfo.get('sut-address', None)
			# TODO/FIXME: retrieve the tsiPort from the probeUri
			TestermanTCI.logSystemSent(tsiPort = probeUri, label = label, payload = payload, sutAddress = sutAddress)

		elif logClass == "system-received":
			label = logInfo["label"]
			payload = logInfo["payload"]
			sutAddress = logInfo.get('sut-address', None)
			# TODO/FIXME: retrieve the tsiPort from the probeUri
			TestermanTCI.logSystemReceived(tsiPort = probeUri, label = label, payload = payload, sutAddress = sutAddress)

	except Exception, e:
		log("Exception in onLogNotification: %s" % str(e))
Exemple #3
0
 def logReceivedPayload(self, label, payload, sutAddress=None):
     TestermanTCI.logSystemReceived(tsiPort=self.getUri(),
                                    label=label,
                                    payload=payload,
                                    sutAddress=sutAddress)
Exemple #4
0
	def logReceivedPayload(self, label, payload, sutAddress = None):
		TestermanTCI.logSystemReceived(tsiPort = self.getUri(), label = label, payload = payload, sutAddress = sutAddress)