summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-01-14 19:50:48 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-01-14 20:11:57 +0100
commitebe465854cbae270526986ddf781726e2551733a (patch)
tree083d9dfa256d464474402269ab80a8a1993c14f9 /config
parent2cc95826f5e197673a26679495211d2cef87908c (diff)
[PDF] Daisy, Fuel: Add support for IDF net_config
- support net_config in either of PDF or IDF files; - later, we'll remove support for PDF net_config after all PDFs have been handled; Change-Id: Iea6351831f7dcd011587ae44f04f3c5973d8135a Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'config')
-rw-r--r--config/installers/daisy/network.yaml.j28
-rw-r--r--config/installers/fuel/pod_config.yml.j227
2 files changed, 23 insertions, 12 deletions
diff --git a/config/installers/daisy/network.yaml.j2 b/config/installers/daisy/network.yaml.j2
index 914df461..c344688e 100644
--- a/config/installers/daisy/network.yaml.j2
+++ b/config/installers/daisy/network.yaml.j2
@@ -39,12 +39,18 @@ network-config-metadata:
{%- set installer = "fuel" -%}
{%- endif %}
+{%- if conf.net_config is defined -%}
+ {%- set conf_net_config = conf.net_config -%}
+{%- elif conf.idf.net_config is defined -%}
+ {%- set conf_net_config = conf.idf.net_config -%}
+{%- endif %}
+
networks:
{%- set nodes_num = conf['nodes'] | length -%}
{%- set networks = {} -%}
{%- for key in mapping -%}
- {%- set net_data = conf['net_config'][mapping[key]] -%}
+ {%- set net_data = conf_net_config[mapping[key]] -%}
{%- set interface = net_data['interface'] -%}
{%- set interface_name = conf.idf[installer].network.node[0].interfaces[interface] -%}
{%- set bus_addr = conf.idf[installer].network.node[0].busaddr[interface] -%}
diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2
index bfcec091..22d6193d 100644
--- a/config/installers/fuel/pod_config.yml.j2
+++ b/config/installers/fuel/pod_config.yml.j2
@@ -1,18 +1,23 @@
---
{%- if conf.idf is defined and conf.idf.fuel is defined -%}
{%- if conf.net_config is defined -%}
- {%- set net_admin = conf.net_config.admin.network -%}
- {%- set net_mgmt = conf.net_config.mgmt.network -%}
- {%- set net_private = conf.net_config.private.network -%}
- {%- set net_public = conf.net_config.public.network -%}
- {%- set vlan_mgmt = conf.net_config.mgmt.vlan -%}
- {%- set vlan_private = conf.net_config.private.vlan -%}
- {%- if conf.net_config.public.dns is defined -%}
- {%- set dns_public = conf.net_config.public.dns -%}
+ {%- set conf_net_config = conf.net_config -%}
+ {%- elif conf.idf.net_config is defined -%}
+ {%- set conf_net_config = conf.idf.net_config -%}
+ {%- endif -%}
+ {%- if conf_net_config is defined -%}
+ {%- set net_admin = conf_net_config.admin.network -%}
+ {%- set net_mgmt = conf_net_config.mgmt.network -%}
+ {%- set net_private = conf_net_config.private.network -%}
+ {%- set net_public = conf_net_config.public.network -%}
+ {%- set vlan_mgmt = conf_net_config.mgmt.vlan -%}
+ {%- set vlan_private = conf_net_config.private.vlan -%}
+ {%- if conf_net_config.public.dns is defined -%}
+ {%- set dns_public = conf_net_config.public.dns -%}
{%- endif -%}
- {%- set pxe_interface = conf.net_config.admin.interface -%}
- {%- if conf.net_config.public.gateway is defined -%}
- {%- set net_public_gw = conf.net_config.public.gateway -%}
+ {%- set pxe_interface = conf_net_config.admin.interface -%}
+ {%- if conf_net_config.public.gateway is defined -%}
+ {%- set net_public_gw = conf_net_config.public.gateway -%}
{%- endif -%}
{%- else -%}
{%- set net_admin = '192.168.11.0' -%}