changes sensor_filter to return sensor_info that contains dev_labels

This commit is contained in:
Christian Klopp 2018-01-30 17:17:52 +01:00
parent 1ee4957c3c
commit 5066bb29d1

View File

@ -21,9 +21,13 @@ class OrionContextBroker(ResourceManagementXAE):
def _on_register(self): def _on_register(self):
self._discover_openmtc_ipe_entities() self._discover_openmtc_ipe_entities()
def _sensor_filter(self, sensor): def _new_actuator(self, actuator_info):
# handle OCB actuator here
pass
def _sensor_filter(self, sensor_info):
if self.labels: if self.labels:
return len(self.labels.intersection(sensor.labels)) > 0 return len(self.labels.intersection(sensor_info['sensor_labels'])) > 0
else: else:
return True return True