Class: RSpecSystem::NodeSet::VagrantVmwareFusion
- Inherits:
-
VagrantBase
- Object
- Base
- VagrantBase
- RSpecSystem::NodeSet::VagrantVmwareFusion
- Defined in:
- lib/rspec-system/node_set/vagrant_vmware_fusion.rb
Overview
A NodeSet implementation for Vagrant using the vmware_fusion provider
Constant Summary collapse
- PROVIDER_TYPE =
'vagrant_vmware_fusion'
Instance Attribute Summary
Attributes inherited from Base
#config, #custom_prefabs_path, #destroy, #nodes, #setname
Instance Method Summary collapse
-
#customize_provider(name, options) ⇒ String
private
Adds virtualbox customization to the Vagrantfile.
-
#vagrant_provider_name ⇒ String
Name of provider.
Methods inherited from VagrantBase
#connect, #create_vagrantfile, #customize_vm, #global_vagrant_options, #initialize, #launch, #ssh_config, #teardown, #vagrant
Methods included from Util
Methods included from Log
#bold, #color, #formatter, #log, #output
Methods inherited from Base
#configure, #connect, #default_node, #initialize, #launch, #provider_type, #randmac, #random_string, #rcp, #run, #setup, #ssh_connect, #ssh_exec!, #teardown, #tmppath
Constructor Details
This class inherits a constructor from RSpecSystem::NodeSet::VagrantBase
Instance Method Details
#customize_provider(name, options) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Adds virtualbox customization to the Vagrantfile
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rspec-system/node_set/vagrant_vmware_fusion.rb', line 25 def customize_provider(name,) custom_config = "" .each_pair do |key,value| next if .include?(key) case key when 'cpus' custom_config << " prov.vmx['numvcpus'] = '#{value}'\n" when 'memory' custom_config << " prov.vmx['memsize'] = '#{value}'\n" when 'mac' custom_config << " prov.vmx['ethernet0.generatedAddress'] = '#{value}'\n" else log.warn("Skipped invalid custom option for node #{name}: #{key}=#{value}") end end custom_config end |
#vagrant_provider_name ⇒ String
Name of provider
15 16 17 |
# File 'lib/rspec-system/node_set/vagrant_vmware_fusion.rb', line 15 def vagrant_provider_name 'vmware_fusion' end |