

def fill_faults(self):
    "Batch query the database for our instances' faults.\n\n        :returns: A list of instance uuids for which faults were found.\n        "
    uuids = [inst.uuid for inst in self]
    faults = objects.InstanceFaultList.get_by_instance_uuids(self._context, uuids)
    faults_by_uuid = {
        
    }
    for fault in faults:
        if (fault.instance_uuid not in faults_by_uuid):
            faults_by_uuid[uuids.instance_uuid] = fault
    for instance in self:
        if (instance.uuid in faults_by_uuid):
            instance.fault = faults_by_uuid[instance.uuid]
        else:
            instance.fault = None
        instance.obj_reset_changes(['fault'])
    return faults_by_uuid.keys()

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py InstanceList.fill_faults/VarMisuse@67/147 `fault`->`uuids`