Functions | |
| str | _remote_join (str remote, *str parts) |
| Join path components without corrupting rclone remote syntax. | |
| str | _object_remote (dict profile, str archive_id, *str parts) |
| Return the remote path for one immutable archive object. | |
| str | _blob_remote (dict profile, str digest) |
| Return the remote path of one content-addressed payload blob. | |
| None | _ensure_blob_directory (dict profile, str digest) |
| Create the directory a blob is stored in, once, before any upload into it. | |
| str | _chunk_remote_path (dict profile, str archive_id, dict chunk) |
| Resolve where one manifest chunk's payload lives on the remote. | |
| bool | _remote_blob_present (dict profile, str digest) |
| Whether a blob with this digest is already stored and intact. | |
| str | _rclone_error_detail (str text) |
| The lines of rclone output that report the failure. | |
| subprocess.CompletedProcess | _run_rclone (list arguments, bool check=True) |
| Invoke rclone through the same argv-based subprocess boundary as other PICurv tools. | |
| str | _remote_sha256 (str remote_path) |
| Ask rclone to calculate or retrieve the SHA-256 of one remote object. | |
| dict | _upload_verified (str local_path, str remote_path) |
| Upload one file, then verify its remote SHA-256. | |
| bytes | _read_remote_bytes (str remote_path) |
| Read a small remote catalog object through rclone. | |
| dict | _load_remote_manifest (dict profile, str archive_id, bool require_complete=True) |
| Fetch and validate one versioned remote storage manifest. | |
Variables | |
| _CREATED_BLOB_DIRECTORIES = set() | |
| _BLOB_DIRECTORY_LOCK = threading.Lock() | |
| tuple | _RCLONE_NOT_FOUND_CODES = (3, 4) |
|
protected |
Join path components without corrupting rclone remote syntax.
| [in] | remote | Value supplied through the remote argument. |
| [in] | parts | Value supplied through the parts argument. |
Definition at line 38 of file transport.py.
|
protected |
Return the remote path for one immutable archive object.
| [in] | profile | Value supplied through the profile argument. |
| [in] | archive_id | Value supplied through the archive_id argument. |
| [in] | parts | Value supplied through the parts argument. |
Definition at line 54 of file transport.py.
|
protected |
Return the remote path of one content-addressed payload blob.
| [in] | profile | Active storage profile. |
| [in] | digest | Payload SHA-256. |
Definition at line 65 of file transport.py.
|
protected |
Create the directory a blob is stored in, once, before any upload into it.
Google Drive allows several folders with one name. Parallel uploads that each create a missing directory leave duplicates, and a later lookup by path sees only one of them, so a stored blob reads as missing. Creating each directory once, serially, gives every upload the same folder.
| [in] | profile | Active storage profile. |
| [in] | digest | Payload SHA-256 whose blob directory is needed. |
Definition at line 80 of file transport.py.
|
protected |
Resolve where one manifest chunk's payload lives on the remote.
Every chunk this schema writes is blob-addressed, resolved out of the shared content-addressed store. _load_remote_manifest already refuses any manifest whose schema version does not match the current one, so a non-blob chunk cannot reach this function from a manifest this build actually loads.
| [in] | profile | Active storage profile. |
| [in] | archive_id | Owning archive id. |
| [in] | chunk | Manifest chunk entry. |
Definition at line 97 of file transport.py.
|
protected |
Whether a blob with this digest is already stored and intact.
| [in] | profile | Active storage profile. |
| [in] | digest | Payload SHA-256. |
Definition at line 116 of file transport.py.
|
protected |
The lines of rclone output that report the failure.
rclone prints advisories, such as a shared client ID's deprecation, as NOTICE lines ahead of the error, and reports some failures as NOTICE lines too ("Failed to cat"), so the lines kept are those naming a failure or error.
| [in] | text | rclone stderr or stdout. |
Definition at line 131 of file transport.py.
|
protected |
Invoke rclone through the same argv-based subprocess boundary as other PICurv tools.
| [in] | arguments | Value supplied through the arguments argument. |
| [in] | check | Value supplied through the check argument. |
Definition at line 146 of file transport.py.
|
protected |
Ask rclone to calculate or retrieve the SHA-256 of one remote object.
| [in] | remote_path | Value supplied through the remote_path argument. |
Definition at line 168 of file transport.py.
|
protected |
Upload one file, then verify its remote SHA-256.
| [in] | local_path | Value supplied through the local_path argument. |
| [in] | remote_path | Value supplied through the remote_path argument. |
Definition at line 182 of file transport.py.
|
protected |
Read a small remote catalog object through rclone.
| [in] | remote_path | Value supplied through the remote_path argument. |
| FileNotFoundError | when the object does not exist, so callers can name what is missing. |
Definition at line 204 of file transport.py.
|
protected |
Fetch and validate one versioned remote storage manifest.
| [in] | profile | Value supplied through the profile argument. |
| [in] | archive_id | Value supplied through the archive_id argument. |
| [in] | require_complete | Value supplied through the require_complete argument. |
Definition at line 226 of file transport.py.
|
protected |
Definition at line 76 of file transport.py.
|
protected |
Definition at line 77 of file transport.py.
|
protected |
Definition at line 201 of file transport.py.