Skip to content

Commit

Permalink
Merge pull request #3980 from tinguelyp/master
Browse files Browse the repository at this point in the history
add id in xml only if present
  • Loading branch information
geemus committed Feb 7, 2018
2 parents 592fb9e + ab2c5dc commit 9e0ee66
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -165,7 +165,7 @@ def build_nat_service(xml)
xml.NatRule {
xml.RuleType rule[:RuleType]
xml.IsEnabled rule[:IsEnabled]
xml.Id rule[:Id]
xml.Id rule[:Id] if rule[:Id]
gateway_nat_rule = rule[:GatewayNatRule]
xml.GatewayNatRule {
xml.Interface(:name => gateway_nat_rule[:Interface][:name], :href => gateway_nat_rule[:Interface][:href])
Expand Down Expand Up @@ -211,7 +211,7 @@ def build_firewall_service(xml)
xml.LogDefaultAction firewall_config[:LogDefaultAction] if firewall_config.key?(:LogDefaultAction)
firewall_config[:FirewallRule].each do |rule|
xml.FirewallRule {
xml.Id rule[:Id]
xml.Id rule[:Id] if rule[:Id]
xml.IsEnabled rule[:IsEnabled] if rule.key?(:IsEnabled)
xml.MatchOnTranslate rule[:MatchOnTranslate] if rule.key?(:MatchOnTranslate)
xml.Description rule[:Description] if rule.key?(:Description)
Expand Down

0 comments on commit 9e0ee66

Please sign in to comment.