Image Service v2: Add Updating image.Protected field#2221
Image Service v2: Add Updating image.Protected field#2221jtopjian merged 1 commit intogophercloud:masterfrom
Conversation
|
I'm confident in this change working but not confident in my changes to the tests, can someone please help me verify those changes are appropriate and fail if tweaked. For some reason locally I couldn't get them to fail even if I put in bad values. |
|
Build failed.
|
9e5f6db to
a08f681
Compare
|
Build succeeded.
|
🎉 |
|
@dustymabe can you extend functional test to handle set true -> set false checks? |
which file is that in? |
|
@dustymabe @kayrus is suggesting to either modify the current acceptance test or create a new one that flips protection on and off and confirm the value is correct each time. |
Looks like you've got the hang of it 🙂 I noticed with the first OpenLab failure, it was due to Glance not wanting to delete a protected image, so this change does work. It's just a matter of extending the test a little bit and we should be good to go. Thanks for working on this. |
Now we should be able to do something like:
```
updateOpts := images.UpdateOpts{
images.ReplaceImageProtected{
NewProtected: false,
},
}
image, err = images.Update(client, imageID, updateOpts).Extract()
```
Fixes gophercloud#2220
a08f681 to
89d7c3f
Compare
|
Build succeeded.
|
|
Yay. worked this time! |
|
To fulfill the PR requirement of showing the API service code that allows this change: according to the Glance code, it looks like all Image attributes are able to be updated, so this change is good. |
|
@dustymabe Let me know if you're ready to have this reviewed/merged. |
+1 ready for review/merge |
Now we should be able to do something like:
Fixes #2220