class RSpecSystem::NodeSet::VagrantVmwareFusion

A NodeSet implementation for Vagrant using the vmware_fusion provider

Constants

PROVIDER_TYPE

Public Instance Methods

customize_provider(name,options) click to toggle source

Adds virtualbox customization to the Vagrantfile

@api private @param name [String] name of the node @param options [Hash] customization options @return [String] a series of vbox.customize lines

# File lib/rspec-system/node_set/vagrant_vmware_fusion.rb, line 25
def customize_provider(name,options)
  custom_config = ""
  options.each_pair do |key,value|
    next if global_vagrant_options.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() click to toggle source

Name of provider

@return [String] name of the provider as used by ‘vagrant –provider`

# File lib/rspec-system/node_set/vagrant_vmware_fusion.rb, line 15
def vagrant_provider_name
  'vmware_fusion'
end