diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-02-29 10:14:22 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-02-29 16:18:36 +0100 |
commit | 04804c49eefd80efb0f31b27b56192ee4c77081b (patch) | |
tree | 7c756f99bcc99d99671a3b65e2b52d6e7b6bcf83 /src/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2 | |
parent | d3591ef0893a8b718042b3a7937bb1f73d972176 (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_pnf_macro_so_pnf.json.j2')
-rwxr-xr-x | src/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2 b/src/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2 index 27b9041..a1e6af8 100755 --- a/src/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2 +++ b/src/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2 @@ -54,7 +54,7 @@ "lineOfBusiness": {
"lineOfBusinessName": "{{ line_of_business }}"
},
- {% if so_pnf.registration_parameters %}
+ {%- if so_pnf.registration_parameters %}
"pnfRegistrationFields": {
"modelNumber": "{{ so_pnf.registration_parameters.model_number }}",
"oamV4IpAddress": "{{ so_pnf.registration_parameters.oam_v4_ip_address }}",
@@ -64,13 +64,13 @@ "unitType": "{{ so_pnf.registration_parameters.unit_type }}",
"vendorName": "{{ so_pnf.registration_parameters.vendor_name }}"
},
- {% endif %}
+ {%- endif %}
"productFamilyId": "1234",
"instanceName": "{{ instance_name }}",
"instanceParams": [
{
{% for key, value in so_pnf.parameters.items() %}
- "{{ key }}": "{{ value }}"{% if not loop.last %},{% endif %}
+ "{{ key }}": "{{ value }}"{%- if not loop.last %},{%- endif %}
{% endfor %}
}
]
|