(self, context, bay)
return {res.resource_name: res.resource_status_reason
                for res in failed_resources}
Collect fault info from heat resources of given bay

        and store them into bay.bay_faults.
Collect fault info from heat resources of given bay
Collect fault info from heat resources of given bay
def _collect_fault_info(self, context, bay):
        """Collect fault info from heat resources of given bay

        and store them into bay.bay_faults.
        """
        osc = clients.OpenStackClients(context)
        filters = {'status': 'FAILED'}
        try:
            failed_resources = osc.heat().resources.list(
                bay.stack_id, nested_depth=2, filters=filters)
        except Exception as e:
            failed_resources = []
            LOG.warning("Failed to retrieve failed resources for "
                        "bay %(bay)s from Heat stack %(stack)s "
                        "due to error: %(e)s",
                        {'bay': bay.uuid, 'stack': bay.stack_id, 'e': e},
                        exc_info=True)

        return {res.resource_name: res.resource_status_reason
                for res in failed_resources}
def _collect_fault_info ( self , context , bay ) : osc = clients . OpenStackClients ( context ) filters = { 'status' : 'FAILED' } try : failed_resources = osc . heat ( ) . resources . list ( bay . stack_id , nested_depth = 2 , filters = filters ) except Exception as e : failed_resources = [ ] LOG . warning ( "Failed to retrieve failed resources for " "bay %(bay)s from Heat stack %(stack)s " "due to error: %(e)s" , { 'bay' : bay . uuid , 'stack' : bay . stack_id , 'e' : e } , exc_info = True ) return { res . resource_name : res . resource_status_reason for res in failed_resources }