mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-07 22:20:24 +00:00
swift: Add support for Swift API v1 (without Keystone)
This commit also add a workaround for bug/feature[1] the password is changed every time :-) [1]https://github.com/ccollicutt/docker-swift-onlyone/commit/c9f5e41b745eee18e7ddc807481bc9729d8cdac0
This commit is contained in:
@@ -15,6 +15,13 @@ try:
|
||||
account_username = "%s:%s" % (auth_tenant, auth_username)
|
||||
swift_conn = swiftclient.Connection(auth_url, account_username,
|
||||
auth_password, auth_version=2)
|
||||
elif 'ST_USER' in os.environ and 'ST_KEY' in os.environ:
|
||||
auth_username = os.environ.get('ST_USER')
|
||||
auth_password = os.environ.get('ST_KEY')
|
||||
auth_url = os.environ.get('ST_AUTH')
|
||||
# Using auth version 1 (/auth/v1.0)
|
||||
swift_conn = swiftclient.Connection(auth_url, auth_username,
|
||||
auth_password, auth_version=1)
|
||||
else:
|
||||
swift_conn = None
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user