Method: AvstCloud::AwsConnection#server_status

Defined in:
lib/avst-cloud/aws_connection.rb

#server_status(server_name) ⇒ Object



265
266
267
268
269
270
271
272
273
274
# File 'lib/avst-cloud/aws_connection.rb', line 265

def server_status(server_name)
    servers = all_named_servers(server_name).select{|serv| serv.state != 'terminated'}
    if servers.length > 0
        servers.each do |server|
            logger.debug "Server #{server.id} with name '#{server_name}' exists and has state: #{server.state}"
        end
    else
        logger.debug "Server not found for name: #{server_name}"
    end
end