diff options
Diffstat (limited to 'mcp/scripts/xdf_data.sh.j2')
-rw-r--r-- | mcp/scripts/xdf_data.sh.j2 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mcp/scripts/xdf_data.sh.j2 b/mcp/scripts/xdf_data.sh.j2 index c0629fec4..ee5fffab7 100644 --- a/mcp/scripts/xdf_data.sh.j2 +++ b/mcp/scripts/xdf_data.sh.j2 @@ -14,6 +14,7 @@ {%- import 'net_map.j2' as nm with context -%} {%- set arch = conf[conf.MCP_JUMP_ARCH] -%} {%- set V = conf.virtual -%} +{%- do V.nodes.update(arch.default.virtual.nodes) -%} {%- set section_map = { 'infra': -1, 'control': nm.ctl01.idx, @@ -33,7 +34,7 @@ {%- macro serialize_vnodes() -%} {%- set arr = [] -%} {%- for section in section_map -%} - {%- for n in V.nodes[section] -%} + {%- for n in V.nodes[section] or [] -%} {%- if section_map[section] < 0 or conf.nodes[section_map[section] + loop.index0].node.type == 'virtual' -%} {%- if n not in V -%}{%- do V.update({n: {}}) -%}{%- endif -%} {%- do arr.append(pack([n, V[n].ram or arch.default.ram, @@ -48,7 +49,7 @@ {%- macro filter_nodes(type, output_as_query = False, sections = section_map) -%} {%- set arr = [] -%} {%- for section in sections -%} - {%- for n in V.nodes[section] -%} + {%- for n in V.nodes[section] or [] -%} {%- if ( (section_map[section] < 0 and type == 'virtual') or (section_map[section] >= 0 and conf.nodes[section_map[section] + loop.index0].node.type in type) ) -%} @@ -87,7 +88,7 @@ OPNFV_BRIDGES=( ) export CLUSTER_DOMAIN={{ conf.cluster.domain }} -cluster_states={{ bash_arr(conf.cluster.states) }} +cluster_states={{ bash_arr(arch.default.cluster.states + conf.cluster.states) }} virtual_nodes={{ filter_nodes('virtual') }} control_nodes_query={{ filter_nodes(['baremetal', 'virtual'], True, ['control']) }} base_image={{ arch.base_image }} |