# File lib/rudy/routines/handlers/rye.rb, line 73
 73:      def create_set(hostnames, opts={})
 74:        hostnames ||= []
 75:        
 76:        ld "Creating set from:", hostnames.inspect
 77:        
 78:        opts = {
 79:          :user => (current_machine_user).to_s,
 80:          :parallel => @@global.parallel,
 81:          :quiet => Rudy.quiet?
 82:        }.merge(opts)
 83:        set = ::Rye::Set.new current_machine_group, opts 
 84:        
 85:        opts.delete(:parallel)   # Not used by Rye::Box.new
 86: 
 87:        hostnames.each do |m| 
 88: 
 89:          if m.is_a?(Rudy::Machine)
 90:            m.refresh! if m.dns_public.nil? || m.dns_public.empty?
 91:            if m.dns_public.nil? || m.dns_public.empty?
 92:              ld "Cannot find public DNS for #{m.name} (continuing...)"
 93:              rbox = self.create_box('nohost', opts) 
 94:            else
 95:              ld [:dns_public, m.dns_public, m.instid]
 96:              rbox = self.create_box(m.dns_public, opts) 
 97:            end
 98:            rbox.stash = m   # Store the machine instance in the stash
 99:            rbox.nickname = m.name
100:          else
101:            # Otherwise we assume it's a hostname
102:            rbox = self.create_box(m)
103:          end
104:          rbox.add_key user_keypairpath(opts[:user])
105:          set.add_box rbox
106:        end
107: 
108:        ld "Machines Set: %s" % [set.empty? ? '[empty]' : set.inspect]
109: 
110:        set
111:      end