improve GCE create_node, make sure ex_get_disktype function will not fail#448
Closed
mgogoulos wants to merge 1 commit intoapache:trunkfrom
Closed
improve GCE create_node, make sure ex_get_disktype function will not fail#448mgogoulos wants to merge 1 commit intoapache:trunkfrom
mgogoulos wants to merge 1 commit intoapache:trunkfrom
Conversation
Contributor
|
Looks good @mgogoulos, but tests are not passing. Do you think you can take a look at travis and get them fixed up? For example, https://travis-ci.org/apache/libcloud/jobs/50234015#L5396. |
Contributor
Author
|
I've added the missing fixture for this, it should complete fine! |
Contributor
Author
|
Forgot to include the new fixtures file.. |
Contributor
|
Great, thank you very much @mgogoulos! One last request, could you please rebase and squash into a single commit? See, https://libcloud.readthedocs.org/en/latest/development.html#squash-the-commits-and-generate-the-patch. We don't need the patch, but see the two |
4c2a21c to
6b82405
Compare
Contributor
Author
|
Should be fine now, after tests complete! |
Contributor
|
Thank you very much @mgogoulos - merging now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
create_node supports passing ex_disk_type as either str or GCEDiskType. If you pass an str, or if you don't pass anything -most usual case I believe- it gets an str value of 'pd-standard' since it is a kwarg, then the function will fail because self.ex_get_disktype is called without the location, and line
request = '/zones/%s/diskTypes/%s' % (zone.name, name)
will break with a 'NoneType' object has no attribute 'name'
This can easily be fixed with this commit (also applies to ex_create_multiple_nodes).
Then nodes with ssh key deployed are easily created: