From: Alexandru Avadanii Date: Mon, 18 Feb 2019 14:38:07 +0000 (+0100) Subject: [fuel] Skip baremetal cmp cfg if scenario lacks it X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F67061%2F1;p=pharos.git [fuel] Skip baremetal cmp cfg if scenario lacks it Some upcoming scenarios do not define any compute nodes, so skip adding the nodes to MaaS machine list too. Change-Id: I895d8c7cb54783a57667d20f672b8ff870105cfc Signed-off-by: Alexandru Avadanii --- diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2 index edb63eec..7f53b59c 100644 --- a/config/installers/fuel/pod_config.yml.j2 +++ b/config/installers/fuel/pod_config.yml.j2 @@ -13,9 +13,10 @@ parameters: region: machines: {%- set ctl_roles = 3 if 'virtual' not in conf else conf.virtual.nodes.control | length %} + {%- set has_cmp = True if 'virtual' not in conf else 'compute' in conf.virtual.nodes %} {%- for node in conf.nodes %} {%- if (node.node.type == 'baremetal' and ( - loop.index > nm.cmp001.idx or loop.index0 < ctl_roles)) %} + (has_cmp 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) }}: {%- elif 'virtual' not in conf %} {#- strictly for Pharos verify job #}