class RSpecSystem::NodeSet::VagrantVirtualbox
A NodeSet
implementation for Vagrant.
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_virtualbox.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','memory' custom_config << " prov.customize ['modifyvm', :id, '--#{key}','#{value}']\n" when 'mac' custom_config << " prov.customize ['modifyvm', :id, '--macaddress1','#{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_virtualbox.rb, line 15 def vagrant_provider_name 'virtualbox' end