bartender.filesystems.dirac#

Attributes#

Classes#

DiracFileSystem

Interact with DIRAC storage elements.

Functions#

_check_for_failure(→ None)

Module Contents#

bartender.filesystems.dirac.logger#
class bartender.filesystems.dirac.DiracFileSystem(config: bartender.filesystems.dirac_config.DiracFileSystemConfig)#

Bases: bartender.filesystems.abstract.AbstractFileSystem

Interact with DIRAC storage elements.

Parameters:

config (bartender.filesystems.dirac_config.DiracFileSystemConfig) –

lfn_root#
storage_element#
dm#
localize_description(description: bartender.schedulers.abstract.JobDescription, entry: pathlib.Path) bartender.schedulers.abstract.JobDescription#

Make given job description local to this file system.

Parameters:
  • description (bartender.schedulers.abstract.JobDescription) – A job description.

  • entry (pathlib.Path) – The path to replace with the entry path of this file system. For example given a file system with entry path of /remote/jobs and given job_dir in job description of /local/jobs/myjobid and given entry of /local/jobs will return description with job dir /remote/jobs/myjobid .

Returns:

A job description local to this file system.

Return type:

bartender.schedulers.abstract.JobDescription

async upload(src: bartender.schedulers.abstract.JobDescription, target: bartender.schedulers.abstract.JobDescription) None#

Uploads job directory of source description to job directory of target.

A tar archive of the src.job_dir will be uploaded. The tar archive will be named target.job_dir / input.tar.

Parameters:
Return type:

None

async download(src: bartender.schedulers.abstract.JobDescription, target: bartender.schedulers.abstract.JobDescription) None#

Download job directory of source description to job directory of target.

A tar archive with name src.job_dir / output.tar will be downloaded. The tar archive will be unpacked to target.job_dir.

Parameters:
Return type:

None

async close() None#

Close filesystem.

Return type:

None

async delete(description: bartender.schedulers.abstract.JobDescription) None#

Delete job directory of description.

Parameters:

description (bartender.schedulers.abstract.JobDescription) – The job description.

Return type:

None

async _pack(root_dir: pathlib.Path, container_dir: pathlib.Path) pathlib.Path#
Parameters:
Return type:

pathlib.Path

bartender.filesystems.dirac._check_for_failure(result: Any) None#
Parameters:

result (Any) –

Return type:

None