Skip to content

add ex_change_kernel in DigitalOcean_v2 driver#922

Closed
vdloo wants to merge 1 commit into
apache:trunkfrom
vdloo:implement-ex-change-kernel
Closed

add ex_change_kernel in DigitalOcean_v2 driver#922
vdloo wants to merge 1 commit into
apache:trunkfrom
vdloo:implement-ex-change-kernel

Conversation

@vdloo
Copy link
Copy Markdown
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.


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

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'"

return (httplib.NO_CONTENT, body, {},
httplib.responses[httplib.NO_CONTENT])

def _v2_droplets_3164444_actions_CHANGEKERNEL(self, method, url, body, headers):
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member Author

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 October 24, 2016 12:59
@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants