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

Digitalocean ex_rename_node() extension method #252

Closed
wants to merge 1 commit into
base: trunk
from

Conversation

Projects
None yet
2 participants
@rahulrrixe

rahulrrixe commented Feb 18, 2014

@Kami as you have told me; I have added the extension method for renaming digitalocean node and also test suit for it.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 18, 2014

Member

This looks like a good start.

There are some lint and test failure issues though - https://travis-ci.org/apache/libcloud/builds/19144330

For tests to pass you need to fix the method call, add a response fixture and modify the MockHttpClass to return your response fixture on rename node HTTP request.

Member

Kami commented Feb 18, 2014

This looks like a good start.

There are some lint and test failure issues though - https://travis-ci.org/apache/libcloud/builds/19144330

For tests to pass you need to fix the method call, add a response fixture and modify the MockHttpClass to return your response fixture on rename node HTTP request.

Show outdated Hide outdated libcloud/compute/drivers/digitalocean.py
@@ -127,6 +127,12 @@ def destroy_node(self, node):
params=params)
return res.status == httplib.OK
def ex_rename(self, node, name):

This comment has been minimized.

@Kami

Kami Feb 18, 2014

Member

Please add _node suffix to the method name to make it clear that the method operates on a node.

@Kami

Kami Feb 18, 2014

Member

Please add _node suffix to the method name to make it clear that the method operates on a node.

Show outdated Hide outdated libcloud/test/compute/test_digitalocean.py
@@ -89,6 +89,11 @@ def test_destroy_node_success(self):
result = self.driver.destroy_node(node)
self.assertTrue(result)
def test_ex_rename_node_success(self):
node = self.driver.list_nodes()[0]
result = self.driver.ex_rename_node(node, "helios")

This comment has been minimized.

@Kami

Kami Feb 18, 2014

Member

For consistency, please use single quotes around strings.

@Kami

Kami Feb 18, 2014

Member

For consistency, please use single quotes around strings.

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Feb 18, 2014

@Kami Thanks I will make the changes :)

rahulrrixe commented Feb 18, 2014

@Kami Thanks I will make the changes :)

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe commented Feb 18, 2014

@Kami done 👍

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 19, 2014

Member

@rahulrrixe Looking good.

Please just squash all the commits (https://libcloud.readthedocs.org/en/latest/development.html#squash-the-commits-and-generate-the-patch) and I will merge changes into trunk.

Member

Kami commented Feb 19, 2014

@rahulrrixe Looking good.

Please just squash all the commits (https://libcloud.readthedocs.org/en/latest/development.html#squash-the-commits-and-generate-the-patch) and I will merge changes into trunk.

Rahul Ranjan
added ex_rename() extention method to the driver
added test suite for the ex_rename() extention method

changed ex_rename() to ex_rename_node() extention method

Added the MockHttptestcase from ex_rename_node() extension method

changed ex_rename() to ex_rename_node() extention method

corrected the MockHttptestcase for ex_rename_node() method

Added a fixture for ex_rename_node() method
@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 19, 2014

Member

Merged into trunk, thanks.

This pull request can be closed now.

Member

Kami commented Feb 19, 2014

Merged into trunk, thanks.

This pull request can be closed now.

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Feb 19, 2014

@Kami Thanks 👍 looking forward for next task.

rahulrrixe commented Feb 19, 2014

@Kami Thanks 👍 looking forward for next task.

@asfgit asfgit closed this in d10676a Feb 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment