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 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'
Copy link
Contributor

@tonybaloney tonybaloney Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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):
Copy link
Contributor

@tonybaloney tonybaloney Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be KERNELCHANGE, not CHANGEKERNEL

Copy link
Member Author

@vdloo vdloo Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 implement-ex-change-kernel branch from 0f4d52d to 0137585 Compare Oct 24, 2016
@asfgit asfgit closed this in 1e19061 Oct 24, 2016
asfgit pushed a commit that referenced this issue Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants