-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.
Description
For now we have three places in which we're using bucket_bound_hostname
. The code is almost the same in all three places, so it'll be good to union it in single helper:
python-storage/google/cloud/storage/blob.py
Lines 517 to 522 in 616f107
if ":" in bucket_bound_hostname: | |
api_access_endpoint = bucket_bound_hostname | |
else: | |
api_access_endpoint = "{scheme}://{bucket_bound_hostname}".format( | |
scheme=scheme, bucket_bound_hostname=bucket_bound_hostname | |
) |
python-storage/google/cloud/storage/bucket.py
Lines 2531 to 2536 in 616f107
if ":" in bucket_bound_hostname: | |
api_access_endpoint = bucket_bound_hostname | |
else: | |
api_access_endpoint = "{scheme}://{bucket_bound_hostname}".format( | |
scheme=scheme, bucket_bound_hostname=bucket_bound_hostname | |
) |
python-storage/google/cloud/storage/client.py
Lines 1014 to 1020 in 616f107
if ":" in bucket_bound_hostname: # URL includes scheme | |
url = bucket_bound_hostname | |
else: # scheme is given separately | |
url = "{scheme}://{host}/".format( | |
scheme=scheme, host=bucket_bound_hostname | |
) |
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.