Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix apiversions base URLs #1530

Merged
merged 6 commits into from
Mar 28, 2019
Merged

Conversation

jtopjian
Copy link
Contributor

For #1529

This commit updates the apiversions packages to account for a variety of base URLs which have been known to exist in the Keystone catalog: https://github.com/gophercloud/gophercloud/blob/master/openstack/utils/testing/base_endpoint_test.go

These packages should also be housed under a versionless directory. For example, networking/v2/apiversions should be networking/apiversions since it should be possible to use this package to retrieve the API versions for all major versions.

However, there is a catch: services such as Block Storage changed the format of the API results a while back. this is why blockstorage/v1/apiversions exists. I fell down a rabbit hole looking into this a while back (#458). I haven't reviewed all of these packages to determine if there are other occurrences like this, so for now, the packages will stay where they are.

@jtopjian
Copy link
Contributor Author

@openstacker @MaysaMacedo: Total coincidence that you both contributed an apiversions package shortly before I discovered this bug. I recommend updating your application's Gophercloud library once this is merged.

It's very possible that you won't see this bug in environments that you have access to, but I'm confident that you will eventually get reports of failures. The following test has a list for all supported URL formats once this is merged: https://github.com/gophercloud/gophercloud/blob/master/openstack/utils/testing/base_endpoint_test.go

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 28, 2019

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 28, 2019

Build succeeded.

Copy link
Contributor

@ozerovandrei ozerovandrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github.com/gophercloud/gophercloud/openstack/orchestration/v1/apiversions
# github.com/gophercloud/gophercloud/openstack/orchestration/v1/apiversions
openstack/orchestration/v1/apiversions/requests.go:10:32: undefined: apiVersionsURL

@MaysaMacedo
Copy link
Contributor

@jtopjian okay, thanks for letting us know.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 76.589% when pulling 9891fd2 on jtopjian:apiversions-base-urls into c923f33 on gophercloud:master.

@jtopjian
Copy link
Contributor Author

@ozerovandrei whoops - ok, should be good to go once OpenLab finishes.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 28, 2019

Build succeeded.

Copy link
Contributor

@ozerovandrei ozerovandrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jtopjian
Copy link
Contributor Author

@ozerovandrei Thanks!

@jtopjian jtopjian merged commit 33e54f4 into gophercloud:master Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants