SandboxStoreClient

Client for the SandboxStore. Will connect to the WorkloadManagement/SandboxStore service.

class DIRAC.WorkloadManagementSystem.Client.SandboxStoreClient.SandboxStoreClient(rpcClient=None, transferClient=None, **kwargs)

Bases: object

__init__(rpcClient=None, transferClient=None, **kwargs)

x.__init__(…) initializes x; see help(type(x)) for signature

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 StringIO.StringIO 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