mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #3449 from jipjipme/vsphere_vmclone
Allow setting gateway option in CustomizationIPSettings
This commit is contained in:
commit
083fd8eaca
1 changed files with 5 additions and 2 deletions
|
@ -171,8 +171,11 @@ module Fog
|
|||
end
|
||||
raise ArgumentError, "domain is required" unless cust_options.key?("domain")
|
||||
cust_domain = cust_options['domain']
|
||||
cust_ip_settings = RbVmomi::VIM::CustomizationIPSettings.new(cust_options["ipsettings"]) if cust_options.key?("ipsettings")
|
||||
cust_ip_settings.ip = RbVmomi::VIM::CustomizationFixedIp("ipAddress" => cust_options["ipsettings"]["ip"]) if cust_options.key?("ipsettings")
|
||||
if cust_options.key?("ipsettings")
|
||||
cust_ip_settings = RbVmomi::VIM::CustomizationIPSettings.new(cust_options["ipsettings"])
|
||||
cust_ip_settings.ip = RbVmomi::VIM::CustomizationFixedIp("ipAddress" => cust_options["ipsettings"]["ip"])
|
||||
cust_ip_settings.gateway = cust_options['ipsettings']['gateway']
|
||||
end
|
||||
cust_ip_settings ||= RbVmomi::VIM::CustomizationIPSettings.new("ip" => RbVmomi::VIM::CustomizationDhcpIpGenerator.new())
|
||||
cust_ip_settings.dnsDomain = cust_domain
|
||||
cust_global_ip_settings = RbVmomi::VIM::CustomizationGlobalIPSettings.new
|
||||
|
|
Loading…
Reference in a new issue