Add gce_img module for utilizing GCE image resources #229
Conversation
|
||
import sys | ||
|
||
# import module snippets |
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.
These module snippets should actually appear as the line directly before the call to main()
cc @erjohnso |
|
||
DOCUMENTATION = ''' | ||
--- | ||
module: gce_img |
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.
Please add version_added: "1.9"
here and remove it from the options below.
Ok, I got your idea now. My only concern is when |
I usually set |
This looks like a libcloud bug: when I pass in string parameter to
And libcloud does the following when the parameter is not a GCENodeImage:
So there will be an |
Hmm... what version of libcloud are you using? It looks like trunk handles string and object OK unless I'm missing something: https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/gce.py#L3294 FWIW, the plan is to release libcloud 0.17.0 this weekend, so if there is a bug I can get it merged in today. |
Please look at line 3307, if the image does not exist, |
Ah, gotcha! Thanks, I'll wrap that with a try/except NotFound error. I'll /cc you on the PR. Then you'll be able to do something like,
|
@tanpeter - ok, merged apache/libcloud#441 |
…e.ex_delete_image(), instead catching the ResourceExistsError or ResourceNotFoundError respectively.
@bcoca - Hi Brian, new GCE module ready for merge (unless you want to review). With the recent org change, I wanted an ACK before just hitting the merge button. Are you (in general) OK with me helping maintain GCE modules? |
looks good to me. It is fine if you continue in charge of the GCE modules as you have up to now. |
Thanks Brian. |
Add gce_img module for utilizing GCE image resources
No description provided.