Merge pull request #1627 from luckyraul/swift_auth_url

Swift auth version param
This commit is contained in:
Richard Scothern 2016-06-01 11:23:23 -07:00
commit df2184c810
3 changed files with 15 additions and 0 deletions

View File

@ -300,6 +300,16 @@ An implementation of the `storagedriver.StorageDriver` interface that uses [Open
</p> </p>
</td> </td>
</tr> </tr>
<tr>
<td>
<code>authversion</code>
</td>
<td>
<p>
Optionally, specify the OpenStack Auth's version,for example <code>3</code>. By default the driver will autodetect the auth's version from the AuthURL.
</p>
</td>
</tr>
<tr> <tr>
<td> <td>
<code>chunksize</code> <code>chunksize</code>

View File

@ -69,6 +69,7 @@ type Parameters struct {
DomainID string DomainID string
TrustID string TrustID string
Region string Region string
AuthVersion int
Container string Container string
Prefix string Prefix string
InsecureSkipVerify bool InsecureSkipVerify bool
@ -174,6 +175,7 @@ func New(params Parameters) (*Driver, error) {
ApiKey: params.Password, ApiKey: params.Password,
AuthUrl: params.AuthURL, AuthUrl: params.AuthURL,
Region: params.Region, Region: params.Region,
AuthVersion: params.AuthVersion,
UserAgent: "distribution/" + version.Version, UserAgent: "distribution/" + version.Version,
Tenant: params.Tenant, Tenant: params.Tenant,
TenantId: params.TenantID, TenantId: params.TenantID,

View File

@ -33,6 +33,7 @@ func init() {
trustID string trustID string
container string container string
region string region string
AuthVersion int
insecureSkipVerify bool insecureSkipVerify bool
secretKey string secretKey string
accessKey string accessKey string
@ -52,6 +53,7 @@ func init() {
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")
AuthVersion, _ = strconv.Atoi(os.Getenv("SWIFT_AUTH_VERSION"))
insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY")) insecureSkipVerify, _ = strconv.ParseBool(os.Getenv("SWIFT_INSECURESKIPVERIFY"))
secretKey = os.Getenv("SWIFT_SECRET_KEY") secretKey = os.Getenv("SWIFT_SECRET_KEY")
accessKey = os.Getenv("SWIFT_ACCESS_KEY") accessKey = os.Getenv("SWIFT_ACCESS_KEY")
@ -85,6 +87,7 @@ func init() {
domainID, domainID,
trustID, trustID,
region, region,
AuthVersion,
container, container,
root, root,
insecureSkipVerify, insecureSkipVerify,