testing/trigger_scripts/perf_device_trigger.py
def _query_swarming_for_eligible_bot_configs(self, dimensions):
        """Query Swarming to figure out which bots are available.

        Returns: a dictionary in which the keys are the bot id and
        the values are Bot object that indicate the health status
        of the bots.
        """

        query_result = self.list_bots(dimensions,
                                      server=self._swarming_server)
        perf_bots = {}
        for bot in query_result:
            # Device maintenance is usually quick, and we can wait for it to
            # finish. However, if the device is too hot, it can take a long time
            # for it to cool down, so check for 'Device temperature' in
            # maintenance_msg.
            alive = (not bot.get('is_dead') and not bot.get('quarantined')
                     and 'Device temperature' not in bot.get(
                         'maintenance_msg', ''))
            perf_bots[bot['bot_id']] = Bot(bot['bot_id'], alive)
        return perf_bots
Query Swarming to figure out which bots are available.

        Returns: a dictionary in which the keys are the bot id and
        the values are Bot object that indicate the health status
        of the bots.
        
Query Swarming to figure out which bots are available.
Returns: a dictionary in which the keys are the bot id and
the values are Bot object that indicate the health status
of the bots.
Query Swarming to figure out which bots are available . Returns : a dictionary in which the keys are the bot id and the values are Bot object that indicate the health status of the bots .
def _query_swarming_for_eligible_bot_configs(self, dimensions):
        query_result = self.list_bots(dimensions,
                                      server=self._swarming_server)
        perf_bots = {}
        for bot in query_result:
            alive = (not bot.get('is_dead') and not bot.get('quarantined')
                     and 'Device temperature' not in bot.get(
                         'maintenance_msg', ''))
            perf_bots[bot['bot_id']] = Bot(bot['bot_id'], alive)
        return perf_bots
def _query_swarming_for_eligible_bot_configs ( self , dimensions ) : query_result = self . list_bots ( dimensions , server = self . _swarming_server ) perf_bots = { } for bot in query_result : alive = ( not bot . get ( 'is_dead' ) and not bot . get ( 'quarantined' ) and 'Device temperature' not in bot . get ( 'maintenance_msg' , '' ) ) perf_bots [ bot [ 'bot_id' ] ] = Bot ( bot [ 'bot_id' ] , alive ) return perf_bots
Query Swarming to figure out which bots are available.
Query Swarming to figure out which bots are available .
"""Query Swarming to figure out which bots are available.

        Returns: a dictionary in which the keys are the bot id and
        the values are Bot object that indicate the health status
        of the bots.
        """ # Device maintenance is usually quick, and we can wait for it to # finish. However, if the device is too hot, it can take a long time # for it to cool down, so check for 'Device temperature' in # maintenance_msg.
self
dimensions