Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 052638a

Browse files
funrun11Samuel Ortiz
authored andcommitted
OpenStack Glance support
* RegionName parametrised
1 parent 615698c commit 052638a

File tree

1 file changed

+4
-3
lines changed
  • acceptance/openstack/imageservice/v2

1 file changed

+4
-3
lines changed

acceptance/openstack/imageservice/v2/common.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ func newClient(t *testing.T) *gophercloud.ServiceClient {
1818
password := os.Getenv("OS_PASSWORD")
1919
tenantName := os.Getenv("OS_TENANT_NAME")
2020
domainName := os.Getenv("OS_DOMAIN_NAME")
21+
regionName := os.Getenv("OS_REGION_NAME")
2122

22-
t.Logf("Credentials used: OS_AUTH_URL='%s' OS_USERNAME='%s' OS_PASSWORD='*****' OS_TENANT_NAME='%s' OS_TENANT_NAME='%s' \n",
23-
authURL, username, tenantName, domainName)
23+
t.Logf("Credentials used: OS_AUTH_URL='%s' OS_USERNAME='%s' OS_PASSWORD='*****' OS_TENANT_NAME='%s' OS_TENANT_NAME='%s' OS_REGION_NAME='%s' \n",
24+
authURL, username, tenantName, domainName, regionName)
2425

2526
client, err := openstack.NewClient(authURL)
2627
th.AssertNoErr(t, err)
@@ -37,7 +38,7 @@ func newClient(t *testing.T) *gophercloud.ServiceClient {
3738
t.Logf("Token is %v", client.TokenID)
3839

3940
c, err := openstack.NewImageServiceV2(client, gophercloud.EndpointOpts{
40-
Region: "RegionOne",
41+
Region: regionName,
4142
})
4243
th.AssertNoErr(t, err)
4344
return c

0 commit comments

Comments
 (0)