-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'Bucket.requester_pays' property. #3488
Add 'Bucket.requester_pays' property. #3488
Conversation
Toward #3474. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs.
Use it in the (still skipped) system test.
If we can figure out how to determing that the feature is availalbe programatically later, we can adjust the 'REQUESTER_PAYS_ENABLED' flag, which will also be available to guard other system tests using it. [ci skip]
def requester_pays(self): | ||
"""Does the requester pay for API requests for this bucket? | ||
|
||
See https://cloud.google.com/storage/docs/<DOCS-MISSING> for |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -211,10 +211,16 @@ def create_bucket(self, bucket_name): | |||
:type bucket_name: str | |||
:param bucket_name: The bucket name to create. | |||
|
|||
:type requester_pays: bool | |||
:param requester_pays: (Optional) Whether requester pays for | |||
API requests for this bucket and its blobs. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -194,7 +194,7 @@ def lookup_bucket(self, bucket_name): | |||
except NotFound: | |||
return None | |||
|
|||
def create_bucket(self, bucket_name): | |||
def create_bucket(self, bucket_name, requester_pays=None): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
storage/tests/system.py
Outdated
@@ -99,6 +99,15 @@ def test_create_bucket(self): | |||
self.case_buckets_to_delete.append(new_bucket_name) | |||
self.assertEqual(created.name, new_bucket_name) | |||
|
|||
@unittest.skipIf(True, "requesterPays needs whitelisting?") |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@dhermes Good to merge when CI is green? |
Kinda yes, kinda no. I still feel "uneasy" about the signature delta among:
|
@dhermes I'm actually opposed on principle to the |
I (mostly) agree with you here. |
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward googleapis#3474.
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward googleapis#3474.
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward googleapis#3474.
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward #3474.
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward #3474.
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward #3474.
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward #3474.
Also, add 'requester_pays' argument to 'Client.create_bucket'. Add a system test which exercises the feature. Note that the new system test is skipped, because 'Buckets.insert' fails with the 'billing/requesterPays' field set, both in our system tests and in the 'Try It!' form in the docs. Toward #3474.
Toward #3474.
Note that the new system test is skipped, because
Buckets.insert
fails with thebilling/requesterPays
field set, both in our system tests and in the 'Try It!' form in the docs.