summaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster/mcp-odl-ha
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/reclass/classes/cluster/mcp-odl-ha')
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml2
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-ha/infra/maas.yml.j29
-rw-r--r--mcp/reclass/classes/cluster/mcp-odl-ha/openstack/compute_pdf.yml.j230
3 files changed, 9 insertions, 32 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml
index 58e4cd09c..f72993f89 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml
+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/config.yml
@@ -10,7 +10,6 @@ classes:
- system.reclass.storage.system.opendaylight_control_single
- cluster.mcp-common-ha.infra.config
- cluster.mcp-odl-ha.infra
- - cluster.all-mcp-arch-common.infra.config_pdf
parameters:
reclass:
storage:
@@ -21,3 +20,4 @@ parameters:
params:
linux_system_codename: xenial
single_address: ${_param:opendaylight_server_node01_single_address}
+ pxe_admin_address: ${_param:opnfv_opendaylight_server_node01_pxe_admin_address}
diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/maas.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/maas.yml.j2
index 30d712634..c06643089 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/maas.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/maas.yml.j2
@@ -5,17 +5,12 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-{%- set cluster_arch = [] %}
-{%- for node in conf.nodes %}
- {%- if node.node.arch not in cluster_arch %}
- {%- do cluster_arch.append(node.node.arch) %}
- {%- endif %}
-{%- endfor %}
+{%- import 'net_map.j2' as nm with context %}
---
classes:
- cluster.mcp-common-ha.infra.maas
- cluster.mcp-odl-ha.infra
-{%- if 'aarch64' not in cluster_arch %}
+{%- if 'aarch64' not in nm.cluster.arch %}
parameters:
_param:
hwe_kernel: 'ga-16.04'
diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/compute_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/compute_pdf.yml.j2
index 7cf4c8864..cc39db11a 100644
--- a/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/compute_pdf.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/openstack/compute_pdf.yml.j2
@@ -6,6 +6,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
{%- import 'net_map.j2' as nm with context %}
+{%- import 'net_macros.j2' as ma with context %}
{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
{%- set nics = { nm.cmp001.nic_private: True } %}
{%- set vlan_private_start = (nm.vlan_private | string).rsplit('-')[0] %}
@@ -15,35 +16,16 @@ parameters:
linux:
network:
interface:
-{%- for nic in nics %}
- {{ nic }}:
- enabled: true
- type: eth
- {%- if nic == nm.cmp001.nic_admin %}
- proto: dhcp
- {%- else %}
- proto: manual
- {%- endif %}
- name: {{ nic }}
-{%- endfor %}
-{%- for vlan in vlans %}
- {%- if vlan | int > 0 %}
- {{ vlans[vlan] }}.{{ vlan }}:
- enabled: true
- proto: manual
- type: vlan
- name: {{ vlans[vlan] }}.{{ vlan }}
- use_interfaces:
- - {{ vlans[vlan] }}
- {%- endif %}
-{%- endfor %}
+{{ ma.linux_network_interfaces_nic(nics) }}
+
+{{ ma.linux_network_interfaces_vlan(vlans) }}
br-mesh:
enabled: true
type: bridge
address: ${_param:tenant_address}
- netmask: 255.255.255.0
+ netmask: ${_param:opnfv_net_private_mask}
mtu: 1500
use_interfaces:
- - {{ nm.cmp001.nic_private }}{% if vlan_private_start | int > 0 %}.{{ vlan_private_start }}{% endif %}
+ - {{ ma.interface_str(nm.cmp001.nic_private, vlan_private_start) }}