On Mon, 2010-01-18 at 13:51 +0100, Michal Fojtik wrote:
I want to announce a new gogrid driver for Deltacloud.
Gogrid.com provide a Cloud hosting and it's fully supported
by 'right' gems (which we already using in EC2).
Very cool. Some comments inline in the patch at the end. BTW, it's best
to prepare patches for submission with git-format-patch and then send
them with git-send-email - inline patches make it very easy to review
patches and talk about them.
Patch contains a simple unit test file to test basic functionality.
(cd server/libexec && ruby lib/deltacloud/drivers/gogrid_test.rb)
This is more a general thing: I think we should get to a point where we
have tests based on mock cloud interfaces, i.e. mock out right_gogrid
for this driver. Also, how about using a BDD framework like rspec or
cucumber (I've used rspec some, but not cucumber) - any opinions ?
We definitely need a good suite of unit tests, particulalry to ensure
that drivers return XML that is right.
Some comments on the driver itself:
# Storage capacity is same on all machines (10gb), it could be
extended using 'Cloud Storage'
define_hardware_profile('server-with-512mb-ram') do
cpu 2
memory 0.5
storage 10
architecture 'i386'
end
I haven't quite made my way through the GoGrid docs, but they also
support x86_64 images.
# gogrid doesn't supports realm yet (it's US/CA from whois)
Heh .. yeah, from their website they're right around the corner from
where I live.
define_instance_states do
start.to( :off ) .on( :create )
pending.to( :on ) .automatically
running.to( :off ) .on( :reboot )
running.to( :off ) .on( :stop )
shutting_down.to( :off ) .automatically
stopped.to( :off ) .automatically
end
This isn't right. For example, you have a transition from start to off
on create. I assume you mean start.to(:pending).on(:create) etc.
Can you include a link to the GoGrid docs that describe instance
states ? (Have I mentioned I find their docs hard to follow)
David