Browse Source

Merge "Restore network_data net order nicX contract"

changes/77/765677/1
Zuul 4 months ago
committed by Gerrit Code Review
parent
commit
a4aa27089e
6 changed files with 55 additions and 57 deletions
  1. +3
    -3
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics.j2
  2. +3
    -3
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics_dpdk.j2
  3. +20
    -21
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics_dvr.j2
  4. +3
    -3
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans.j2
  5. +3
    -3
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans_dpdk.j2
  6. +23
    -24
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans_dvr.j2

+ 3
- 3
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics.j2 View File

@ -9,8 +9,8 @@ network_config:
use_dhcp: false
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% for network in role_networks if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] %}
{% for network in networks_all if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] and network in role_networks %}
- type: interface
name: nic{{ loop.index +1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -19,7 +19,7 @@ network_config:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
{% elif network in role_networks or 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}


+ 3
- 3
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics_dpdk.j2 View File

@ -10,8 +10,8 @@ network_config:
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% set nics_used = [1] %}
{% for network in role_networks if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] %}
{% for network in networks_all if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] and network in role_networks %}
- type: interface
name: nic{{ loop.index +1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -20,7 +20,7 @@ network_config:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
{% elif network in role_networks or 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}


+ 20
- 21
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics_dvr.j2 View File

@ -9,9 +9,25 @@ network_config:
use_dhcp: false
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% set nics_used = [1] %}
{% for network in role_networks if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] %}
{% for network in networks_all if network not in networks_skip_config|default([]) %}
{% if network == 'External' %}
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
{% if network in role_networks %}
addresses:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
members:
- type: interface
name: nic{{ loop.index +1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
primary: true
{% elif network not in ["External", "Tenant"] and network in role_networks %}
- type: interface
name: nic{{ loop.index +1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -20,7 +36,7 @@ network_config:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif network == 'Tenant' %}
{% elif network == 'Tenant' and network in role_networks %}
- type: ovs_bridge
name: {{ 'br-' ~ networks_lower[network] }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -37,21 +53,4 @@ network_config:
use_dhcp: false
primary: true
{% endif %}
{% set _ = nics_used.append(loop.index) %}
{% endfor %}
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
mtu: {{ lookup('vars', networks_lower['External'] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
{% if 'External' in role_networks %}
addresses:
- ip_netmask:
{{ lookup('vars', networks_lower['External'] ~ '_ip') }}/{{ lookup('vars', networks_lower['External'] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower['External'] ~ '_host_routes') }}
{% endif %}
members:
- type: interface
name: nic{{nics_used[-1] + 1}}
mtu: {{ lookup('vars', networks_lower['External'] ~ '_mtu') }}
primary: true

+ 3
- 3
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans.j2 View File

@ -9,8 +9,8 @@ network_config:
use_dhcp: false
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% for network in role_networks if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] %}
{% for network in networks_all if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] and network in role_networks %}
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -23,7 +23,7 @@ network_config:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
{% elif network in role_networks or 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}


+ 3
- 3
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans_dpdk.j2 View File

@ -10,8 +10,8 @@ network_config:
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% set nics_used = [1] %}
{% for network in role_networks if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] %}
{% for network in networks_all if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] and network in role_networks %}
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -24,7 +24,7 @@ network_config:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
{% elif network in role_networks or 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}


+ 23
- 24
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans_dvr.j2 View File

@ -9,9 +9,28 @@ network_config:
use_dhcp: false
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% set nics_used = [1] %}
{% for network in role_networks if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] %}
{% for network in networks_all if network not in networks_skip_config|default([]) %}
{% if network == 'External' %}
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
members:
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
primary: true
{% if network in role_networks %}
- type: vlan
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% elif network not in ["External", "Tenant"] and network in role_networks %}
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -24,7 +43,7 @@ network_config:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif network == 'Tenant' %}
{% elif network == 'Tenant' and network in role_networks %}
- type: ovs_bridge
name: {{ 'br-' ~ networks_lower[network] }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
@ -44,24 +63,4 @@ network_config:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% set _ = nics_used.append(loop.index) %}
{% endfor %}
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
mtu: {{ lookup('vars', networks_lower['External'] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
members:
- type: interface
name: nic{{nics_used[-1] + 1}}
mtu: {{ lookup('vars', networks_lower['External'] ~ '_mtu') }}
primary: true
{% if 'External' in role_networks %}
- type: vlan
mtu: {{ lookup('vars', networks_lower['External'] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower['External'] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', networks_lower['External'] ~ '_ip') }}/{{ lookup('vars', networks_lower['External'] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower['External'] ~ '_host_routes') }}
{% endif %}

Loading…
Cancel
Save