aboutsummaryrefslogtreecommitdiffstats
path: root/src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-02-29 10:14:22 +0100
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-02-29 16:18:36 +0100
commit04804c49eefd80efb0f31b27b56192ee4c77081b (patch)
tree7c756f99bcc99d99671a3b65e2b52d6e7b6bcf83 /src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2
parentd3591ef0893a8b718042b3a7937bb1f73d972176 (diff)
Avoid empty newlines in jina templates when if conditions evaluate to false
- avoid empty newlines for false if statements - this is useful for the logging of the rendered objects in tests Issue-ID: TEST-417 Change-Id: Iaeec217c87e73e316c4ef468007369facbf9a02f Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2')
-rw-r--r--src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j234
1 files changed, 17 insertions, 17 deletions
diff --git a/src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2 b/src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2
index 29e600c..116811a 100644
--- a/src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2
+++ b/src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2
@@ -45,55 +45,55 @@
"networkDetails": [
{
"networkType": "{{ network_details.network_type }}",
- "vnf-id": "{{ network_details.vnf_id }}"{% if network_details.child_resources %},{% endif %}
- {% if network_details.child_resources %}
+ "vnf-id": "{{ network_details.vnf_id }}"{%- if network_details.child_resources %},{%- endif %}
+ {%- if network_details.child_resources %}
"child-resources": [
{% for child_resource in network_details.child_resources %}
{
"{{ child_resource.network_details_element_type }}": {
{% for key, value in child_resource.network_details_element_parameters.items() %}
- "{{ key }}": "{{ value }}"{% if not loop.last %},{% endif %}{% if loop.last and child_resource.child_resources %},{% endif %}
+ "{{ key }}": "{{ value }}"{%- if not loop.last %},{%- endif %}{%- if loop.last and child_resource.child_resources %},{%- endif %}
{% endfor %}
- {% if child_resource.child_resources %}
+ {%- if child_resource.child_resources %}
"child-resources": [
{% for child_resource_child_resource in child_resource.child_resources %}
{
{% for key, value in child_resource_child_resource.network_details_element_parameters.items() %}
- "{{ key }}": "{{ value }}"{% if not loop.last %},{% endif %}
+ "{{ key }}": "{{ value }}"{%- if not loop.last %},{%- endif %}
{% endfor %}
- }{% if not loop.last %},{% endif %}
+ }{%- if not loop.last %},{%- endif %}
{% endfor %}
]
- {% endif %}
+ {%- endif %}
}
- }{% if not loop.last %},{% endif %}
+ }{%- if not loop.last %},{%- endif %}
{% endfor %}
],
- {% endif %}
- {% if network_details.related_to %}
+ {%- endif %}
+ {%- if network_details.related_to %}
"related-to": [
{% for related_to in network_details.related_to %}
{
"{{ related_to.network_details_element_type }}": {
{% for key, value in related_to.network_details_element_parameters.items() %}
- "{{ key }}": "{{ value }}"{% if not loop.last %},{% endif %}{% if loop.last and related_to.child_resources %},{% endif %}
+ "{{ key }}": "{{ value }}"{%- if not loop.last %},{%- endif %}{%- if loop.last and related_to.child_resources %},{%- endif %}
{% endfor %}
- {% if related_to.child_resources %}
+ {%- if related_to.child_resources %}
"child-resources": [
{% for related_to_child_resource in related_to.child_resources %}
{
{% for key, value in related_to_child_resource.network_details_element_parameters.items() %}
- "{{ key }}": "{{ value }}"{% if not loop.last %},{% endif %}
+ "{{ key }}": "{{ value }}"{%- if not loop.last %},{%- endif %}
{% endfor %}
- }{% if not loop.last %},{% endif %}
+ }{%- if not loop.last %},{%- endif %}
{% endfor %}
]
- {% endif %}
+ {%- endif %}
}
- }{% if not loop.last %},{% endif %}
+ }{%- if not loop.last %},{%- endif %}
{% endfor %}
]
- {% endif %}
+ {%- endif %}
}
],
"instanceParams": []