From 8f5f6a4e590e8fb91bf9516c9da9a7bf24e81144 Mon Sep 17 00:00:00 2001 From: Hua Wang Date: Mon, 24 Aug 2015 23:08:33 +0800 Subject: [PATCH] Add TrustId parameter to swift driver github/ncw/swift has added support for trust, so let's add it. Signed-off-by: Hua Wang --- docs/storage/driver/swift/swift.go | 2 ++ docs/storage/driver/swift/swift_test.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/storage/driver/swift/swift.go b/docs/storage/driver/swift/swift.go index 0921ccc03..38c41b3dd 100644 --- a/docs/storage/driver/swift/swift.go +++ b/docs/storage/driver/swift/swift.go @@ -61,6 +61,7 @@ type Parameters struct { TenantID string Domain string DomainID string + TrustID string Region string Container string Prefix string @@ -156,6 +157,7 @@ func New(params Parameters) (*Driver, error) { TenantId: params.TenantID, Domain: params.Domain, DomainId: params.DomainID, + TrustId: params.TrustID, Transport: transport, ConnectTimeout: 60 * time.Second, Timeout: 15 * 60 * time.Second, diff --git a/docs/storage/driver/swift/swift_test.go b/docs/storage/driver/swift/swift_test.go index 6be2238a5..705c26312 100644 --- a/docs/storage/driver/swift/swift_test.go +++ b/docs/storage/driver/swift/swift_test.go @@ -29,6 +29,7 @@ func init() { tenantID string domain string domainID string + trustID string container string region string insecureSkipVerify bool @@ -42,6 +43,7 @@ func init() { tenantID = os.Getenv("SWIFT_TENANT_ID") domain = os.Getenv("SWIFT_DOMAIN_NAME") domainID = os.Getenv("SWIFT_DOMAIN_ID") + trustID = os.Getenv("SWIFT_TRUST_ID") container = os.Getenv("SWIFT_CONTAINER_NAME") region = os.Getenv("SWIFT_REGION_NAME") insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY")) @@ -71,6 +73,7 @@ func init() { tenantID, domain, domainID, + trustID, region, container, root,