From e4f0ae735120b62f2db476b749a81fab5bab9242 Mon Sep 17 00:00:00 2001 From: Delia Popescu Date: Thu, 15 Feb 2018 18:06:08 +0200 Subject: Fix check if node type is baremetal for novcp Fixes: 86c8109 Change-Id: I0a947bd7db5dd7cb830cc932f5a0d16831551923 Signed-off-by: Delia Popescu Signed-off-by: Alexandru Avadanii --- mcp/config/scenario/os-nosdn-nofeature-novcp-ha.yaml.j2 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mcp') diff --git a/mcp/config/scenario/os-nosdn-nofeature-novcp-ha.yaml.j2 b/mcp/config/scenario/os-nosdn-nofeature-novcp-ha.yaml.j2 index 58f418622..2dfea5f60 100644 --- a/mcp/config/scenario/os-nosdn-nofeature-novcp-ha.yaml.j2 +++ b/mcp/config/scenario/os-nosdn-nofeature-novcp-ha.yaml.j2 @@ -6,16 +6,17 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## {%- import 'net_map.j2' as nm with context %} +{%- set cluster = {'has_virtual_nodes': False} %} {%- for node in conf.nodes %} - {%- if node.node.type == 'baremetal' %} - {%- set cluster_has_baremetal_nodes = True %} + {%- if not cluster.has_virtual_nodes and node.node.type == 'baremetal' %} + {%- set _ = cluster.update({'has_baremetal_nodes': True}) %} {%- endif %} {%- endfor %} --- cluster: domain: mcp-pike-ovs-novcp-ha.local states: -{%- if cluster_has_baremetal_nodes %} +{%- if cluster.has_baremetal_nodes %} - maas - baremetal_init {%- endif %} @@ -24,7 +25,7 @@ cluster: virtual: nodes: - cfg01 -{%- if cluster_has_baremetal_nodes %} +{%- if cluster.has_baremetal_nodes %} - mas01 {%- endif %} {#- Most likely, controllers will always have the same type and number (3) #} -- cgit 1.2.3-korg