swift: add auth version parameter - fixes #407

This commit is contained in:
Nick Craig-Wood 2016-06-03 17:52:02 +01:00
parent ccdd1ea6c4
commit 1fce83b936
2 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,8 @@ region>
Storage URL - optional Storage URL - optional
storage_url> storage_url>
Remote config Remote config
AuthVersion - optional - set to (1,2,3) if your auth URL has no version
auth_version>
-------------------- --------------------
[remote] [remote]
user = user_name user = user_name

View File

@ -73,6 +73,9 @@ func init() {
}, { }, {
Name: "storage_url", Name: "storage_url",
Help: "Storage URL - optional", Help: "Storage URL - optional",
}, {
Name: "auth_version",
Help: "AuthVersion - optional - set to (1,2,3) if your auth URL has no version",
}, },
}, },
}) })
@ -155,6 +158,7 @@ func swiftConnection(name string) (*swift.Connection, error) {
UserName: userName, UserName: userName,
ApiKey: apiKey, ApiKey: apiKey,
AuthUrl: authURL, AuthUrl: authURL,
AuthVersion: fs.ConfigFile.MustInt(name, "auth_version", 0),
UserAgent: fs.UserAgent, UserAgent: fs.UserAgent,
Tenant: fs.ConfigFile.MustValue(name, "tenant"), Tenant: fs.ConfigFile.MustValue(name, "tenant"),
Region: fs.ConfigFile.MustValue(name, "region"), Region: fs.ConfigFile.MustValue(name, "region"),