Class: ChefWorkflow::VM

Inherits:
Object
  • Object
show all
Includes:
DebugSupport
Defined in:
lib/chef-workflow/support/vm.rb,
lib/chef-workflow/support/vm/ec2.rb,
lib/chef-workflow/support/vm/knife.rb,
lib/chef-workflow/support/vm/vagrant.rb,
lib/chef-workflow/support/vm/chef_server.rb

Overview

This class mainly exists to track the run state of the Scheduler, and is kept simple so that the contents can be marshalled and restored from a file.

Defined Under Namespace

Classes: ChefServerProvisioner, EC2Provisioner, KnifeProvisioner, VagrantProvisioner

Constant Summary

Constants included from DebugSupport

DebugSupport::CHEF_WORKFLOW_DEBUG_DEFAULT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DebugSupport

#if_debug

Constructor Details

#initializeVM

Returns a new instance of VM.



30
31
32
33
34
35
# File 'lib/chef-workflow/support/vm.rb', line 30

def initialize
  @groups        = ChefWorkflow::DatabaseSupport::VMGroup.new('vm_groups', false)
  @dependencies  = ChefWorkflow::DatabaseSupport::VMGroup.new('vm_dependencies', true)
  @provisioned   = ChefWorkflow::DatabaseSupport::Set.new('vm_scheduler', 'provisioned')
  @working       = ChefWorkflow::DatabaseSupport::Set.new('vm_scheduler', 'working')
end

Instance Attribute Details

#dependenciesObject (readonly)

the dependencies that each vm group depends on



24
25
26
# File 'lib/chef-workflow/support/vm.rb', line 24

def dependencies
  @dependencies
end

#groupsObject (readonly)

the vm groups and their provisioning lists.



22
23
24
# File 'lib/chef-workflow/support/vm.rb', line 22

def groups
  @groups
end

#provisionedObject (readonly)

the set of provisioned (solved) groups



26
27
28
# File 'lib/chef-workflow/support/vm.rb', line 26

def provisioned
  @provisioned
end

#workingObject (readonly)

the set of provisioning (working) groups



28
29
30
# File 'lib/chef-workflow/support/vm.rb', line 28

def working
  @working
end