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

Merge pull request #3671 from joshmyers/enable_multiple_peer_subnets

Cloud Director supports multiple peer subnets.
This commit is contained in:
Wesley Beary 2015-08-24 14:58:32 -05:00
commit 10dd076849
2 changed files with 9 additions and 8 deletions

View file

@ -66,12 +66,13 @@ module Fog
xml.Netmask subnet[:Netmask] xml.Netmask subnet[:Netmask]
} }
end end
peer_subnet_config = tunnel_config[:PeerSubnet] tunnel_config[:PeerSubnet].each do |subnet|
xml.PeerSubnet { xml.PeerSubnet {
xml.Name peer_subnet_config[:Name] xml.Name subnet[:Name]
xml.Gateway peer_subnet_config[:Gateway] xml.Gateway subnet[:Gateway]
xml.Netmask peer_subnet_config[:Netmask] xml.Netmask subnet[:Netmask]
} }
end
xml.SharedSecret tunnel_config[:SharedSecret] xml.SharedSecret tunnel_config[:SharedSecret]
xml.SharedSecretEncrypted tunnel_config[:SharedSecretEncrypted] if tunnel_config.key?(:SharedSecretEncrypted) xml.SharedSecretEncrypted tunnel_config[:SharedSecretEncrypted] if tunnel_config.key?(:SharedSecretEncrypted)
xml.EncryptionProtocol tunnel_config[:EncryptionProtocol] xml.EncryptionProtocol tunnel_config[:EncryptionProtocol]

View file

@ -26,11 +26,11 @@ Shindo.tests('Compute::VcloudDirector | edge gateway requests', ['vclouddirector
:PeerId => "1223-123UDH-12321", :PeerId => "1223-123UDH-12321",
:LocalIpAddress => "192.168.90.90", :LocalIpAddress => "192.168.90.90",
:LocalId => "202UB-9602-UB629", :LocalId => "202UB-9602-UB629",
:PeerSubnet => { :PeerSubnet => [{
:Name => "192.168.0.0/18", :Name => "192.168.0.0/18",
:Gateway => "192.168.0.0", :Gateway => "192.168.0.0",
:Netmask => "255.255.192.0", :Netmask => "255.255.192.0",
}, }],
:SharedSecret => "dont tell anyone", :SharedSecret => "dont tell anyone",
:SharedSecretEncrypted => "false", :SharedSecretEncrypted => "false",
:EncryptionProtocol => "AES", :EncryptionProtocol => "AES",