swift: add support for non-default project domain.

With Keystone V3 both users and projects (a.k.a. tenants) can belong
to different domains. This change allow specifying different domains
for the user and the project.
This commit is contained in:
Antonio Messina authored and Nick Craig-Wood committed 2016-07-11 15:16:58 +01:00
1 parent a20d80565b
commit 02a3bbaa3d
2 files changed
+6

No files matched your search

+2
View File
@@ -76,6 +76,8 @@ User domain - optional (v3 auth)
domain> Default
Tenant name - optional
tenant>
Tenant domain - optional (v3 auth)
tenant_domain>
Region name - optional
region>
Storage URL - optional
+4
View File
@@ -67,6 +67,9 @@ func init() {
}, {
Name: "tenant",
Help: "Tenant name - optional",
}, {
Name: "tenant_domain",
Help: "Tenant domain - optional (v3 auth)",
}, {
Name: "region",
Help: "Region name - optional",
@@ -163,6 +166,7 @@ func swiftConnection(name string) (*swift.Connection, error) {
Tenant: fs.ConfigFile.MustValue(name, "tenant"),
Region: fs.ConfigFile.MustValue(name, "region"),
Domain: fs.ConfigFile.MustValue(name, "domain"),
TenantDomain: fs.ConfigFile.MustValue(name, "tenant_domain"),
ConnectTimeout: 10 * fs.Config.ConnectTimeout, // Use the timeouts in the transport
Timeout: 10 * fs.Config.Timeout, // Use the timeouts in the transport
Transport: fs.Config.Transport(),