rackspace / gophercloud

A Go SDK for OpenStack. IN FEATURE FREEZE. See Issue #592
http://gophercloud.io
Other
456 stars 185 forks source link

imagesservice v2 List pagination does not work #631

Closed tatsuhiro-t closed 7 years ago

tatsuhiro-t commented 7 years ago

I have a problem getting list of images using images.List. First page is OK, but the calculation of the next URL is broken, and it gives me 404 error.

In particular, in nextPageURL function, if currentURL is http://example.com/v2/images, and next is /v2/images?marker=..., then the next URL becomes http://example.com/v2/v2/images?marker=.... Notice that extra "/v2" in path component.

I have a working patch to fix this by parsing URL, and resolve relative URL.

tatsuhiro-t commented 7 years ago

Will try https://github.com/gophercloud/gophercloud, and if it still does not work for me, I'll create new issue on new repo.