Merge "PDF: Fix recurring typo in 'haswell' name"
authorAric Gardner <agardner@linuxfoundation.org>
Mon, 8 Jan 2018 21:29:02 +0000 (21:29 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 8 Jan 2018 21:29:03 +0000 (21:29 +0000)
config/installers/daisy/network-dpdk.yaml.j2
config/installers/daisy/network.yaml.j2

index 507e7cf..ccd7c8c 100644 (file)
@@ -41,6 +41,7 @@ network-config-metadata:
 
 networks:
 
+  {%- set nodes_num = conf['nodes'] | length -%}
   {%- set networks = {} -%}
   {%- for key in mapping -%}
     {%- set net_data = conf['net_config'][mapping[key]] -%}
@@ -61,7 +62,9 @@ networks:
       {%- set start = ".".join([ips[0], ips[1], ips[2], "10"]) -%}
       {%- set end = ".".join([ips[0], ips[1], ips[2], "200"]) -%}
     {%- endif -%}
-    {%- set vip = start -%}
+    {%- set vip = start.split(".")[3] | int -%}
+    {%- set vip = vip + nodes_num + 10 - (vip + nodes_num) % 10 -%}
+    {%- set vip = ".".join([ips[0], ips[1], ips[2], vip | string]) -%}
 
     {%- if 'gateway' in net_data -%}
       {%- set gateway = net_data.gateway -%}
@@ -88,6 +91,10 @@ networks:
         'end': '{{ end }}'
     vlan_id: {{ vlan }}
     name: '{{ key }}'
+    {%- if key == 'EXTERNAL' %}
+    network_name: 'admin_external'
+    mapping: 'physnet1'
+    {%- endif -%}
   {%- endfor %}
 
 interfaces:
index 9eef739..914df46 100644 (file)
@@ -41,6 +41,7 @@ network-config-metadata:
 
 networks:
 
+  {%- set nodes_num = conf['nodes'] | length -%}
   {%- set networks = {} -%}
   {%- for key in mapping -%}
     {%- set net_data = conf['net_config'][mapping[key]] -%}
@@ -61,7 +62,9 @@ networks:
       {%- set start = ".".join([ips[0], ips[1], ips[2], "10"]) -%}
       {%- set end = ".".join([ips[0], ips[1], ips[2], "200"]) -%}
     {%- endif -%}
-    {%- set vip = start -%}
+    {%- set vip = start.split(".")[3] | int -%}
+    {%- set vip = vip + nodes_num + 10 - (vip + nodes_num) % 10 -%}
+    {%- set vip = ".".join([ips[0], ips[1], ips[2], vip | string]) -%}
 
     {%- if 'gateway' in net_data -%}
       {%- set gateway = net_data.gateway -%}
@@ -88,6 +91,10 @@ networks:
         'end': '{{ end }}'
     vlan_id: {{ vlan }}
     name: '{{ key }}'
+    {%- if key == 'EXTERNAL' %}
+    network_name: 'admin_external'
+    mapping: 'physnet1'
+    {%- endif -%}
   {%- endfor %}
 
 interfaces: