# File lib/genome-lib/lib.rb, line 196 def get_system_ip(system_name, max_tries=1) status = 1.upto(max_tries) do # Technically the yield should be after the remote call, but it would # trip up the 'find' yield if block_given? data = cobbler_call('get_status').find do |ip, s| s[2] == "system:%s" % system_name && s[5] =~ /^installing/ end # This returns from the block break data unless data.nil? end return status.nil? ? nil : status[0] end