mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Accept both symbol and string for network type
Previously, following Vagrant documentation to setup private DHCP network failed with: config.vm.network "private_network", type: "dhcp" Now libvirt provider accepts both "dhcp" and :dhcp
This commit is contained in:
parent
91fa94c62b
commit
795124eac9
@ -63,7 +63,7 @@ module VagrantPlugins
|
||||
|
||||
if @options[:ip]
|
||||
handle_ip_option(env)
|
||||
elsif @options[:type] == :dhcp
|
||||
elsif @options[:type].to_s == 'dhcp'
|
||||
handle_dhcp_private_network(env)
|
||||
elsif @options[:network_name]
|
||||
handle_network_name_option(env)
|
||||
|
@ -60,7 +60,7 @@ module VagrantPlugins
|
||||
forward_mode: 'nat',
|
||||
}.merge(options)
|
||||
|
||||
if options[:type] == :dhcp && options[:ip].nil?
|
||||
if options[:type].to_s == 'dhcp' && options[:ip].nil?
|
||||
options[:network_name] = "vagrant-private-dhcp"
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user