lib/chef-workflow/support/scheduler.rb
#
# 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.
#
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.
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 .
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.add(group_name)
  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 . add ( group_name ) end
Schedule a group of VMs for provision.
Schedule a group of VMs for provision .
group_name
<not_specific>
provisioner
<not_specific>
dependencies
<not_specific>