forked from TrueCloudLab/distribution
Add TrustId parameter to swift driver
github/ncw/swift has added support for trust, so let's add it. Signed-off-by: Hua Wang <wanghua.humble@gmail.com>
This commit is contained in:
parent
0306c5c453
commit
8f5f6a4e59
2 changed files with 5 additions and 0 deletions
|
@ -61,6 +61,7 @@ type Parameters struct {
|
||||||
TenantID string
|
TenantID string
|
||||||
Domain string
|
Domain string
|
||||||
DomainID string
|
DomainID string
|
||||||
|
TrustID string
|
||||||
Region string
|
Region string
|
||||||
Container string
|
Container string
|
||||||
Prefix string
|
Prefix string
|
||||||
|
@ -156,6 +157,7 @@ func New(params Parameters) (*Driver, error) {
|
||||||
TenantId: params.TenantID,
|
TenantId: params.TenantID,
|
||||||
Domain: params.Domain,
|
Domain: params.Domain,
|
||||||
DomainId: params.DomainID,
|
DomainId: params.DomainID,
|
||||||
|
TrustId: params.TrustID,
|
||||||
Transport: transport,
|
Transport: transport,
|
||||||
ConnectTimeout: 60 * time.Second,
|
ConnectTimeout: 60 * time.Second,
|
||||||
Timeout: 15 * 60 * time.Second,
|
Timeout: 15 * 60 * time.Second,
|
||||||
|
|
|
@ -29,6 +29,7 @@ func init() {
|
||||||
tenantID string
|
tenantID string
|
||||||
domain string
|
domain string
|
||||||
domainID string
|
domainID string
|
||||||
|
trustID string
|
||||||
container string
|
container string
|
||||||
region string
|
region string
|
||||||
insecureSkipVerify bool
|
insecureSkipVerify bool
|
||||||
|
@ -42,6 +43,7 @@ func init() {
|
||||||
tenantID = os.Getenv("SWIFT_TENANT_ID")
|
tenantID = os.Getenv("SWIFT_TENANT_ID")
|
||||||
domain = os.Getenv("SWIFT_DOMAIN_NAME")
|
domain = os.Getenv("SWIFT_DOMAIN_NAME")
|
||||||
domainID = os.Getenv("SWIFT_DOMAIN_ID")
|
domainID = os.Getenv("SWIFT_DOMAIN_ID")
|
||||||
|
trustID = os.Getenv("SWIFT_TRUST_ID")
|
||||||
container = os.Getenv("SWIFT_CONTAINER_NAME")
|
container = os.Getenv("SWIFT_CONTAINER_NAME")
|
||||||
region = os.Getenv("SWIFT_REGION_NAME")
|
region = os.Getenv("SWIFT_REGION_NAME")
|
||||||
insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY"))
|
insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY"))
|
||||||
|
@ -71,6 +73,7 @@ func init() {
|
||||||
tenantID,
|
tenantID,
|
||||||
domain,
|
domain,
|
||||||
domainID,
|
domainID,
|
||||||
|
trustID,
|
||||||
region,
|
region,
|
||||||
container,
|
container,
|
||||||
root,
|
root,
|
||||||
|
|
Loading…
Reference in a new issue