|
{% for elem in vm|list %}
{% if elem|list == [] and ('configurable' not in elem.attrib or elem.attrib['configurable'] !=
'0') %}
{% elif elem|list != [] %}
{% if 'multiselect' not in elem.attrib or elem.attrib['multiselect'] != 'true' %}
{% set first_multi_child = {'block': 0, 'network': 0, 'input': 0, 'pcpu_id': 0, 'shm_region': 0,
'passthrough_devices': 0, 'virtio_devices': 0, 'communication_vuart': 0} %}
{% for sub_elem in elem|list %}
{% set sub_elem_text = '' if sub_elem.text == None else sub_elem.text %}
{% if 'configurable' not in sub_elem.attrib or sub_elem.attrib['configurable'] != '0' %}
{% if 'id' not in elem.attrib %}
{% if elem.tag in first_multi_child.keys() and first_multi_child[elem.tag] == 0 %}
{% do first_multi_child.update({elem.tag: first_multi_child[elem.tag]+1}) %}
{% elif sub_elem.tag in ['pcpu_id', 'shm_region', 'communication_vuart'] and first_multi_child[sub_elem.tag] == 0 %}
{% else %}
{% endif %}
{% if ','.join(['uos', elem.tag, sub_elem.tag]) not in launch_item_values
and elem.tag not in ['cpu_affinity', 'shm_regions', 'communication_vuarts']%}
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
{% else %}
{% endif %}
{% if elem.tag in ['virtio_devices'] and sub_elem.tag in ['block', 'network', 'input'] %}
{% if first_multi_child[sub_elem.tag] == 0 %}
{% else %}
{% endif %}
{% do first_multi_child.update({sub_elem.tag: first_multi_child[sub_elem.tag]+1}) %}
{% endif%}
{% else %}
{% if elem.tag == 'cpu_affinity' %}
{% set item_key = ','.join(['uos', elem.tag]) %}
{% elif elem.tag in ['shm_regions', 'communication_vuarts'] %}
{% set item_key = ','.join(['uos:id='+vm.attrib['id'], elem.tag, sub_elem.tag]) %}
{% else %}
{% set item_key = ','.join(['uos', elem.tag, sub_elem.tag]) %}
{% endif %}
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
{% endif %}
{% else %}
{% if elem.tag in first_multi_child.keys() and first_multi_child[elem.tag] == 0 %}
{% do first_multi_child.update({elem.tag: first_multi_child[elem.tag]+1}) %}
{% else %}
{% endif %}
{% if ','.join(['uos', elem.tag, sub_elem.tag]) not in launch_item_values %}
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
{% else %}
{% endif %}
{% else %}
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
{% else %}
{% endif %}
{% for item_value in launch_item_values[','.join(['uos', elem.tag, sub_elem.tag])] %}
{% if item_value == sub_elem_text %}
{% else %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% elif 'configurable' not in elem.attrib or elem.attrib['configurable'] != '0' %}
{% endif %}
{% endif %}
{% endfor %}
|
{% endfor %}