Closed (fixed)
Project:
Cloud
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
12 Dec 2018 at 17:04 UTC
Updated:
28 Dec 2018 at 08:04 UTC
Jump to comment: Most recent, Most recent file
Add functionality to create an image from an instance. Add a link in the entity operation to the new functionality. Add button links from an instance's edit and canonical view.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3020077_1.patch | 22.49 KB | baldwinlouie |
Comments
Comment #2
baldwinlouie commentedAttaching a patch that includes this functionality. Patch includes a test case.
Comment #3
yas@baldwinlouie
I tried the patch and I have a couple of feedback:
pendingstate in AWS management console, it seems to be deleted (deregistered) immediately, but in fact, it is actually not deleted (it is stillpendingstate in AWS management console in my case). I think the validation logic is required to see the image state (available|pending|failed).https://example.com/clouds/aws_cloud/{cloud_context}/imagedoesn't work since:Comment #4
baldwinlouie commented@yas, Here's the updated patch and my comments
#1. "State" was not being brought into the aws_cloud_image table. I added support for updating that field. I tightened the logic for deleting and image. If an image is in "pending" state, there is no delete button or delete link. For "available" and "failed", I think they are ok to be deleted.
#2. I cannot reproduce this one. I can see the images page on my instance. The route I commented out should not affect the main image page. It could a issue with views caching the route somehow. I've seen this before with other landing pages, but cannot reproduce every time. Now that you have installed and uninstalled the module a few times, do you still see the issue?
#3. I added the requested test cases. Note, I had to start using the $this->clickLink() to simulate a browser click. I was not able to reliably predict the image id that Drupal was assigning to imported/created images. Sometimes, the id would start at 2 and some other times, the id would start at 4. I thought using clickLink() was a good alternative. That is how a user browses the site anyway.
Comment #5
yas@baldwinlouie
Thank you for the updated patch. I tried it and it looks working well. Now it cares about pending state to block deleting. I'll merge the one.
Comment #7
yas