Only pass the project if it is specified
This commit is contained in:
parent
43cb57cd9c
commit
7a628b294d
|
@ -40,10 +40,13 @@ func (c *AccessConfig) Auth() (gophercloud.AccessProvider, error) {
|
||||||
authoptions := gophercloud.AuthOptions{
|
authoptions := gophercloud.AuthOptions{
|
||||||
Username: username,
|
Username: username,
|
||||||
Password: password,
|
Password: password,
|
||||||
TenantName: project,
|
|
||||||
AllowReauth: true,
|
AllowReauth: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if project != "" {
|
||||||
|
authoptions.TenantName = project
|
||||||
|
}
|
||||||
|
|
||||||
return gophercloud.Authenticate(provider, authoptions)
|
return gophercloud.Authenticate(provider, authoptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue