Lists the active alarms.

        Remark that this does not query the archive. Only active alarms on the
        current processor are returned.

        :param ~datetime.datetime start: Minimum trigger time of the returned alarms (inclusive)
        :param ~datetime.datetime stop: Maximum trigger time of the returned alarms (exclusive)
        :rtype: ~collections.Iterable[.Alarm]

def list_alarms(self, start=None, stop=None):
        """
        Lists the active alarms.

        Remark that this does not query the archive. Only active alarms on the
        current processor are returned.

        :param ~datetime.datetime start: Minimum trigger time of the returned alarms (inclusive)
        :param ~datetime.datetime stop: Maximum trigger time of the returned alarms (exclusive)
        :rtype: ~collections.Iterable[.Alarm]
        """
        # TODO implement continuation token on server
        params = {
            'order': 'asc'
        }
        if start is not None:
            params['start'] = to_isostring(start)
        if stop is not None:
            params['stop'] = to_isostring(stop)
        # Server does not do pagination on listings of this resource.
        # Return an iterator anyway for similarity with other API methods
        url = '/processors/{}/{}/alarms'.format(self._instance, self._processor)
        response = self._client.get_proto(path=url, params=params)
        message = rest_pb2.ListAlarmsResponse()
        message.ParseFromString(response.content)
        alarms = getattr(message, 'alarm')
        return iter([Alarm(alarm) for alarm in alarms])