FTS3Utilities¶
Some utilities for FTS3…
- class DIRAC.DataManagementSystem.private.FTS3Utilities.FTS3ServerPolicy(serverDict, serverPolicy='Random')¶
Bases:
object
This class manages the policy for choosing a server
- __init__(serverDict, serverPolicy='Random')¶
Call the init of the parent, and initialize the list of FTS3 servers
- chooseFTS3Server()¶
Choose the appropriate FTS3 server depending on the policy
- DIRAC.DataManagementSystem.private.FTS3Utilities.getFTS3Plugin(vo=None)¶
Return an instance of the FTS3Plugin configured in the CS
- Parameters
vo – vo config to look for
- DIRAC.DataManagementSystem.private.FTS3Utilities.groupFilesByTarget(ftsFiles)¶
For a list of FTS3files object, group the Files by target
- Parameters
ftsFiles – list of FTS3File object
- Returns
{targetSE : [ ftsFiles] } }
- DIRAC.DataManagementSystem.private.FTS3Utilities.selectUniqueSource(ftsFiles, fts3Plugin, allowedSources=None)¶
For a list of FTS3files object, select a random source, and group the files by source.
We also return the FTS3Files for which we had problems getting replicas
- Parameters
ftsFiles – list of FTS3File object
fts3Plugin – plugin instance to use to chose between sources
allowedSources – list of allowed sources
- Returns
S_OK(({ sourceSE: [ FTS3Files] }, {FTS3File: errors}))