49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/fog/vcloud/requests/compute/configure_org_network.rb', line 49
def generate_udp_rules(udp_ports)
firewall_rules = ""
udp_ports.each do |port|
firewall_rules << <<EOF
<ns0:FirewallRule>
<ns0:IsEnabled>true</ns0:IsEnabled>
<ns0:Description>#{port}</ns0:Description>
<ns0:Policy>allow</ns0:Policy>
<ns0:Protocols>
<ns0:Udp>true</ns0:Udp>
</ns0:Protocols>
<ns0:Port>#{port}</ns0:Port>
<ns0:DestinationIp>Any</ns0:DestinationIp>
<ns0:SourcePort>-1</ns0:SourcePort>
<ns0:SourceIp>Any</ns0:SourceIp>
<ns0:Direction>in</ns0:Direction>
<ns0:EnableLogging>false</ns0:EnableLogging>
</ns0:FirewallRule>
EOF
end
firewall_rules
end
|