-
Notifications
You must be signed in to change notification settings - Fork 923
Patched the ec2 driver to include instance start-stop functionality #35
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
Conversation
vishy1618
commented
Nov 4, 2011
- Added ex_start_node method to the ec2 compute driver
- Added ex_stop_node method to the ec2 compute driver
- Added a new _get_state_boolean function to get the state of the node while starting or stopping
libcloud/compute/drivers/ec2.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets not do this and use xpath.
Since we will always operate just on a single instance something like this should work:
state = findall(element=element, xpath='instancesSet/item/currentState/name', namespace=NAMESPACE)[0].text
return state in ('pending', 'stopping', 'starting')|
Lets also add some tests for the new functionality. For the examples you can see |
|
OK, will do it accordingly. Thanks for the inputs! 2011/11/4 Tomaž Muraus <
Suvish V.T. |
|
Hi, will the patches be accepted for the next release? |
|
I will take a look at the updated patch later on today. |
test/compute/test_ec2.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add and load fixtures otherwise this tests will fail.
|
I hope I have written the tests appropriately now. I ran the tests, and they work. I have also added some more functionality to the driver (elastic address association, describe all the addresses, list only specific nodes). |
|
I have merged your changes without the Currently Some thing to keep in mind for future contributions:
Thanks. |
|
Thanks a lot, Tomaz. I'll definitely take note of your suggestions. Regarding the |
|
Yeah, I would be ok with adding It also needs to be clearly documented what it does. |