diff options
author | Delia Popescu <delia.popescu@enea.com> | 2018-02-15 18:06:08 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-02-15 17:59:53 +0100 |
commit | e4f0ae735120b62f2db476b749a81fab5bab9242 (patch) | |
tree | cabb47dabf7b80f5f2be6671d6abfd36a4c85cc9 /mcp | |
parent | 84383fb622dd1426af84fb9e061338a9a1098202 (diff) |
Fix check if node type is baremetal for novcp
Fixes: 86c8109
Change-Id: I0a947bd7db5dd7cb830cc932f5a0d16831551923
Signed-off-by: Delia Popescu <delia.popescu@enea.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp')
-rw-r--r-- | mcp/config/scenario/os-nosdn-nofeature-novcp-ha.yaml.j2 | 9 |
1 files changed, 5 insertions, 4 deletions
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) #} |