Class: ChefWorkflow::ProvisionHelper
- Inherits:
-
Object
- Object
- ChefWorkflow::ProvisionHelper
- Includes:
- KnifeProvisionHelper
- Defined in:
- lib/chef-workflow/helpers/provision.rb
Overview
Helper for provisioning. Intended to be instanced and assigned to the provision_helper attribute of a ProvisionedTestCase.
All methods except ‘provision`, which is shorthand, are passed directly to the scheduler.
Instance Method Summary collapse
- #deprovision(group_name) ⇒ Object
- #provision(group_name, number_of_servers, dependencies) ⇒ Object
- #run ⇒ Object
- #schedule_provision(*args) ⇒ Object
- #serial=(arg) ⇒ Object
- #wait_for(*args) ⇒ Object
Instance Method Details
#deprovision(group_name) ⇒ Object
23 24 25 |
# File 'lib/chef-workflow/helpers/provision.rb', line 23 def deprovision(group_name) $SCHEDULER.deprovision_group(group_name) end |
#provision(group_name, number_of_servers, dependencies) ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/chef-workflow/helpers/provision.rb', line 39 def provision(group_name, number_of_servers, dependencies) schedule_provision( group_name, [ ChefWorkflow::GeneralSupport.machine_provisioner.new(group_name, number_of_servers), build_knife_provisioner ], dependencies ) end |
#run ⇒ Object
35 36 37 |
# File 'lib/chef-workflow/helpers/provision.rb', line 35 def run $SCHEDULER.run end |
#schedule_provision(*args) ⇒ Object
19 20 21 |
# File 'lib/chef-workflow/helpers/provision.rb', line 19 def schedule_provision(*args) $SCHEDULER.schedule_provision(*args) end |
#serial=(arg) ⇒ Object
31 32 33 |
# File 'lib/chef-workflow/helpers/provision.rb', line 31 def serial=(arg) $SCHEDULER.serial = arg end |
#wait_for(*args) ⇒ Object
27 28 29 |
# File 'lib/chef-workflow/helpers/provision.rb', line 27 def wait_for(*args) $SCHEDULER.wait_for(*args) end |