From 640d7bd365a60b79ffb135ef9385a4cedbfcd71f Mon Sep 17 00:00:00 2001 From: Fabian Ruff Date: Thu, 21 Apr 2016 01:00:49 +0200 Subject: [PATCH] Add domain option for openstack (v3 auth) --- 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 e3b12090b..5b588385d 100644 --- a/docs/content/swift.md +++ b/docs/content/swift.md @@ -72,6 +72,8 @@ Choose a number from below, or type in your own value 6 / OVH \ "https://auth.cloud.ovh.net/v2.0" auth> 1 +User domain - optional (v3 auth) +domain> Default Tenant name - optional tenant> Region name - optional diff --git a/swift/swift.go b/swift/swift.go index bc07e1250..97d66db2b 100644 --- a/swift/swift.go +++ b/swift/swift.go @@ -61,6 +61,9 @@ func init() { Help: "OVH", Value: "https://auth.cloud.ovh.net/v2.0", }}, + }, { + Name: "domain", + Help: "User domain - optional (v3 auth)", }, { Name: "tenant", Help: "Tenant name - optional", @@ -155,6 +158,7 @@ func swiftConnection(name string) (*swift.Connection, error) { UserAgent: fs.UserAgent, Tenant: fs.ConfigFile.MustValue(name, "tenant"), Region: fs.ConfigFile.MustValue(name, "region"), + Domain: fs.ConfigFile.MustValue(name, "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(),