tesk.services package¶
Submodules¶
tesk.services.constants module¶
tesk.services.exceptions module¶
- class tesk.services.exceptions.ServiceStatusCodes[source]¶
Bases:
object- BAD_REQUEST = 400¶
- CONFLICT = 409¶
- CREATED = 201¶
- FORBIDDEN = 403¶
- GATEWAY_TIMEOUT = 504¶
- INTERNAL_SERVER_ERROR = 500¶
- NOT_FOUND = 404¶
- NOT_IMPLEMENTED = 501¶
- OK = 200¶
- REDIRECT = 300¶
- SERVICE_UNAVAILABLE = 503¶
- UNAUTHORIZED = 401¶
tesk.services.filer module¶
- tesk.services.filer.copyDir(src, dst)[source]¶
Limitation of shutil.copytree:
The destination directory, named by dst, must not already exist; it will be created as well as missing parent directories.
- tesk.services.filer.copyFile(src, dst)[source]¶
Limitations of shutil.copy:
It does not interpret * as a glob, but as a character.
- tesk.services.filer.ftp_check_directory(ftp_connection, path)[source]¶
Following convention with the rest of the code, return 0 if it is a directory, 1 if it is not or failed to do the check
- tesk.services.filer.ftp_download_file(ftp_connection, remote_source_path, local_destination_path)[source]¶
- tesk.services.filer.ftp_upload_file(ftp_connection, local_source_path, remote_destination_path)[source]¶
- tesk.services.filer.process_file(ttype, filedata)[source]¶
@param ttype: str Can be ‘inputs’ or ‘outputs’
- tesk.services.filer.subfolders_in(whole_path)[source]¶
Returns all subfolders in a path, in order
>>> subfolders_in('/') ['/']
>>> subfolders_in('/this/is/a/path') ['/this', '/this/is', '/this/is/a', '/this/is/a/path']
>>> subfolders_in('this/is/a/path') ['this', 'this/is', 'this/is/a', 'this/is/a/path']
tesk.services.filer_class module¶
- class tesk.services.filer_class.Filer(name, data, filer_name='eu.gcr.io/tes-wes/filer', filer_version='v0.5', pullPolicyAlways=False, json_pvc=None)[source]¶
Bases:
object- add_netrc_mount(netrc_name='netrc')[source]¶
Sets $HOME to an arbitrary location (to prevent its change as a result of runAsUser), currently hardcoded to /opt/home Mounts the secret netrc into that location: $HOME/.netrc.
- add_s3_mount()[source]¶
Mounts the s3 configuration file. The secret name is hardcoded and set to ‘aws-secret’.
tesk.services.filer_s3 module¶
tesk.services.job module¶
tesk.services.path module¶
tesk.services.pvc module¶
tesk.services.taskmaster module¶
tesk.services.transput module¶
tesk.services.utils module¶
Module contents¶
_summary_:service (tesk_core) package initialization file.