-
Notifications
You must be signed in to change notification settings - Fork 925
Port DigitalOcean driver to API v2 #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port DigitalOcean driver to API v2 #443
Conversation
|
Great, thanks. Looking at the API docs though, the page says API v2 is still in beta and the things might change. Is there any ETA when API will be out of beta? Should we wait with switching to API v2 until it comes out of beta (or is it more like a gmail beta :)?) |
|
It is starting to have that Gmail feeling. =) My understanding is that the beta tag will be dropped "soon," and an EOL date will be announced for v1 at that time. If you want to hold off till then, that's understandable. Though it's been fairly stable for sometime already. The changelog is here: https://developers.digitalocean.com/changelog/ |
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.
SSH key pair management is now part of the base API. So you should have the list_key_pairs(), get_key_pair(), create_key_pair(), delete_key_pair(). Also use the KeyPair() object:
from libcloud.compute.base import KeyPair
|
@Kami @andrewsomething maybe we can create a V2 driver class , like in the openstack driver. |
|
Yeah, I'm fine with supporting both versions for now. There is a good example of how to do that at https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/cloudsigma.py |
61fdb69 to
c54eb59
Compare
|
Alright, moved to using the SSH key pair management from the base API. Might not get around to attempting at supporting both versions until the weekend. Thanks for the feedback! |
|
Hi all, we have supported API v2 since September at https://github.com/mistio/libcloud/blob/mistio/libcloud/compute/drivers/digitalocean.py it's a shame we haven't found the time to contribute it here to save some time from others doing so :( The v2 version is greatly improved and DO pushes against using v2 and not v1 (if I remember well they even plan to discontinue support for v1 after some time). We wanted to use both of them so in our approach we have renamed DigitalOceanNodeDriver/DigitalOceanConnection as DigitalOceanFirstGenNodeDriver/DigitalOceanFirstGenConnection and DigitalOceanNodeDriver/DigitalOceanConnection is now for v2 |
cfefeab to
4880885
Compare
|
So it ended up being a little longer than I would have liked to get around to this... Commits have all been squashed, and this should support both v1 and v2. The test failure on Travis seems completely unrelated: |
|
Yeah, it's an issue with a conflicting dependency (same issue as here - StackStorm/st2#1238). I will push a fix to trunk shortly. |
|
I've pushed a fix for a conflicting dependency issue to trunk - 733e7ab . If you rebase trunk on top of your PR, the build should pass. Also, thanks for the changes. I will look into them asap. |
b352767 to
b4641f2
Compare
…taining support for v1.
b4641f2 to
1be3b53
Compare
|
Thanks and sorry for the delay. I will go over the changes today and test them and if everything looks ok, merge them into trunk. |
|
Great! Thanks so much. If I've got the Jira-foo right, I should be subscribed to new issues with the digitalocean label. |
|
Great :) |
DigitalOcean's API v2 has been out for sometime now, and v1 will soon be heading towards deprecation. It would be great for the next release to move to the new version.
https://developers.digitalocean.com/v2/
Filed on Jira as https://issues.apache.org/jira/browse/LIBCLOUD-660