def check_backlogged_hosting_devices(self, driver_mgr):
response_dict = {'<STR_LIT>': [], '<STR_LIT>': [], '<STR_LIT>': []}<EOL>LOG.debug("<STR_LIT>",<EOL>self.hosting_devices_backlog.keys())<EOL>for hd_id in self.hosting_devices_backlog.keys():<EOL><INDENT>hd = self.hosting_devices_backlog[hd_id]['<STR_LIT>']<EOL>if not timeutils.is_older_than(hd['<STR_LIT>'],<EOL>hd['<STR_LIT>']):<EOL><INDENT>LOG.info("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': hd_id, '<STR_LIT>': hd['<STR_LIT>']})<EOL>continue<EOL><DEDENT>LOG.info("<STR_LIT>"<EOL>"<STR_LIT>", {'<STR_LIT>': hd_id,<EOL>'<STR_LIT>': hd['<STR_LIT>']})<EOL>hd_state = hd['<STR_LIT>']<EOL>if _is_pingable(hd['<STR_LIT>']):<EOL><INDENT>if hd_state == cc.HD_NOT_RESPONDING:<EOL><INDENT>LOG.debug("<STR_LIT>" %<EOL>(pprint.pformat(hd)))<EOL>hd['<STR_LIT>'] = cc.HD_ACTIVE<EOL>response_dict['<STR_LIT>'].append(hd_id)<EOL><DEDENT>elif hd_state == cc.HD_DEAD:<EOL><INDENT>if _can_connect(hd['<STR_LIT>'],<EOL>hd['<STR_LIT>']) is True:<EOL><INDENT>LOG.debug("<STR_LIT>" %<EOL>(pprint.pformat(hd)))<EOL>hd['<STR_LIT>'] = cc.HD_ACTIVE<EOL>response_dict['<STR_LIT>'].append(hd_id)<EOL><DEDENT>else:<EOL><INDENT>LOG.debug("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT:p>': hd['<STR_LIT>'],<EOL>'<STR_LIT>': hd['<STR_LIT>']})<EOL><DEDENT><DEDENT>else:<EOL><INDENT>LOG.debug("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % hd_state)<EOL><DEDENT>LOG.info("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': hd_id, '<STR_LIT>': hd['<STR_LIT>']})<EOL><DEDENT>else:<EOL><INDENT>LOG.info("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': hd_id,<EOL>'<STR_LIT>': hd['<STR_LIT>'],<EOL>'<STR_LIT>': hd['<STR_LIT>']})<EOL>if hd_state == cc.HD_ACTIVE:<EOL><INDENT>LOG.debug("<STR_LIT>" %<EOL>(pprint.pformat(hd)))<EOL>hd['<STR_LIT>'] = timeutils.utcnow()<EOL>hd['<STR_LIT>'] = cc.HD_NOT_RESPONDING<EOL><DEDENT>elif hd_state == cc.HD_NOT_RESPONDING:<EOL><INDENT>if timeutils.is_older_than(<EOL>hd['<STR_LIT>'],<EOL>cfg.CONF.cfg_agent.hosting_device_dead_timeout):<EOL><INDENT>hd['<STR_LIT>'] = cc.HD_DEAD<EOL>LOG.debug("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': hd_id,<EOL>'<STR_LIT>': hd['<STR_LIT>'],<EOL>'<STR_LIT:time>': cfg.CONF.cfg_agent.<EOL>hosting_device_dead_timeout})<EOL>response_dict['<STR_LIT>'].append(hd_id)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>LOG.debug("<STR_LIT>", response_dict)<EOL>return response_dict<EOL>
Checks the status of backlogged hosting devices.

        Skips newly spun up instances during their booting time as specified
        in the boot time parameter.

        Each hosting-device tracked has a key, hd_state, that represents the
        last known state for the hosting device.  Valid values for hd_state
        are ['Active', 'Unknown', 'Dead']

        Each time check_backlogged_hosting_devices is invoked, a ping-test
        is performed to determine the current state.  If the current state
        differs, hd_state is updated.

        The hd_state transitions/actions are represented by the following
        table.

        +------------+---------------------+----------------+----------------+
        | current /  | Active              | Unknown        | Dead           |
        | last state |                     |                |                |
        +============+=====================+================+================+
        | Active     | Device is reachable.| Device was     | Dead device    |
        |            | No state change     | temporarily    | recovered.     |
        |            |                     | unreachable.   | Trigger resync |
        +------------+---------------------+----------------+----------------+
        | Unknown    | Device connectivity | Device         | Not a valid    |
        |            | test failed.  Set   | connectivity   | state          |
        |            | backlog timestamp   | test failed.   | transition.    |
        |            | and wait for dead   | Dead timeout   |                |
        |            | timeout to occur.   | has not        |                |
        |            |                     | occurred yet.  |                |
        +------------+---------------------+----------------+----------------+
        | Dead       | Not a valid state   | Dead timeout   | Device is      |
        |            | transition.         | for device has | still dead.    |
        |            |                     | elapsed.       | No state       |
        |            |                     | Notify plugin  | change.        |
        +------------+---------------------+----------------+----------------+

        :returns: A dict of the format:

        ::

          {"reachable": [<hd_id>,..],
          "dead": [<hd_id>,..],
          "revived": [<hd_id>,..]}

        * reachable - a list of hosting devices that are now reachable
        * dead      - a list of hosting devices deemed dead
        * revived   - a list of hosting devices (dead to active)