Merge "Allows specifying nic order for overcloud nodes in network settings"
authorDan Radez <dradez@redhat.com>
Tue, 19 Jul 2016 16:51:15 +0000 (16:51 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Tue, 19 Jul 2016 16:51:15 +0000 (16:51 +0000)
1  2 
build/nics-template.yaml.jinja2

@@@ -85,13 -85,13 +85,13 @@@ resources
          os_net_config:
            network_config:
              -
 -            {%- if vlans['private_network'] is number or vlans['storage_network'] is number or vlans['api_network'] is number %}
 +            {%- if vlans['private_network'] is number or vlans['storage_network'] is number or vlans['api_network'] is number or  vlans['public_network'] is number %}
                type: ovs_bridge
                name: {get_input: bridge_name}
                members:
                  -
                    type: interface
-                   name: nic1
+                   name: {{ nics[role]['admin_network'] }}
                    # force the MAC address of the bridge to this interface
                    primary: true
                  {%- if 'public_network' in enabled_networks and vlans['public_network'] is number %}
                  {%- endif %}
              {%- else %}
                type: interface
-               name: nic1
+               name: {{ nics[role]['admin_network'] }}
              {%- endif %}
                use_dhcp: false
                dns_servers: {get_param: DnsServers}
                    next_hop: {get_param: ControlPlaneDefaultRoute}
                  {%- endif %}
  
-             {%- set nic_index = 2 %}
              {%- if 'private_network' in enabled_networks and vlans['private_network'] == 'native' %}
              {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
              -
                members:
                  -
                    type: interface
-                   name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+                   name: {{ nics[role]['private_network'] }}
                    # 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 %}
+               name: {{ nics[role]['private_network'] }}
                use_dhcp: false
                addresses:
                  -
              {%- if 'public_network' in enabled_networks and external_net_type == 'interface' and vlans['public_network'] == 'native' %}
              -
                type: interface
-               name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+               name: {{ nics[role]['public_network'] }}
                {%- if role == 'controller' %}
                dns_servers: {get_param: DnsServers}
                {%- endif %}
                members:
                  -
                    type: interface
-                   name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+                   name: {{ nics[role]['public_network'] }}
                    # force the MAC address of the bridge to this interface
                    primary: true
                {%- if role == 'controller' %}
              {%- if 'storage_network' in enabled_networks and vlans['storage_network'] == 'native' %}
              -
                type: interface
-               name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+               name: {{ nics[role]['storage_network'] }}
                use_dhcp: false
                addresses:
                  -
              {%- if 'api_network' in enabled_networks and vlans['api_network'] == 'native' %}
              -
                type: interface
-               name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+               name: {{ nics[role]['api_network'] }}
                use_dhcp: false
                addresses:
                  -