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
Don't use nova for glance mocks #9792
Don't use nova for glance mocks #9792
Conversation
Fetching images through nova is deprecated and removed in newer versions of the compute API. Mocks now reflect this behavior.
/cc @rifelpet |
cloud := t.Cloud.(openstack.OpenstackCloud) | ||
|
||
imageName := fi.StringValue(e.Image) | ||
imageRef, err := images.IDFromName(cloud.ImageClient(), imageName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note on this change: If you pass image name to create server, gophercloud will do the nova equivalent for this IDFromName
lookup. So instead, we explicitly use the glance version.
As a bonus, the error message for users should they have a typo in the image definition, is much more clear.
👍 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olemarkus, rifelpet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
Fetching images through nova is deprecated and removed in newer versions
of the compute API. Mocks now reflect this behavior.