diff options
Diffstat (limited to 'mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2')
-rw-r--r-- | mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2 | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2 index 00f24087e..9f05790c9 100644 --- a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2 +++ b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_init.yml.j2 @@ -5,6 +5,7 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +{%- import 'net_map.j2' as nm with context %} --- parameters: _param: @@ -63,19 +64,6 @@ parameters: openstack_telemetry_node03_address: ${_param:openstack_control_node03_address} {%- endif %} - # OpenStack Compute - openstack_compute_node01_single_address: ${_param:opnfv_openstack_compute_node01_single_address} - openstack_compute_node02_single_address: ${_param:opnfv_openstack_compute_node02_single_address} - openstack_compute_node03_single_address: ${_param:opnfv_openstack_compute_node03_single_address} - openstack_compute_node01_control_address: ${_param:opnfv_openstack_compute_node01_control_address} - openstack_compute_node02_control_address: ${_param:opnfv_openstack_compute_node02_control_address} - openstack_compute_node03_control_address: ${_param:opnfv_openstack_compute_node03_control_address} - openstack_compute_node01_tenant_address: ${_param:opnfv_openstack_compute_node01_tenant_address} - openstack_compute_node02_tenant_address: ${_param:opnfv_openstack_compute_node02_tenant_address} - openstack_compute_node03_tenant_address: ${_param:opnfv_openstack_compute_node03_tenant_address} - openstack_compute_node01_external_address: ${_param:opnfv_openstack_compute_node01_external_address} - openstack_compute_node02_external_address: ${_param:opnfv_openstack_compute_node02_external_address} - # openstack service hostnames {%- if conf.MCP_VCP %} openstack_proxy_hostname: prx @@ -387,13 +375,13 @@ parameters: - ${_param:openstack_control_node03_hostname} - ${_param:openstack_control_node03_hostname}.${_param:cluster_domain} {%- endif %} - cmp001: - address: ${_param:openstack_compute_node01_control_address} - names: - - ${_param:openstack_compute_node01_hostname} - - ${_param:openstack_compute_node01_hostname}.${_param:cluster_domain} - cmp002: - address: ${_param:openstack_compute_node02_control_address} +{#- For compute nodes, expand values in-place, bypassing reclass param expansion #} +{%- for cmp in range(1, nm.cmp_nodes + 1) %} + {%- set h = 'cmp%03d' | format(cmp) %} + {%- set mgmt = nm.net_mgmt_hosts | length + nm.start_ip[nm.net_mgmt] + loop.index %} + {{ h }}: + address: {{ nm.net_mgmt | ipnet_hostaddr(mgmt) }} names: - - ${_param:openstack_compute_node02_hostname} - - ${_param:openstack_compute_node02_hostname}.${_param:cluster_domain} + - {{ h }} + - {{ h }}.${_param:cluster_domain} +{%- endfor %} |