Merge "nominate Alexandru Avadanii as a Pharos committer "
authorJack Morgan <jack.morgan@intel.com>
Tue, 9 Jan 2018 00:15:36 +0000 (00:15 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 9 Jan 2018 00:15:36 +0000 (00:15 +0000)
config/installers/daisy/network-dpdk.yaml.j2
config/installers/daisy/network.yaml.j2
config/pdf/pod1.encrypted.yaml
config/pdf/pod1.yaml
config/utils/check-jinja2.sh
config/utils/generate_config.py
labs/bii/pod1.yaml
labs/zte/pod1.yaml
labs/zte/pod2.yaml
labs/zte/pod3.yaml

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:
index 31548ea..8693647 100644 (file)
@@ -19,7 +19,7 @@ jumphost:
     arch: {x86_64|aarch64}
     cpus: 2
     # add values based on CFLAGS in GCC
-    cpu_cflags: {broadwell|hasewell|etc}
+    cpu_cflags: {broadwell|haswell|etc}
     # physical cores, not including hyper-threads
     cores: 10
     memory: 32G
@@ -96,7 +96,7 @@ nodes:
       model: S2600JF
       arch: x86_64
       cpus: 2
-      cpu_cflags: hasewell
+      cpu_cflags: haswell
       cores: 12
       memory: 128G
     # for nodes in the same pod may have the same configuration
index 77533bb..d9028c2 100644 (file)
@@ -19,7 +19,7 @@ jumphost:
     arch: {x86_64|aarch64}
     cpus: 2
     # add values based on CFLAGS in GCC
-    cpu_cflags: {broadwell|hasewell|etc}
+    cpu_cflags: {broadwell|haswell|etc}
     # physical cores, not including hyper-threads
     cores: 10
     memory: 32G
@@ -77,7 +77,7 @@ nodes:
       model: S2600JF
       arch: x86_64
       cpus: 2
-      cpu_cflags: hasewell
+      cpu_cflags: haswell
       cores: 12
       memory: 128G
     # for nodes in the same pod may have the same configuration
index a19d209..2953ff6 100755 (executable)
@@ -61,7 +61,7 @@ To troubleshoot PDF parsing against a specific installer adapter,
 execute the following commands locally (e.g. for zte-pod2/joid):
 $ ./config/utils/generate_config.py \\
     -y labs/zte/pod2.yaml \\
-    -j ./pharos/config/installers/joid/pod_config.yaml.j2
+    -j config/installers/joid/pod_config.yaml.j2
 
 EOF
 exit "${RC}"
index 3710880..dfc6e6c 100755 (executable)
@@ -57,12 +57,12 @@ ENV.filters['dpkg_arch'] = dpkg_arch
 try:
     DICT = yaml.safe_load(check_output(['eyaml', 'decrypt', '-f', ARGS.yaml]))
 except CalledProcessError as ex:
-    logging.error('eyaml decryption failed, keys might be missing')
+    logging.error('eyaml decryption failed!')
 except OSError as ex:
     logging.warn('eyaml not found, skipping decryption')
 try:
-    DICT
-except NameError as ex:
+    DICT['details']
+except (NameError, TypeError) as ex:
     logging.warn('PDF decryption skipped, fallback to using raw data.')
     with open(ARGS.yaml) as _:
         DICT = yaml.safe_load(_)
index 1f5046b..29d9a4e 100644 (file)
@@ -45,7 +45,7 @@ jumphost:
     model: powerEdge 720
     arch: x86_64
     cpus: 2
-    cpu_cflags: hasewell    # add values based on CFLAGS in GCC
+    cpu_cflags: haswell     # add values based on CFLAGS in GCC
     cores: 8                # physical cores, not including hyper-threads
     memory: 16G
   disks:                    # disk list
@@ -100,7 +100,7 @@ nodes:
       model: powerEdge 720
       arch: x86_64
       cpus: 2
-      cpu_cflags: hasewell   # add values based on CFLAGS in GCC
+      cpu_cflags: haswell    # add values based on CFLAGS in GCC
       cores: 8               # physical cores, not including hyper-threads
       memory: 32G
     disks: &disk_A                           # disk list
index bdc5ab4..950c2d8 100644 (file)
@@ -19,7 +19,7 @@ net_config:
   admin:
     interface: 0
     vlan: native
-    network: 10.20.6.0
+    network: 10.10.6.0
     mask: 24
   mgmt:
     interface: 1
@@ -53,7 +53,7 @@ jumphost:
     model: R5300
     arch: x86_64
     cpus: 2
-    cpu_cflags: hasewell
+    cpu_cflags: haswell
     cores: 12
     memory: 128G
   disks:
@@ -116,7 +116,7 @@ nodes:
       model: E9000
       arch: x86_64
       cpus: 2
-      cpu_cflags: hasewell
+      cpu_cflags: haswell
       cores: 10
       memory: 128G
     disks: &disks
index 9cf629f..5b3915f 100644 (file)
@@ -53,7 +53,7 @@ jumphost:
     model: R5300
     arch: x86_64
     cpus: 2
-    cpu_cflags: hasewell
+    cpu_cflags: haswell
     cores: 12
     memory: 128G
   disks:
@@ -116,7 +116,7 @@ nodes:
       model: E9000
       arch: x86_64
       cpus: 2
-      cpu_cflags: hasewell
+      cpu_cflags: haswell
       cores: 10
       memory: 128G
     disks: &disks
index d930d52..b44602f 100644 (file)
@@ -53,7 +53,7 @@ jumphost:
     model: R5300
     arch: x86_64
     cpus: 1
-    cpu_cflags: hasewell
+    cpu_cflags: haswell
     cores: 6
     memory: 80G
   disks: