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
Fixes request path for ex_set_image_labels() #1485
Conversation
…possible to see if and where a volume is attached
190e6ff
to
dc7c004
Compare
Thanks for the contribution. The change looks good to me, but it looks like existing tests are failing (can you please look into that?). In addition to that, it would be also good to add a test case for this fix. |
@@ -2080,7 +2080,7 @@ def ex_set_image_labels(self, image, labels): | |||
raise ValueError("Must specify a valid libcloud image object.") | |||
current_fp = image.extra['labelFingerprint'] | |||
body = {'labels': labels, 'labelFingerprint': current_fp} | |||
request = '/global/%s/setLabels' % (image.name) | |||
request = '/global/images/%s/setLabels' % (image.name) |
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 adding this for reference here - https://cloud.google.com/compute/docs/reference/rest/v1/images/setLabels
I fixed the failing tests, added an assertion (d968345) and merged changes into trunk. @petersen-poul I had some troubles merging changes directly into trunk so I needed to manually cherry pick the commits. It looks like your branch is not based on trunk, but on top of At this point, I only merged change into trunk (those changes will be included in the next v3.x.x release), but perhaps if some other bug fixes accumulate, we can make another v2.8.x release. |
Whoops - my apologies for not noticing your comments earlier. Yes, I'm stuck in v2.8.3 for now due to Python 2.7. Yes, the changes for trunk should be virtually the same. If I find anything else in my migration efforts, I'll update them as well. |
Closes apache#1485.
Closes apache#1485.
Fixes request path for ex_set_image_labels()
Description
A simple fix - the request in ex_set_image_labels was missing the "/images/" path.
I made this commit against 2.8.x because that's where I needed it, but it's also missing in trunk.
Status
Replace this: describe the PR status. Examples:
Checklist (tick everything that applies)