lib/stack.rb in aws-kicker-0.0.2 vs lib/stack.rb in aws-kicker-0.0.3

- old
+ new

@@ -68,11 +68,11 @@ user_data.gsub!(/rentpro-unconfigured/, hostname) user_data.gsub!(/rentpro-stage.local/, config[:dns_domain]) # pp multipart # - puts "Bootstraping new instance - #{fqdn}, in #{config[:availability_zone]}" + puts "Bootstraping new instance - #{fqdn}, in #{config[:availability_zone]}, flavor #{config[:node_details][fqdn][:flavor_id]}, image_id #{config[:image_id]}" server = connection.servers.create({ :name => fqdn, :hostname => fqdn, :availability_zone => config[:availability_zone], :flavor_id => config[:node_details][fqdn][:flavor_id], @@ -210,6 +210,13 @@ # pp server # server.ready? && server.destroy end end + def Stack.validate(config) + # sanity check + # check credentials, keys, flavor, image, dns etc + connection = Stack.connect(config) + pp connection + pp connection.images.get(config[:image_id]) + end end