summaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster/all-mcp-arch-common
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-08 13:22:12 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-08-08 13:22:12 +0000
commitab9ccfdc387c02a42c89e8770c26634f3e6c5ceb (patch)
tree2480f2027c6d683d9db00ff0ec7f2831454b43e7 /mcp/reclass/classes/cluster/all-mcp-arch-common
parentce2d5fc4b6b4cda93f858adc5ac6ab991495e8a9 (diff)
parent22addd70d9e7a8227061052a57a802f89728ffa0 (diff)
Merge "[maas] Adopt node role from scenario definitions"
Diffstat (limited to 'mcp/reclass/classes/cluster/all-mcp-arch-common')
-rw-r--r--mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j26
1 files changed, 4 insertions, 2 deletions
diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
index d980c29d4..4e9323b68 100644
--- a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
+++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
@@ -108,12 +108,14 @@ parameters:
{%- endif %}
machines:
{%- set pxe_interface = conf.idf.net_config.admin.interface %}
+ {%- set ctl_roles = conf.virtual.nodes.control | length %}
{%- for node in conf.nodes %}
- {%- if node.node.type == 'baremetal' %}
+ {%- if (node.node.type == 'baremetal' and (
+ loop.index > nm.cmp001.idx or loop.index0 < ctl_roles)) %}
{%- if loop.index > nm.cmp001.idx %}
cmp{{ '%03d' | format(loop.index - nm.cmp001.idx) }}:
{%- else %}
- kvm{{ '%02d' | format(loop.index) }}:
+ {{ conf.virtual.nodes.control[loop.index0] }}:
{%- endif %}
interface:
mac: {{ node.interfaces[pxe_interface].mac_address }}