Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add id in xml only if present #3980

Merged
merged 1 commit into from Feb 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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