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

Commit e8e5597

Browse files
Alberto MurilloSamuel Ortiz
authored andcommitted
imageservice: Include version for glance api calls
The default glance installation[1] builds the image service endpoints without the version suffix, so we have to add a v2 to them from NewImageService() [1] http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-install.html Signed-off-by: Alberto Murillo <[email protected]>
1 parent 1836997 commit e8e5597

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

openstack/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,5 +352,7 @@ func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi
352352
if err != nil {
353353
return nil, err
354354
}
355-
return &gophercloud.ServiceClient{ProviderClient: client, Endpoint: url}, nil
355+
return &gophercloud.ServiceClient{ProviderClient: client,
356+
Endpoint: url,
357+
ResourceBase: url + "v2/"}, nil
356358
}

0 commit comments

Comments
 (0)