Support additional options for neutron generic switch driver config
Allows kolla_neutron_ml2_generic_switch_extra to define a dict of additional config options to add to per-switch configuration for the neutron ML2 generic switch driver. These options may be switch host-specific.
This commit is contained in:
parent
87dcfaa7ab
commit
afe1b994ac
|
@ -59,3 +59,9 @@ kolla_neutron_ml2_generic_switch_hosts: []
|
||||||
# switch_interface_config variable for each switch to determine which
|
# switch_interface_config variable for each switch to determine which
|
||||||
# interfaces should be configured.
|
# interfaces should be configured.
|
||||||
kolla_neutron_ml2_generic_switch_trunk_port_hosts: "{{ groups['network'] }}"
|
kolla_neutron_ml2_generic_switch_trunk_port_hosts: "{{ groups['network'] }}"
|
||||||
|
|
||||||
|
# Dict containing additional configuration for switches managed by the
|
||||||
|
# genericswitch ML2 mechanism driver. For per-switch configuration of switches
|
||||||
|
# in kolla_neutron_ml2_generic_switch_hosts, this may be set as a group or
|
||||||
|
# host variable for the switch host.
|
||||||
|
kolla_neutron_ml2_generic_switch_extra: {}
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
'ngs_trunk_ports': (
|
'ngs_trunk_ports': (
|
||||||
hostvars[item].switch_interface_config |
|
hostvars[item].switch_interface_config |
|
||||||
switch_interface_config_select_description(kolla_neutron_ml2_generic_switch_trunk_port_hosts)).keys() | join(',')
|
switch_interface_config_select_description(kolla_neutron_ml2_generic_switch_trunk_port_hosts)).keys() | join(',')
|
||||||
}]
|
} | combine(hostvars[item].kolla_neutron_ml2_generic_switch_extra) ]
|
||||||
}}
|
}}
|
||||||
with_items: "{{ kolla_neutron_ml2_generic_switch_hosts }}"
|
with_items: "{{ kolla_neutron_ml2_generic_switch_hosts }}"
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,11 @@ key_file = {{ switch.key_file }}
|
||||||
{% if switch.secret is defined %}
|
{% if switch.secret is defined %}
|
||||||
secret = {{ switch.secret }}
|
secret = {{ switch.secret }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if switch.ngs_trunk_ports is defined %}
|
{% for key, value in switch.items() %}
|
||||||
ngs_trunk_ports = {{ switch.ngs_trunk_ports }}
|
{% if key.startswith('ngs_') %}
|
||||||
|
{{ key }} = {{ value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
# List of Neutron ML2 extention drivers to use.
|
# List of Neutron ML2 extention drivers to use.
|
||||||
#kolla_neutron_ml2_extension_drivers:
|
#kolla_neutron_ml2_extension_drivers:
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Neutron ML2 generic switch driver configuration.
|
||||||
|
|
||||||
# List of switches to configure for use by genericswitch ML2 mechanism driver.
|
# List of switches to configure for use by genericswitch ML2 mechanism driver.
|
||||||
# Each item should be a dict containing the following items:
|
# Each item should be a dict containing the following items:
|
||||||
# name: Hostname of the switch
|
# name: Hostname of the switch
|
||||||
|
@ -43,6 +46,12 @@
|
||||||
# secret: not currently supported
|
# secret: not currently supported
|
||||||
#kolla_neutron_ml2_generic_switch_hosts:
|
#kolla_neutron_ml2_generic_switch_hosts:
|
||||||
|
|
||||||
|
# Dict containing additional configuration for switches managed by the
|
||||||
|
# genericswitch ML2 mechanism driver. For per-switch configuration of switches
|
||||||
|
# in kolla_neutron_ml2_generic_switch_hosts, this may be set as a group or
|
||||||
|
# host variable for the switch host.
|
||||||
|
#kolla_neutron_ml2_generic_switch_extra:
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Dummy variable to allow Ansible to accept this file.
|
# Dummy variable to allow Ansible to accept this file.
|
||||||
workaround_ansible_issue_8743: yes
|
workaround_ansible_issue_8743: yes
|
||||||
|
|
Loading…
Reference in New Issue