This is great! Thanks Ivan.
I've started reviewing the code, and noticed a few places where it
seems to be out of "spec". In particular, the return from reboot and
destroy node is supposed to be the node object that was passed to the
function. This made me want to write some tests so developers such as
yourself can write just run tests to make sure that their code is
taking the right args and giving the correct response.
This following is a commit which adds a "TestCaseMixin". The mixin is
set of basic tests that should work on all providers. If there is a
better way to do this, I am totally open, but this was just a stab at
writing some code. Particularly, this checks that the response from
each of calls is the correct type. I would love your feedback on it.
http://github.com/polvi/libcloud/commit/57c436e5f0b5dbf1cf5bf8a377cd7e9410932bc3
This is the patch I had to create to get RimuHosting working (again,
this might not be the correct solution, but it causes the test to
pass):
http://github.com/polvi/libcloud/commit/32adafb00209de9328551cf66c6c4ebafc0d1cb0
Note: all this stuff is on my personal branch, just experimental for now.
Outside of the reboot/destroy response issue (which seems to be in
most of the drivers...), it looks like you added args to the init of
the driver itself? It should use a standard __init__... but this is
hard to test as it is not part of the zope interface. Still looking
for better ways to test this too.
Also, it appears we need to pick a standard way of doing provider
exceptions. Probably should create a base ProviderException class and
let the specific providers inherit from that.
Any feedback appreciated!
-Alex
--
co-founder, cloudkick.com
twitter.com/cloudkick
541 231 0624