Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/llamasoft/libcloud into …
Browse files Browse the repository at this point in the history
…llamasoft-patch-1
  • Loading branch information
Kami committed Jul 31, 2023
2 parents 62e8d5a + 64405c6 commit 504354c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions libcloud/storage/drivers/cloudfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,23 +192,19 @@ def __init__(self, user_id, key, secure=True, use_internal_url=False, **kwargs):
def get_endpoint(self):
region = self._ex_force_service_region.upper()

if self.use_internal_url:
endpoint_type = "internal"
else:
endpoint_type = "external"

if "2.0" in self._auth_version:
ep = self.service_catalog.get_endpoint(
service_type="object-store",
name="cloudFiles",
region=region,
endpoint_type=endpoint_type,
endpoint_type="internal" if self.use_internal_url else "external",
)
cdn_ep = self.service_catalog.get_endpoint(
service_type="rax:object-cdn",
name="cloudFilesCDN",
region=region,
endpoint_type=endpoint_type,
# Cloud Files has no concept of an "internal" CDN.
endpoint_type="external",
)
else:
raise LibcloudError('Auth version "%s" not supported' % (self._auth_version))
Expand Down

0 comments on commit 504354c

Please sign in to comment.