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]
|
if @options[:ip]
|
||||||
handle_ip_option(env)
|
handle_ip_option(env)
|
||||||
elsif @options[:type] == :dhcp
|
elsif @options[:type].to_s == 'dhcp'
|
||||||
handle_dhcp_private_network(env)
|
handle_dhcp_private_network(env)
|
||||||
elsif @options[:network_name]
|
elsif @options[:network_name]
|
||||||
handle_network_name_option(env)
|
handle_network_name_option(env)
|
||||||
|
@ -60,7 +60,7 @@ module VagrantPlugins
|
|||||||
forward_mode: 'nat',
|
forward_mode: 'nat',
|
||||||
}.merge(options)
|
}.merge(options)
|
||||||
|
|
||||||
if options[:type] == :dhcp && options[:ip].nil?
|
if options[:type].to_s == 'dhcp' && options[:ip].nil?
|
||||||
options[:network_name] = "vagrant-private-dhcp"
|
options[:network_name] = "vagrant-private-dhcp"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user