blueboxgroup / kitchen-bluebox

Test Kitchen Driver for Blue Box Blocks API
2 stars 4 forks source link

fog server create takes :ssh_public_key #1

Closed jyotty closed 11 years ago

jyotty commented 11 years ago

Took me too long to figure out why Fog kept failing when I had ssh_public_key and no password specified in my .kitchen.local.yml.

jyotty commented 11 years ago

It was, if you set a password.

scoop206 commented 11 years ago

ok I was confused b/c when knife bluebox uses fog it passes in a public_key. Looks like if you do a save() on the server then it puts public_key into ssh_public_key https://github.com/fog/fog/blob/master/lib/fog/bluebox/models/compute/server.rb#L80

Perhaps kitchen-bluebox isn't doing a save()

jyotty commented 11 years ago

It's ultimately calling Fog::Compute.new(bluebox_opts).servers.create(opts):

https://github.com/jyotty/kitchen-bluebox/blob/5a2804ec8a568ad77df6ef4b31b4dc93a86f09e6/lib/kitchen/driver/bluebox.rb#L90

knife-bluebox uses .servers.new(opts).save. Fog::Bluebox::Servers is a subclass of Fog::Collection, and, well:

https://github.com/fog/fog/blob/master/lib/fog/core/collection.rb#L50-L54