@read_session
def get_RSEcoverage_of_dataset(scope, name, session=None):
    '\n    Get total bytes present on RSEs\n\n    :param scope:             Scope of the dataset\n    :param name:              Name of the dataset\n    :param session:           The db session.\n    :return:                  Dictionary { rse_id : <total bytes present at rse_id> }\n    '
    query = session.query(models.RSEFileAssociation.rse_id, func.sum(models.DataIdentifierAssociation.bytes))
    query = query.filter(and_((models.DataIdentifierAssociation.child_scope == models.RSEFileAssociation.scope), (models.DataIdentifierAssociation.child_name == models.RSEFileAssociation.name), (models.DataIdentifierAssociation.scope == scope), (models.DataIdentifierAssociation.name == name), (models.RSEFileAssociation.state != ReplicaState.BEING_DELETED)))
    query = query.group_by(models.RSEFileAssociation.rse_id)
    result = {}
    for (rse_id, total) in query:
        if total:
            result[rse_id] = total
    return result
Get total bytes present on RSEs

:param scope:             Scope of the dataset
:param name:              Name of the dataset
:param session:           The db session.
:return:                  Dictionary { rse_id : <total bytes present at rse_id> }
@read_session
def get_RSEcoverage_of_dataset(scope, name, session=None):
    '\n    Get total bytes present on RSEs\n\n    :param scope:             Scope of the dataset\n    :param name:              Name of the dataset\n    :param session:           The db session.\n    :return:                  Dictionary { rse_id : <total bytes present at rse_id> }\n    '
    query = session.query(models.RSEFileAssociation.rse_id, func.sum(models.DataIdentifierAssociation.bytes))
    query = query.filter(and_((models.DataIdentifierAssociation.child_scope == models.RSEFileAssociation.scope), (models.DataIdentifierAssociation.child_name == models.RSEFileAssociation.name), (models.DataIdentifierAssociation.scope == scope), (models.DataIdentifierAssociation.name == name), (models.RSEFileAssociation.state != ReplicaState.BEING_DELETED)))
    query = query.group_by(models.RSEFileAssociation.rse_id)
    result = {}
    for (rse_id, total) in query:
        if total:
            result[rse_id] = total
    return result