Skip to content

Commit

Permalink
Merge pull request wal-e#66 from brosner/add-endpoint-type
Browse files Browse the repository at this point in the history
added support for swift endpoint_type
  • Loading branch information
alex committed Dec 11, 2013
2 parents e440cda + 1506c7a commit d952da0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion wal_e/blobstore/swift/calling_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ def connect(creds):
key=creds.password,
auth_version="2",
tenant_name=creds.tenant_name,
os_options={"region_name": creds.region},
os_options={
"region_name": creds.region,
"endpoint_type": creds.endpoint_type
}
)
4 changes: 3 additions & 1 deletion wal_e/blobstore/swift/credentials.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
class Credentials(object):
def __init__(self, authurl, user, password, tenant_name, region):
def __init__(self, authurl, user, password, tenant_name, region,
endpoint_type):
self.authurl = authurl
self.user = user
self.password = password
self.tenant_name = tenant_name
self.region = region
self.endpoint_type = endpoint_type
1 change: 1 addition & 0 deletions wal_e/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ def _env_hint(optname):
os.getenv('SWIFT_PASSWORD'),
os.getenv('SWIFT_TENANT'),
os.getenv('SWIFT_REGION'),
os.getenv('SWIFT_ENDPOINT_TYPE', 'publicURL'),
)
return SwiftBackup(store, creds, gpg_key_id)
else:
Expand Down

0 comments on commit d952da0

Please sign in to comment.