commit f545c002dc699f849026ccd1bad403b2933373aa Author: Jiaping LI Date: Wed Sep 30 11:02:02 2020 +0800 Remove more empty lines in ipv6 ra conf. If there are many conditional statement or loop, ra conf will have more empty lines. Change-Id: I8b3ba4ea88e795795e7f73580c4096dca8a46382 diff --git a/neutron/agent/linux/ra.py b/neutron/agent/linux/ra.py index 339a495..270e033 100644 --- a/neutron/agent/linux/ra.py +++ b/neutron/agent/linux/ra.py @@ -42,23 +42,23 @@ CONFIG_TEMPLATE = jinja2.Template("""interface {{ interface_name }} MinRtrAdvInterval {{ min_rtr_adv_interval }}; MaxRtrAdvInterval {{ max_rtr_adv_interval }}; - {% if network_mtu >= constants.IPV6_MIN_MTU %} + {%- if network_mtu >= constants.IPV6_MIN_MTU %} AdvLinkMTU {{network_mtu}}; {% endif %} - {% if constants.DHCPV6_STATELESS in ra_modes %} + {%- if constants.DHCPV6_STATELESS in ra_modes %} AdvOtherConfigFlag on; {% endif %} - {% if constants.DHCPV6_STATEFUL in ra_modes %} + {%- if constants.DHCPV6_STATEFUL in ra_modes %} AdvManagedFlag on; {% endif %} - {% if dns_servers %} + {%- if dns_servers %} RDNSS {% for dns in dns_servers %} {{ dns }} {% endfor %} {}; {% endif %} - {% for prefix in auto_config_prefixes %} + {%- for prefix in auto_config_prefixes %} prefix {{ prefix }} { AdvOnLink on; @@ -66,7 +66,7 @@ CONFIG_TEMPLATE = jinja2.Template("""interface {{ interface_name }} }; {% endfor %} - {% for prefix in stateful_config_prefixes %} + {%- for prefix in stateful_config_prefixes %} prefix {{ prefix }} { AdvOnLink on;