def describe(self, entities=None, entity=None): identifiers = {} v = entities if entity and not entities: deprecation( "Sensor.describe(e) deprecated; use Sensor.describe(entities=e)." ) v = entity if not isinstance(v, MutableSequence): v = [v] for k, client in self.client_registry.items(): identifiers.update( {k: client.describe(entities=v, sensor_id=self.id)}) return identifiers
def send(self, events=None, event=None, described_objects=None): identifiers = {} v = events if event and not events: deprecation( "Sensor.send(event=e) deprecated; use Sensor.send(events=e).") v = event if not isinstance(v, MutableSequence): v = [v] for k, client in self.client_registry.items(): identifiers.update({ k: client.send(events=v, described_objects=described_objects, sensor_id=self.id) }) return identifiers
def send_batch(self, event_list=None, described_objects=None): deprecation( "Sensor.send_batch(event_list=e) deprecated; use Sensor.send(events=e)." ) self.send(events=event_list, described_objects=described_objects)
def describe_batch(self, entity_list=None): deprecation( "Sensor.describe_batch(entity_list=e) deprecated; use Sensor.describe(entities=e)." ) self.describe(entities=entity_list)