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
base: trunk
from

Conversation

Projects
None yet
2 participants
@vdloo
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.

@tonybaloney

tonybaloney Oct 24, 2016

Contributor

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

@tonybaloney

tonybaloney Oct 24, 2016

Contributor

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

Show outdated Hide outdated libcloud/test/compute/test_digitalocean_v2.py
@@ -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.

@tonybaloney

tonybaloney Oct 24, 2016

Contributor

that should be KERNELCHANGE, not CHANGEKERNEL

@tonybaloney

tonybaloney Oct 24, 2016

Contributor

that should be KERNELCHANGE, not CHANGEKERNEL

This comment has been minimized.

@vdloo

vdloo Oct 24, 2016

Member

fixed, thanks!

@vdloo

vdloo Oct 24, 2016

Member

fixed, thanks!

add ex_change_kernel in DigitalOcean_v2 driver
> 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

@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