SandboxStoreClient
Client for the SandboxStore. Will connect to the WorkloadManagement/SandboxStore service.
- class DIRAC.WorkloadManagementSystem.Client.SandboxStoreClient.SandboxStoreClient(rpcClient=None, transferClient=None, smdb=False, **kwargs)
Bases:
object
- __init__(rpcClient=None, transferClient=None, smdb=False, **kwargs)
Constructor
- Parameters:
rpcClient (object) – SandboxStore service client (None by default)
transferClient (object) – client to upload/download sandboxes (None by default)
smdb (object) – SandboxMetadataDB object, or True if SandboxMetadataDB is to be instantiated for direct access or False if no direct access to the SandboxMetadataDB is done (default)
- assignSandboxToJob(jobId, sbLocation, sbType, ownerName='', ownerGroup='', eSetup='')
Assign SB to a job
- assignSandboxToPilot(pilotId, sbLocation, sbType, ownerName='', ownerGroup='', eSetup='')
Assign SB to a pilot
- assignSandboxesToJob(jobId, sbList, ownerName='', ownerGroup='', eSetup='')
Assign SB to a job
- assignSandboxesToPilot(pilotId, sbList, ownerName='', ownerGroup='', eSetup='')
Assign SB to a pilot
- downloadSandbox(sbLocation, destinationDir='', inMemory=False, unpack=True)
Download a sandbox file and keep it in bundled form
- downloadSandboxForJob(jobId, sbType, destinationPath='', inMemory=False, unpack=True)
Download SB for a job
- downloadSandboxForPilot(jobId, sbType, destinationPath='')
Download SB for a pilot
- getSandboxesForJob(jobId)
Download job sandbox
- getSandboxesForPilot(pilotId)
Get SB for a pilot
- unassignJobs(jobIdList)
Unassign SB to a job
- unassignPilots(pilotIdIdList)
Unassign SB to a pilot
- uploadFilesAsSandbox(fileList, sizeLimit=0, assignTo=None)
Send files in the fileList to a Sandbox service for the given jobID. This is the preferable method to upload sandboxes.
- a fileList item can be:
a string, which is an lfn name
a file name (real), that is supposed to be on disk, in the current directory
a fileObject that should be a BytesIO type of object
- Parameters:
assignTo (-) – Dict containing { ‘Job:<jobid>’ : ‘<sbType>’, … }
- uploadFilesAsSandboxForJob(fileList, jobId, sbType, sizeLimit=0)
Upload SB for a job
- uploadFilesAsSandboxForPilot(fileList, jobId, sbType, sizeLimit=0)
Upload SB for a pilot