lib/chef-workflow/support/scheduler.rb
#
# Performs the deprovision of a group by replaying its provision strategy
# backwards and applying the #shutdown method instead of the #startup method.
# Removes it from the various state tables if true is set as the second
# argument, which is the default.
#
Performs the deprovision of a group by replaying its provision strategy
backwards and applying the #shutdown method instead of the #startup method.
Removes it from the various state tables if true is set as the second
argument, which is the default.
Performs the deprovision of a group by replaying its provision strategy backwards and applying the #shutdown method instead of the #startup method . Removes it from the various state tables if true is set as the second argument which is the default .
def deprovision_group(group_name, clean_state=true)
    provisioner = vm_groups[group_name]
    if provisioner
      if_debug do
        $stderr.puts "Attempting to deprovision group #{group_name}"
      end
      provisioner.reverse.each do |this_prov|
        unless this_prov.shutdown
          if_debug do
            $stderr.puts "Could not deprovision group #{group_name}."
          end
        end
      end
    end
    if clean_state
      solved.delete(group_name)
      vm_dependencies.delete(group_name)
      vm_groups.delete(group_name)
    end
  end
def deprovision_group ( group_name , clean_state = true ) provisioner = vm_groups [ group_name ] if provisioner if_debug do $stderr . puts "Attempting to deprovision group #{group_name}" end provisioner . reverse . each do | this_prov | unless this_prov . shutdown if_debug do $stderr . puts "Could not deprovision group #{group_name}." end end end end if clean_state solved . delete ( group_name ) vm_dependencies . delete ( group_name ) vm_groups . delete ( group_name ) end end
Performs the deprovision of a group by replaying its provision strategy
backwards and applying the #shutdown method instead of the #startup method.
Performs the deprovision of a group by replaying its provision strategy backwards and applying the #shutdown method instead of the #startup method .
# if we can't find the provisioner, we probably got asked to clean up # something we never scheduled. Just ignore that.
group_name
<not_specific>
clean_state
<not_specific>