[neutron] Handle ML2 mechanism drivers

* add l2pop driver only if vxlan mode is enabled
* use network:backend list as drivers source

Change-Id: If513c2664d465f53ff3756c27ecab0fc519f6a50
This commit is contained in:
Michael Polenchuk 2019-09-24 10:44:59 +04:00
parent ac84cbab52
commit 88575904c0
2 changed files with 3 additions and 10 deletions

View File

@ -141,16 +141,10 @@ just set it along with nova_metadata_host.
{{- end -}}
{{- if empty $envAll.Values.conf.plugins.ml2_conf.ml2.mechanism_drivers -}}
{{- $_ := set $envAll.Values "__mechanism_drivers" ( list "l2population" ) }}
{{- if ( has "openvswitch" $envAll.Values.network.backend ) -}}
{{ $__mechanism_drivers := append $envAll.Values.__mechanism_drivers "openvswitch" }}
{{- $_ := set $envAll.Values "__mechanism_drivers" $__mechanism_drivers }}
{{- if (contains "vxlan" $envAll.Values.conf.plugins.ml2_conf.ml2.tenant_network_types) -}}
{{- $_ := set $envAll.Values "__mechanism_drivers" (append $envAll.Values.network.backend "l2population") -}}
{{- end -}}
{{- if ( has "linuxbridge" $envAll.Values.network.backend ) -}}
{{ $__mechanism_drivers := append $envAll.Values.__mechanism_drivers "linuxbridge" }}
{{- $_ := set $envAll.Values "__mechanism_drivers" $__mechanism_drivers }}
{{- end -}}
{{- $_ := set $envAll.Values.conf.plugins.ml2_conf.ml2 "mechanism_drivers" $envAll.Values.__mechanism_drivers -}}
{{- $_ := set $envAll.Values.conf.plugins.ml2_conf.ml2 "mechanism_drivers" ($envAll.Values.__mechanism_drivers | default $envAll.Values.network.backend | uniq) -}}
{{- end -}}
{{- if empty .Values.conf.neutron.DEFAULT.bind_port -}}

View File

@ -91,7 +91,6 @@ labels:
network:
# provide what type of network wiring will be used
# possible options: openvswitch, linuxbridge, sriov
backend:
- openvswitch
# NOTE(Portdirect): Share network namespaces with the host,