style(zone.xml): remove all trailing whitespaces

This commit is contained in:
Imran Iqbal 2020-04-01 18:41:42 +01:00
parent d8f0f47a54
commit 204efe5fc7
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819

View File

@ -9,65 +9,65 @@
<rule family="{{ rule.family }}"> <rule family="{{ rule.family }}">
{%- else %} {%- else %}
<rule> <rule>
{%- endif %} {%- endif %}
{%- if 'ipset' in rule %} {%- if 'ipset' in rule %}
<source ipset="{{ rule.ipset.name }}" /> <source ipset="{{ rule.ipset.name }}" />
{%- endif %} {%- endif %}
{%- if 'source' in rule %} {%- if 'source' in rule %}
<source address="{{ rule.source.address }}" {%- if 'invert' in rule.source %}invert="{{ rule.source.invert }}"{%- endif %} /> <source address="{{ rule.source.address }}" {%- if 'invert' in rule.source %}invert="{{ rule.source.invert }}"{%- endif %} />
{%- endif %} {%- endif %}
{%- if 'destination' in rule %} {%- if 'destination' in rule %}
<destination address="{{ rule.destination.address }}" {%- if 'invert' in rule.destination %}invert="{{ rule.destination.invert }}"{%- endif %} /> <destination address="{{ rule.destination.address }}" {%- if 'invert' in rule.destination %}invert="{{ rule.destination.invert }}"{%- endif %} />
{%- endif %} {%- endif %}
{%- if 'service' in rule %} {%- if 'service' in rule %}
<service name="{{ rule.service }}" /> <service name="{{ rule.service }}" />
{%- endif %} {%- endif %}
{%- if 'port' in rule %} {%- if 'port' in rule %}
<port port="{{ rule.port.portid }}" protocol="{{ rule.port.protocol }}" /> <port port="{{ rule.port.portid }}" protocol="{{ rule.port.protocol }}" />
{%- endif %} {%- endif %}
{%- if 'protocol' in rule %} {%- if 'protocol' in rule %}
<protocol value="{{ rule.protocol }}" /> <protocol value="{{ rule.protocol }}" />
{%- endif %} {%- endif %}
{%- if 'icmp_block' in rule %} {%- if 'icmp_block' in rule %}
<icmp-block name="{{ rule.icmp_block }}" /> <icmp-block name="{{ rule.icmp_block }}" />
{%- endif %} {%- endif %}
{%- if 'icmp_type' in rule %} {%- if 'icmp_type' in rule %}
<icmp-type name="{{ rule.icmp_type }}" /> <icmp-type name="{{ rule.icmp_type }}" />
{%- endif %} {%- endif %}
{%- if 'masquerade' in rule %} {%- if 'masquerade' in rule %}
{%- if rule.masquerade %}<masquerade/>{%- endif %} {%- if rule.masquerade %}<masquerade/>{%- endif %}
{%- endif %} {%- endif %}
{%- if 'forward_port' in rule %} {%- if 'forward_port' in rule %}
{%- if 'comment' in rule.forward_port %} {%- if 'comment' in rule.forward_port %}
<!-- {{ rule.forward_port.comment }} --> <!-- {{ rule.forward_port.comment }} -->
{%- endif %} {%- endif %}
<forward-port port="{{ rule.forward_port.portid }}" protocol="{{ rule.forward_port.protocol }}"{%- if 'to_port' in rule.forward_port %} to-port="{{ rule.forward_port.to_port }}"{%- endif %}{%- if 'to_addr' in rule.forward_port %} to-addr="{{ rule.forward_port.to_addr }}"{%- endif %} /> <forward-port port="{{ rule.forward_port.portid }}" protocol="{{ rule.forward_port.protocol }}"{%- if 'to_port' in rule.forward_port %} to-port="{{ rule.forward_port.to_port }}"{%- endif %}{%- if 'to_addr' in rule.forward_port %} to-addr="{{ rule.forward_port.to_addr }}"{%- endif %} />
{%- endif %} {%- endif %}
{%- if 'source_port' in rule %} {%- if 'source_port' in rule %}
{%- if 'comment' in rule.source_port %} {%- if 'comment' in rule.source_port %}
<!-- {{ rule.source_port.comment }} --> <!-- {{ rule.source_port.comment }} -->
{%- endif %} {%- endif %}
<source-port port="{{ rule.source_port.portid }}" protocol="{{ rule.source_port.protocol }}"{%- if 'to_port' in rule.source_port %} to-port="{{ rule.source_port.to_port }}"{%- endif %}{%- if 'to_addr' in rule.source_port %} to-addr="{{ rule.source_port.to_addr }}"{%- endif %} /> <source-port port="{{ rule.source_port.portid }}" protocol="{{ rule.source_port.protocol }}"{%- if 'to_port' in rule.source_port %} to-port="{{ rule.source_port.to_port }}"{%- endif %}{%- if 'to_addr' in rule.source_port %} to-addr="{{ rule.source_port.to_addr }}"{%- endif %} />
{%- endif %} {%- endif %}
{%- if 'log' in rule %} {%- if 'log' in rule %}
<log{%- if 'prefix' in rule.log %} prefix="{{ rule.log.prefix }}"{%- endif %}{%- if 'level' in rule.log %} level="{{ rule.log.level }}"{%- endif %}> <log{%- if 'prefix' in rule.log %} prefix="{{ rule.log.prefix }}"{%- endif %}{%- if 'level' in rule.log %} level="{{ rule.log.level }}"{%- endif %}>
{%- if 'limit' in rule.log %} {%- if 'limit' in rule.log %}
<limit value="{{ rule.log.limit }}"/> <limit value="{{ rule.log.limit }}"/>
{%- endif %} {%- endif %}
</log> </log>
{%- endif %} {%- endif %}
{%- if 'audit' in rule %} {%- if 'audit' in rule %}
<audit>{%- if 'limit' in rule.audit %} <limit value="{{ rule.audit.limit }}"/>{%- endif %}</audit> <audit>{%- if 'limit' in rule.audit %} <limit value="{{ rule.audit.limit }}"/>{%- endif %}</audit>
{%- endif %} {%- endif %}
{%- if 'accept' in rule %} {%- if 'accept' in rule %}
<accept/> <accept/>
{%- endif %} {%- endif %}
{%- if 'reject' in rule %} {%- if 'reject' in rule %}
<reject{%- if 'type' in rule.reject %} type="{{ rule.reject.type }}"{%- endif %} /> <reject{%- if 'type' in rule.reject %} type="{{ rule.reject.type }}"{%- endif %} />
{%- endif %} {%- endif %}
{%- if 'drop' in rule %} {%- if 'drop' in rule %}
<drop/> <drop/>
{%- endif %} {%- endif %}
</rule> </rule>
{%- endmacro %} {%- endmacro %}
<zone{%- if 'target' in zone %} target="{{ zone.target }}"{%- endif %}> <zone{%- if 'target' in zone %} target="{{ zone.target }}"{%- endif %}>