@lockutils.synchronized('<STR_LIT>', '<STR_LIT>')<EOL><INDENT>def handle_non_responding_hosting_devices(self, context, hosting_devices,<EOL>affected_resources):<DEDENT>
LOG.debug('<STR_LIT>')<EOL>for hd in hosting_devices:<EOL><INDENT>hd_bindings_db = self._get_hosting_device_bindings(context,<EOL>hd['<STR_LIT:id>'])<EOL>router_ids = []<EOL>with context.session.begin(subtransactions=True):<EOL><INDENT>for binding_db in hd_bindings_db:<EOL><INDENT>if binding_db.auto_schedule is True:<EOL><INDENT>self.unschedule_router_from_hosting_device(context,<EOL>binding_db)<EOL>binding_db.hosting_device_id = None<EOL>router_ids.append(binding_db.router_id)<EOL>self._backlog_router(context, binding_db)<EOL><DEDENT><DEDENT><DEDENT>if router_ids:<EOL><INDENT>try:<EOL><INDENT>affected_resources[hd['<STR_LIT:id>']].update(<EOL>{'<STR_LIT>': router_ids})<EOL><DEDENT>except KeyError:<EOL><INDENT>affected_resources[hd['<STR_LIT:id>']] = {'<STR_LIT>': router_ids}<EOL><DEDENT>notifier = self.agent_notifiers.get(AGENT_TYPE_L3_CFG)<EOL>if notifier:<EOL><INDENT>notifier.routers_removed_from_hosting_device(<EOL>context, router_ids, hd)<EOL><DEDENT><DEDENT><DEDENT>LOG.debug('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>
Handle hosting devices determined to be "dead".

        This function is called by the hosting device manager.
        Service plugins are supposed to extend the 'affected_resources'
        dictionary. Hence, we add the uuid of Neutron routers that are
        hosted in <hosting_devices>.

        param: hosting_devices - list of dead hosting devices
        param: affected_resources - dict with list of affected logical
                                    resources per hosting device:
             {'hd_uuid1': {'routers': [uuid1, uuid2, ...],
                           'fw': [uuid1, ...],
                           ...},
              'hd_uuid2': {'routers': [uuid3, uuid4, ...],
                           'fw': [uuid1, ...],
                           ...},
             ...}