diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-06-10 15:13:52 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-06-24 15:17:01 +0200 |
commit | 0a5938bca8b4c6b8f328bdbb1f9da35fd8da002c (patch) | |
tree | 34a62eddb03a8cc4bdef6c66092300767791da57 /config/installers/fuel | |
parent | fed789498ee2d7b4a910c881331013d30ef623b3 (diff) |
[fuel] net_macros: Allow interface proto override
For non-Debian systems, proto 'manual' is not a valid choice and
we should be able to override it.
e.g.: For CentOS, proto 'none' should be used instead.
Change-Id: Id1b6d9d51de17ede0c1e2fdc7f845d74b2a4ab9d
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'config/installers/fuel')
-rw-r--r-- | config/installers/fuel/net_macros.j2 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/installers/fuel/net_macros.j2 b/config/installers/fuel/net_macros.j2 index ad26a79c..c0a5d329 100644 --- a/config/installers/fuel/net_macros.j2 +++ b/config/installers/fuel/net_macros.j2 @@ -5,24 +5,24 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- macro linux_network_interfaces_nic(nics) -%} +{%- macro linux_network_interfaces_nic(nics, proto = 'manual') -%} {%- for nic in nics %} {{ nic }}: enabled: true type: eth - proto: manual + proto: {{ proto }} mtu: ${_param:interface_mtu} name: {{ nic }} noifupdown: true {%- endfor %} {%- endmacro -%} -{%- macro linux_network_interfaces_vlan(vlans) -%} +{%- macro linux_network_interfaces_vlan(vlans, proto = 'manual') -%} {%- for vlan in vlans %} {%- if vlan | int > 0 %} {{ vlans[vlan] }}.{{ vlan }}: enabled: true - proto: manual + proto: {{ proto }} mtu: ${_param:interface_mtu} type: vlan name: {{ vlans[vlan] }}.{{ vlan }} |