1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Add support for multiple VPN tunnels.

This commit is contained in:
Josh Myers 2015-07-25 14:28:54 +01:00
parent 7ac955047f
commit 8902341086
2 changed files with 33 additions and 32 deletions

View file

@ -47,7 +47,7 @@ module Fog
xml.GatewayIpsecVpnService { xml.GatewayIpsecVpnService {
xml.IsEnabled vpn_config[:IsEnabled] if vpn_config.key?(:IsEnabled) xml.IsEnabled vpn_config[:IsEnabled] if vpn_config.key?(:IsEnabled)
tunnel_config = vpn_config[:Tunnel] vpn_config[:Tunnel].each do |tunnel_config|
xml.Tunnel { xml.Tunnel {
xml.Name tunnel_config[:Name] xml.Name tunnel_config[:Name]
xml.Description tunnel_config[:Description] xml.Description tunnel_config[:Description]
@ -78,6 +78,7 @@ module Fog
xml.Mtu tunnel_config[:Mtu] xml.Mtu tunnel_config[:Mtu]
xml.IsEnabled tunnel_config[:IsEnabled] xml.IsEnabled tunnel_config[:IsEnabled]
} }
end
} }
end end

View file

@ -20,7 +20,7 @@ Shindo.tests('Compute::VcloudDirector | edge gateway requests', ['vclouddirector
:GatewayIpsecVpnService => :GatewayIpsecVpnService =>
{ {
:IsEnabled => "true", :IsEnabled => "true",
:Tunnel => { :Tunnel => [{
:Name => "test vpn", :Name => "test vpn",
:PeerIpAddress => "110.110.110.110", :PeerIpAddress => "110.110.110.110",
:PeerId => "1223-123UDH-12321", :PeerId => "1223-123UDH-12321",
@ -41,7 +41,7 @@ Shindo.tests('Compute::VcloudDirector | edge gateway requests', ['vclouddirector
:Gateway => "192.168.90.254", :Gateway => "192.168.90.254",
:Netmask => "255.255.255.0" :Netmask => "255.255.255.0"
}] }]
} }]
} }
} }