From 02a3bbaa3dc50f31d8fca089d2ee0eb6f190c1be Mon Sep 17 00:00:00 2001 From: Antonio Messina Date: Tue, 5 Jul 2016 18:34:22 +0200 Subject: [PATCH] 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. --- docs/content/swift.md | 2 ++ swift/swift.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/docs/content/swift.md b/docs/content/swift.md index 92cbbec16..6729edc89 100644 --- a/docs/content/swift.md +++ b/docs/content/swift.md @@ -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 diff --git a/swift/swift.go b/swift/swift.go index 54a0db840..3443f31b1 100644 --- a/swift/swift.go +++ b/swift/swift.go @@ -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(),