Add ex_set_volume_auto_delete to the GCE driver.#264
Conversation
There was a problem hiding this comment.
If the ex_node argument is required, you should simply not set the default value in the method signature and Python will throw if you don't pass this argument in.
There was a problem hiding this comment.
Also, extension methods already have ex_ prefix in the method name so you can remove it from the argument (ex_node -> node).
You only need to add ex_ prefix to the argument if you add it to the standard method (e.g. list_nodes).
|
Besides the naming thing, LGTM. /cc @wrigri |
|
Ha, interesting. For both suggestions, that's what I would normally have done. But the previous function declaration ( Would a second pull request to modify the Thanks for the quick feedback, will update. |
|
@franckcuny Yeah, a second pull request would be much appreciated. An sadly we currently only enforce things like this manually during the PR review so it's kinda easy to miss it. The good news is that we are working on an automatic system for checking that the driver and methods comply to the base API :) |
Sets the auto-delete flag for a volume attached to a node.
|
Looks good to me I'm a bit confused about the conversation regarding a second pull request for detach_volume. The signature for detach volume is like it is because the base API doesn't allow for the node to be set as a positional argument. So, even though volume.detach() won't actually work for GCE, adding a positional argument for node to detach_volume would cause volume.detach() to error out. |
|
Patch merged into trunk, the pull request can be closed now. Thanks. And sorry for the delay. I thought I already merged this a while back. |
|
@franckcuny Can you please close this pull request (changes have already been merged a while back)? Thanks |
Sets the auto-delete flag for a volume attached to a node.