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>
Remote config
AuthVersion - optional - set to (1,2,3) if your auth URL has no version
auth_version>
--------------------
[remote]
user = user_name

View File

@ -73,6 +73,9 @@ func init() {
}, {
Name: "storage_url",
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,
ApiKey: apiKey,
AuthUrl: authURL,
AuthVersion: fs.ConfigFile.MustInt(name, "auth_version", 0),
UserAgent: fs.UserAgent,
Tenant: fs.ConfigFile.MustValue(name, "tenant"),
Region: fs.ConfigFile.MustValue(name, "region"),