Skip to content

Commit 1556a3b

Browse files
committed
fixup! Add support for requester-pays for mirroring
1 parent 8515168 commit 1556a3b

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/azul/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def ecm_service_url(self) -> mutable_furl:
330330
return mutable_furl(self.environ['azul_ecm_service_url'])
331331

332332
@property
333-
def terra_billing_project(self) -> str | None:
333+
def tdr_requester_pays_project(self) -> str | None:
334334
return self.environ.get('AZUL_TDR_REQUESTER_PAYS_PROJECT')
335335

336336
@property

src/azul/drs.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,14 @@ def get(self,
365365
given URI.
366366
367367
:param access_method: The type of access method to use from the object
368-
response. The scheme of the URL in the returned access object depends
369-
on the access method specified.
368+
response. The scheme of the URL in the returned
369+
access object depends on the access method
370+
specified.
370371
371372
:param headers: Optional request headers for accessing the object. Note
372-
that this argument is ignored when requesting the object itself.
373+
that this argument is only applied for requests to
374+
.../objects/{object_id}/access/{access_id}/, and not to
375+
.../objects/{object_id}.
373376
"""
374377
return self._get(access_method, headers)
375378

src/azul/indexer/mirror_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ def _repository_url(self, file: File) -> furl:
749749
assert file.drs_uri is not None, R(
750750
'File cannot be downloaded', file)
751751
object = self.repository_plugin.drs_object(file.drs_uri)
752-
billing_project = config.terra_billing_project
752+
billing_project = config.tdr_requester_pays_project
753753
if billing_project is not None:
754754
headers = {'x-user-project': billing_project}
755755
else:

0 commit comments

Comments
 (0)