Skip to content
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

add ex_change_kernel in DigitalOcean_v2 driver #922

Closed
wants to merge 1 commit into from

Conversation

@vdloo
Copy link
Member

vdloo commented Oct 24, 2016

add ex_change_kernel in DigitalOcean_v2 driver

So the kernel can be managed using the API

To change the kernel of a Droplet, send a POST request to
/v2/droplets/$DROPLET_ID/actions. Set the "type" attribute to
change_kernel and the "kernel" attribute to the new kernel's ID.

https://developers.digitalocean.com/documentation/v2/#change-the-kernel

The DigitalOcean GrubLoader can also be set with this allowing for Internal Kernel Management in a Droplet.

@@ -154,6 +154,12 @@ def test_destroy_node_success(self):
result = self.driver.destroy_node(node)
self.assertTrue(result)

def test_ex_change_kernel_success(self):
node = self.driver.list_nodes()[0]
DigitalOceanMockHttp.type = 'KERNELCHANGE'

This comment has been minimized.

Copy link
@tonybaloney

tonybaloney Oct 24, 2016

Contributor

"AttributeError: 'DigitalOceanMockHttp' object has no attribute '_v2_droplets_3164444_actions_KERNELCHANGE'"

@@ -271,6 +277,11 @@ def _v2_droplets_3164444_DESTROY(self, method, url, body, headers):
return (httplib.NO_CONTENT, body, {},
httplib.responses[httplib.NO_CONTENT])

def _v2_droplets_3164444_actions_CHANGEKERNEL(self, method, url, body, headers):

This comment has been minimized.

Copy link
@tonybaloney

tonybaloney Oct 24, 2016

Contributor

that should be KERNELCHANGE, not CHANGEKERNEL

This comment has been minimized.

Copy link
@vdloo

vdloo Oct 24, 2016

Author Member

fixed, thanks!

> To change the kernel of a Droplet, send a POST request to
> /v2/droplets/$DROPLET_ID/actions. Set the "type" attribute to
> change_kernel and the "kernel" attribute to the new kernel's ID.

https://developers.digitalocean.com/documentation/v2/#change-the-kernel
@vdloo vdloo force-pushed the vdloo:implement-ex-change-kernel branch from 0f4d52d to 0137585 Oct 24, 2016
@asfgit asfgit closed this in 1e19061 Oct 24, 2016
asfgit pushed a commit that referenced this pull request Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.