os_net_config:
network_config:
-
- {%- if vlans['private_network'] is number or vlans['storage_network'] is number or vlans['api_network'] is number %}
+ {%- if not nets['external'][0]['enabled'] or nets['tenant']['nic_mapping'][role]['vlan'] is number or nets['storage']['nic_mapping'][role]['vlan'] is number or nets['api']['nic_mapping'][role]['vlan'] is number or nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
type: ovs_bridge
name: {get_input: bridge_name}
members:
-
type: interface
- name: nic1
+ name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
# force the MAC address of the bridge to this interface
primary: true
- {%- if 'public_network' in enabled_networks and vlans['public_network'] is number %}
+ {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
-
type: vlan
vlan_id: {get_param: ExternalNetworkVlanID}
default: true
next_hop: {get_param: ExternalInterfaceDefaultRoute}
{%- endif %}
- {%- if 'private_network' in enabled_networks and vlans['private_network'] is number %}
+ {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] is number %}
-
type: vlan
vlan_id: {get_param: TenantNetworkVlanID}
-
ip_netmask: {get_param: TenantIpSubnet}
{%- endif %}
- {%- if 'storage_network' in enabled_networks and vlans['storage_network'] is number %}
+ {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] is number %}
-
type: vlan
vlan_id: {get_param: StorageNetworkVlanID}
-
ip_netmask: {get_param: StorageIpSubnet}
{%- endif %}
- {%- if 'api_network' in enabled_networks and vlans['api_network'] is number %}
+ {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] is number %}
-
type: vlan
vlan_id: {get_param: InternalApiNetworkVlanID}
{%- endif %}
{%- else %}
type: interface
- name: nic1
+ name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
{%- endif %}
use_dhcp: false
dns_servers: {get_param: DnsServers}
-
ip_netmask: 169.254.169.254/32
next_hop: {get_param: EC2MetadataIp}
- {%- if external_net_af == 6 or role == 'compute' %}
+ {%- if external_net_af == 6 or role == 'compute' or not nets['external'][0]['enabled'] %}
-
default: true
next_hop: {get_param: ControlPlaneDefaultRoute}
{%- endif %}
- {%- set nic_index = 2 %}
- {%- if 'private_network' in enabled_networks and vlans['private_network'] == 'native' %}
+ {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] == 'native' %}
{%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
-
- type: ovs_bridge
+ type: ovs_user_bridge
name: {{ ovs_dpdk_bridge }}
use_dhcp: false
addresses:
ip_netmask: {get_param: TenantIpSubnet}
members:
-
- type: interface
- name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
- # force the MAC address of the bridge to this interface
- primary: true
- -
- type: ovs_bridge
- name: br-tun
- use_dhcp: false
+ type: ovs_dpdk_port
+ name: dpdk0
+ driver: {{ nets['tenant']['nic_mapping'][role]['uio_driver'] }}
+ members:
+ -
+ type: interface
+ name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
+ # force the MAC address of the bridge to this interface
+ primary: true
{%- else %}
-
- type: interface
- name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+ type: {{ nets['tenant']['nic_mapping'][role]['phys_type'] }}
+ name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
+ {%- if 'uio-driver' in nets['tenant']['nic_mapping'][role] %}
+ uio_driver: {{ nets['tenant']['nic_mapping'][role]['uio-driver'] }}
+ {%- endif %}
use_dhcp: false
addresses:
-
ip_netmask: {get_param: TenantIpSubnet}
{%- endif %}
{%- endif %}
- {%- if 'public_network' in enabled_networks and external_net_type == 'interface' and vlans['public_network'] == 'native' %}
+ {%- if nets['external'][0]['enabled'] and external_net_type != 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
-
- type: interface
- name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+ type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
+ name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
+ {%- if 'uio-driver' in nets['external'][0]['nic_mapping'][role] %}
+ uio_driver: {{ nets['external'][0]['nic_mapping'][role]['uio-driver'] }}
+ {%- endif %}
{%- if role == 'controller' %}
dns_servers: {get_param: DnsServers}
{%- endif %}
{%- endif %}
ip_netmask: 0.0.0.0/0
next_hop: {get_param: ExternalInterfaceDefaultRoute}
- {%- elif 'public_network' in enabled_networks and external_net_type == 'br-ex' and vlans['public_network'] == 'native' %}
+ {%- elif nets['external'][0]['enabled'] and external_net_type == 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
-
+ {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
+ type: ovs_user_bridge
+ {%- else %}
type: ovs_bridge
+ {%- endif %}
name: {get_input: bridge_name}
use_dhcp: false
members:
-
type: interface
- name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+ name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
# force the MAC address of the bridge to this interface
primary: true
{%- if role == 'controller' %}
next_hop: {get_param: ExternalInterfaceDefaultRoute}
{%- endif %}
{%- endif %}
- {%- if 'storage_network' in enabled_networks and vlans['storage_network'] == 'native' %}
+ {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] == 'native' %}
-
type: interface
- name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+ name: {{ nets['storage']['nic_mapping'][role]['members'][0] }}
use_dhcp: false
addresses:
-
ip_netmask: {get_param: StorageIpSubnet}
{%- endif %}
- {%- if 'api_network' in enabled_networks and vlans['api_network'] == 'native' %}
+ {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] == 'native' %}
-
type: interface
- name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+ name: {{ nets['api']['nic_mapping'][role]['members'][0] }}
use_dhcp: false
addresses:
-