Merge branch 'devops_3' into handling_stack_exceptions

This commit is contained in:
Anton Chuchkalov 2015-09-21 20:32:09 +03:00
commit feef03efc5
3 changed files with 9 additions and 9 deletions

View File

@ -8,7 +8,8 @@ module Devops
end
def stack_status
details['StackStatus'] if details
puts self.details.inspect
self.details['StackStatus'] if self.details
end
def bson_safe_details

View File

@ -152,8 +152,8 @@ module Devops
cmd << "#{address} 'exit'"
cmd << " 2>&1"
@out.puts "\nWaiting for SSH..."
@out.puts "Test command: '#{cmd}'"
@out << "\nWaiting for SSH..."
@out << "\nTest command: '#{cmd}'\n"
@out.flush
retries_amount = 0

View File

@ -157,7 +157,8 @@ module Provider
end
s.public_ip = details["ipAddress"]
s.private_ip = details["privateIpAddress"]
# set_server_tags(s)
tags = set_server_tags(s)
out << "\nServer tags: #{tags.inspect}\n"
out << "\nDone\n\n"
out << s.info
@ -168,6 +169,7 @@ module Provider
tags = {
}
compute.create_tags(s.id, tags)
tags
end
def delete_server s
@ -283,11 +285,8 @@ module Provider
end
def stack_details(stack)
response = cloud_formation.describe_stacks({'StackName' => stack.name}).body['Stacks']
# somewhy it sometimes returns blank results
response.detect do |t|
t.has_key?('StackName')
end
b = cloud_formation.describe_stacks({'StackName' => stack.name}).body
b['Stacks'].detect{|s| s.key?("StackStatus")} || {}
end
def stack_resources(stack)