Browse Source
This adds support to use jinja template for network config. Also adds ones to be used with default undercloud and standalone. Though the templates of both undercloud and standalone are almost the same, separate ones are kept as before. If someone wants to override the whole config as supported earlier it can be done by choosing a different template. Change-Id: I16be7ee44af8f52c8ef0705e2ab692148d65bc28changes/67/752367/7
4 changed files with 79 additions and 2 deletions
@ -0,0 +1,32 @@
|
||||
--- |
||||
{% set control_virtual_ip = deployed_server_port_map.control_virtual_ip.fixed_ips[0].ip_address %} |
||||
{% set public_virtual_ip = deployed_server_port_map.public_virtual_ip.fixed_ips[0].ip_address %} |
||||
{% if ':' in control_virtual_ip %} |
||||
{% set control_virtual_cidr = 128 %} |
||||
{% else %} |
||||
{% set control_virtual_cidr = 32 %} |
||||
{% endif %} |
||||
{% if ':' in public_virtual_ip %} |
||||
{% set public_virtual_cidr = 128 %} |
||||
{% else %} |
||||
{% set public_virtual_cidr = 32 %} |
||||
{% endif %} |
||||
network_config: |
||||
- type: ovs_bridge |
||||
name: br-ctlplane |
||||
use_dhcp: false |
||||
mtu: {{ local_mtu }} |
||||
ovs_extra: |
||||
- br-set-external-id br-ctlplane bridge-id br-ctlplane |
||||
addresses: |
||||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }} |
||||
- ip_netmask: {{ control_virtual_ip}}/{{ control_virtual_cidr }} |
||||
- ip_netmask: {{ public_virtual_ip}}/{{ public_virtual_cidr }} |
||||
routes: {{ ctlplane_static_routes }} |
||||
dns_servers: {{ dns_nameservers }} |
||||
domain: {{ dns_search_domains }} |
||||
members: |
||||
- type: interface |
||||
name: {{ neutron_public_interface }} |
||||
primary: true |
||||
mtu: {{ local_mtu }} |
@ -0,0 +1,31 @@
|
||||
--- |
||||
{% set control_virtual_ip = deployed_server_port_map.control_virtual_ip.fixed_ips[0].ip_address %} |
||||
{% set public_virtual_ip = deployed_server_port_map.public_virtual_ip.fixed_ips[0].ip_address %} |
||||
{% if ':' in control_virtual_ip %} |
||||
{% set control_virtual_cidr = 128 %} |
||||
{% else %} |
||||
{% set control_virtual_cidr = 32 %} |
||||
{% endif %} |
||||
{% if ':' in public_virtual_ip %} |
||||
{% set public_virtual_cidr = 128 %} |
||||
{% else %} |
||||
{% set public_virtual_cidr = 32 %} |
||||
{% endif %} |
||||
network_config: |
||||
- type: ovs_bridge |
||||
name: br-ctlplane |
||||
use_dhcp: false |
||||
ovs_extra: |
||||
- br-set-external-id br-ctlplane bridge-id br-ctlplane |
||||
addresses: |
||||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }} |
||||
- ip_netmask: {{ control_virtual_ip}}/{{ control_virtual_cidr }} |
||||
- ip_netmask: {{ public_virtual_ip}}/{{ public_virtual_cidr }} |
||||
routes: {{ ctlplane_static_routes }} |
||||
dns_servers: {{ dns_nameservers }} |
||||
domain: {{ dns_search_domains }} |
||||
members: |
||||
- type: interface |
||||
name: {{ neutron_public_interface }} |
||||
primary: true |
||||
mtu: {{ local_mtu }} |
Loading…
Reference in new issue