[swift] support different user-domain and tenant-domain
This is already supported by ncw/swift, so we just need to pass the parameters from the storage driver. Signed-off-by: Stefan Majewsky <stefan.majewsky@sap.com>master
							parent
							
								
									c9fd26e9ef
								
							
						
					
					
						commit
						a7c6bfd59f
					
				|  | @ -107,7 +107,7 @@ An implementation of the `storagedriver.StorageDriver` interface that uses [Open | ||||||
|       no |       no | ||||||
|     </td> |     </td> | ||||||
|     <td> |     <td> | ||||||
|       Your Openstack domain name for Identity v3 API. You can either use <code>domain</code> or <code>domainid</code>. |       Your user's Openstack domain name for Identity v3 API. You can either use <code>domain</code> or <code>domainid</code>. | ||||||
|     </td> |     </td> | ||||||
|   </tr> |   </tr> | ||||||
|   <tr> |   <tr> | ||||||
|  | @ -118,7 +118,29 @@ An implementation of the `storagedriver.StorageDriver` interface that uses [Open | ||||||
|       no |       no | ||||||
|     </td> |     </td> | ||||||
|     <td> |     <td> | ||||||
|       Your Openstack domain id for Identity v3 API. You can either use <code>domain</code> or <code>domainid</code>. |       Your user's Openstack domain id for Identity v3 API. You can either use <code>domain</code> or <code>domainid</code>. | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  |   <tr> | ||||||
|  |     <td> | ||||||
|  |       <code>tenantdomain</code> | ||||||
|  |     </td> | ||||||
|  |     <td> | ||||||
|  |       no | ||||||
|  |     </td> | ||||||
|  |     <td> | ||||||
|  |       Your tenant's Openstack domain name for Identity v3 API. Only necessary if different from the <code>domain</code>. You can either use <code>tenantdomain</code> or <code>tenantdomainid</code>. | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  |   <tr> | ||||||
|  |     <td> | ||||||
|  |       <code>tenantdomainid</code> | ||||||
|  |     </td> | ||||||
|  |     <td> | ||||||
|  |       no | ||||||
|  |     </td> | ||||||
|  |     <td> | ||||||
|  |       Your tenant's Openstack domain id for Identity v3 API. Only necessary if different from the <code>domain</code>. You can either use <code>tenantdomain</code> or <code>tenantdomainid</code>. | ||||||
|     </td> |     </td> | ||||||
|   </tr> |   </tr> | ||||||
|   <tr> |   <tr> | ||||||
|  |  | ||||||
|  | @ -67,6 +67,8 @@ type Parameters struct { | ||||||
| 	TenantID            string | 	TenantID            string | ||||||
| 	Domain              string | 	Domain              string | ||||||
| 	DomainID            string | 	DomainID            string | ||||||
|  | 	TenantDomain        string | ||||||
|  | 	TenantDomainID      string | ||||||
| 	TrustID             string | 	TrustID             string | ||||||
| 	Region              string | 	Region              string | ||||||
| 	AuthVersion         int | 	AuthVersion         int | ||||||
|  | @ -182,6 +184,8 @@ func New(params Parameters) (*Driver, error) { | ||||||
| 		TenantId:       params.TenantID, | 		TenantId:       params.TenantID, | ||||||
| 		Domain:         params.Domain, | 		Domain:         params.Domain, | ||||||
| 		DomainId:       params.DomainID, | 		DomainId:       params.DomainID, | ||||||
|  | 		TenantDomain:   params.TenantDomain, | ||||||
|  | 		TenantDomainId: params.TenantDomainID, | ||||||
| 		TrustId:        params.TrustID, | 		TrustId:        params.TrustID, | ||||||
| 		EndpointType:   swift.EndpointType(params.EndpointType), | 		EndpointType:   swift.EndpointType(params.EndpointType), | ||||||
| 		Transport:      transport, | 		Transport:      transport, | ||||||
|  |  | ||||||
|  | @ -30,6 +30,8 @@ func init() { | ||||||
| 		tenantID           string | 		tenantID           string | ||||||
| 		domain             string | 		domain             string | ||||||
| 		domainID           string | 		domainID           string | ||||||
|  | 		tenantDomain       string | ||||||
|  | 		tenantDomainID     string | ||||||
| 		trustID            string | 		trustID            string | ||||||
| 		container          string | 		container          string | ||||||
| 		region             string | 		region             string | ||||||
|  | @ -51,6 +53,8 @@ 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") | ||||||
|  | 	tenantDomain = os.Getenv("SWIFT_DOMAIN_NAME") | ||||||
|  | 	tenantDomainID = os.Getenv("SWIFT_DOMAIN_ID") | ||||||
| 	trustID = os.Getenv("SWIFT_TRUST_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") | ||||||
|  | @ -87,6 +91,8 @@ func init() { | ||||||
| 			tenantID, | 			tenantID, | ||||||
| 			domain, | 			domain, | ||||||
| 			domainID, | 			domainID, | ||||||
|  | 			tenantDomain, | ||||||
|  | 			tenantDomainID, | ||||||
| 			trustID, | 			trustID, | ||||||
| 			region, | 			region, | ||||||
| 			AuthVersion, | 			AuthVersion, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue