diff options
Diffstat (limited to 'src/onapsdk/so/templates/instantiate_multi_vnf_service_macro.json.j2')
-rw-r--r-- | src/onapsdk/so/templates/instantiate_multi_vnf_service_macro.json.j2 | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/onapsdk/so/templates/instantiate_multi_vnf_service_macro.json.j2 b/src/onapsdk/so/templates/instantiate_multi_vnf_service_macro.json.j2 index d02c259..1b04ca9 100644 --- a/src/onapsdk/so/templates/instantiate_multi_vnf_service_macro.json.j2 +++ b/src/onapsdk/so/templates/instantiate_multi_vnf_service_macro.json.j2 @@ -5,13 +5,13 @@ {% endblock %} {% block pnfs %} - {% if so_service.pnfs %} + {%- if so_service.pnfs %} "pnfs": [ {% for pnf in so_service.pnfs %} { "modelInfo":{ {% for sdc_pnf in sdc_service.pnfs %} - {% if sdc_pnf.model_name == pnf.model_name %} + {%- if sdc_pnf.model_name == pnf.model_name %} "modelCustomizationName":"{{ sdc_pnf.model_name }}", "modelCustomizationId":"{{ sdc_pnf.model_customization_id }}", "modelInvariantId":"{{ sdc_pnf.unique_uuid }}", @@ -19,7 +19,7 @@ "modelName":"{{ sdc_pnf.name }}", "modelType":"pnf", "modelVersion":"{{ sdc_pnf.model_version }}" - {% endif %} + {%- endif %} {% endfor %} }, "platform":{ @@ -30,7 +30,7 @@ }, "productFamilyId":"{{ aai_service.service_id }}", "instanceParams":[], - {% if pnf.registration_parameters %} + {%- if pnf.registration_parameters %} "pnfRegistrationFields": { "modelNumber": "{{ pnf.registration_parameters.model_number }}", "oamV4IpAddress": "{{ pnf.registration_parameters.oam_v4_ip_address }}", @@ -40,32 +40,32 @@ "unitType": "{{ pnf.registration_parameters.unit_type }}", "vendorName": "{{ pnf.registration_parameters.vendor_name }}" }, - {% endif %} - {% if pnf.processing_priority %} + {%- endif %} + {%- if pnf.processing_priority %} "processingPriority": "{{ pnf.processing_priority }}", - {% endif %} + {%- endif %} "instanceName": "{{ pnf.instance_name }}" - }{% if not loop.last %},{% endif %} + }{%- if not loop.last %},{%- endif %} {% endfor %} - ]{% if so_service.vnfs %},{% endif %} - {% endif %} + ]{%- if so_service.vnfs %},{%- endif %} + {%- endif %} {% endblock %} {% block vnfs %} - {% if so_service.vnfs %} + {%- if so_service.vnfs %} "vnfs": [ {% for vnf in so_service.vnfs %} { "modelInfo": { {% for sdc_vnf in sdc_service.vnfs %} - {% if sdc_vnf.model_name == vnf.model_name %} + {%- if sdc_vnf.model_name == vnf.model_name %} "modelName": "{{ sdc_vnf.model_name }}", "modelVersionId": "{{ sdc_vnf.model_version_id }}", "modelInvariantUuid": "{{ sdc_vnf.model_invariant_id }}", "modelVersion": "{{ sdc_vnf.model_version }}", "modelCustomizationId": "{{ sdc_vnf.model_customization_id }}", "modelInstanceName": "{{ sdc_vnf.model_name }}" - {% endif %} + {%- endif %} {% endfor %} }, "cloudConfiguration": { @@ -84,49 +84,49 @@ "instanceParams": [ { {% for key, value in vnf.parameters.items() %} - "{{ key }}": "{{ value }}"{% if not loop.last %},{% endif %} + "{{ key }}": "{{ value }}"{%- if not loop.last %},{%- endif %} {% endfor %} } ], - {% if vnf.processing_priority %} + {%- if vnf.processing_priority %} "processingPriority": "{{ vnf.processing_priority }}", - {% endif %} + {%- endif %} "vfModules": [ {% for vf_module in vnf.vf_modules %} { "modelInfo": { {% for sdc_vnf in sdc_service.vnfs %} - {% if sdc_vnf.model_name == vnf.model_name %} + {%- if sdc_vnf.model_name == vnf.model_name %} {% for sdc_vf_module in sdc_vnf.vf_modules %} {% set mylist = sdc_vf_module.name.split('..') %} {% set item = mylist|length-2 %} - {% if vf_module.model_name == mylist[item] %} + {%- if vf_module.model_name == mylist[item] %} "modelName": "{{ sdc_vf_module.model_name }}", "modelVersionId": "{{ sdc_vf_module.model_version_id }}", "modelInvariantUuid": "{{ sdc_vf_module.model_invariant_uuid }}", "modelVersion": "{{ sdc_vf_module.model_version }}", "modelCustomizationId": "{{ sdc_vf_module.model_customization_id }}" - {% endif %} + {%- endif %} {% endfor %} - {% endif %} + {%- endif %} {% endfor %} }, "instanceName": "{{ vf_module.instance_name }}", - {% if vf_module.processing_priority %} + {%- if vf_module.processing_priority %} "processingPriority": "{{ vf_module.processing_priority }}", - {% endif %} + {%- endif %} "instanceParams": [ { {% for key, value in vf_module.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 %} ] - }{% if not loop.last %},{% endif %} + }{%- if not loop.last %},{%- endif %} {% endfor %} ] - {% endif %} + {%- endif %} {% endblock %} |