Module: VagrantPlugins::Skytap::Action::MixinMachineIndex

Included in:
PrepareNFSValidIds, StoreExtraData
Defined in:
lib/vagrant-skytap/action/mixin_machine_index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env


5
6
7
# File 'lib/vagrant-skytap/action/mixin_machine_index.rb', line 5

def env
  @env
end

Instance Method Details

#machine_indexObject

The global machine index lives under ~/.vagrant.d by default, and contains a hash of entries for all guest machines on the host.


10
11
12
# File 'lib/vagrant-skytap/action/mixin_machine_index.rb', line 10

def machine_index
  @machine_index ||= env[:machine].env.machine_index
end

#machine_index_entryObject

NOTE: #get locks the machine. Make sure to #release(entry) when finished.


16
17
18
# File 'lib/vagrant-skytap/action/mixin_machine_index.rb', line 16

def machine_index_entry
  entry = machine_index.get(env[:machine].index_uuid)
end