def schedule_provision(group_name, provisioner, dependencies=[])
      return nil if vm_groups[group_name]
      provisioner = [provisioner] unless provisioner.kind_of?(Array)
      provisioner.each { |x| x.name = group_name }
      vm_groups[group_name] = provisioner

      unless dependencies.all? { |x| vm_groups.has_key?(x) }
        raise "One of your dependencies for #{group_name} has not been pre-declared. Cannot continue"
      end

      vm_dependencies[group_name] = dependencies.to_set
      @waiters_mutex.synchronize do
        @waiters.add(group_name)
      end
    end
def schedule_provision(group_name, provisioner, dependencies=[])
      return nil if vm_groups[group_name]
      provisioner = [provisioner] unless provisioner.kind_of?(Array)
      provisioner.each { |x| x.name = group_name }
      vm_groups[group_name] = provisioner

      unless dependencies.all? { |x| vm_groups.has_key?(x) }
        raise "One of your dependencies for #{group_name} has not been pre-declared. Cannot continue"
      end

      vm_dependencies[group_name] = dependencies.to_set
      @waiters_mutex.synchronize do
        @waiters.add(group_name)
      end
    end
Schedule a group of VMs for provision. This takes a group name, which is a
 string, an array of provisioner objects, and a list of string dependencies.
 If anything in the dependencies list hasn't been pre-declared, it refuses
 to continue.

 This method will return nil if the server group is already provisioned.