aboutsummaryrefslogtreecommitdiffstats
path: root/src/onapsdk/so/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/onapsdk/so/templates')
-rwxr-xr-xsrc/onapsdk/so/templates/instantiate_pnf_macro.json.j2121
-rwxr-xr-xsrc/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2117
2 files changed, 238 insertions, 0 deletions
diff --git a/src/onapsdk/so/templates/instantiate_pnf_macro.json.j2 b/src/onapsdk/so/templates/instantiate_pnf_macro.json.j2
new file mode 100755
index 0000000..6abfe84
--- /dev/null
+++ b/src/onapsdk/so/templates/instantiate_pnf_macro.json.j2
@@ -0,0 +1,121 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "instanceName": "{{ service_instance.instance_name }}",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "demo",
+ "productFamilyId": "1234"
+ },
+ "modelInfo": {
+ "modelType": "pnf",
+ "modelInvariantId": "{{ pnf.model_invariant_id }}",
+ "modelVersionId": "{{ pnf.model_version_id }}",
+ "modelName": "{{ pnf.model_name }}",
+ "modelVersion": "{{ pnf.model_version }}",
+ "modelCustomizationId": "{{ pnf.model_customization_id }}",
+ "modelInstanceName": "{{ pnf.name }}"
+ },
+ "cloudConfiguration": {
+ "tenantId": "{{ tenant.tenant_id }}",
+ "cloudOwner": "{{ cloud_region.cloud_owner }}",
+ "lcpCloudRegionId": "{{ cloud_region.cloud_region_id }}"
+ },
+ "platform": {
+ "platformName": "{{ platform }}"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "{{ line_of_business }}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{{ service_instance.service_subscription.customer.global_customer_id }}"
+ },
+ "requestParameters": {
+ {% block subscriptionServiceType %}
+ "subscriptionServiceType": "{{ service.name }}",
+ {% endblock %}
+ "userParams": [
+ {
+ "Homing_Solution": "none"
+ },
+ {
+ "service": {
+ "instanceParams": [],
+ "resources": {
+ {% block pnfs %}
+ "pnfs": [
+ {
+ "modelInfo": {
+ "modelName": "{{ pnf.model_name }}",
+ "modelVersionId": "{{ pnf.model_version_id }}",
+ "modelInvariantUuid": "{{ pnf.model_invariant_id }}",
+ "modelVersion": "{{ pnf.model_version }}",
+ "modelCustomizationId": "{{ pnf.model_customization_id }}",
+ "modelInstanceName": "{{ pnf.name }}"
+ },
+ "cloudConfiguration": {
+ "tenantId": "{{ tenant.tenant_id }}",
+ "cloudOwner": "{{ cloud_region.cloud_owner }}",
+ "lcpCloudRegionId": "{{ cloud_region.cloud_region_id }}"
+ },
+ "platform": {
+ "platformName": "{{ platform }}"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "{{ line_of_business }}"
+ },
+ "productFamilyId": "1234",
+ "instanceName": "{{ instance_name }}",
+ "instanceParams": [
+ {
+ {% for pnf_parameter in pnf_parameters %}
+ {% if pnf_parameter.name == pnf.model_name %}
+ {% for parameter in pnf_parameter.pnf_parameters %}
+ "{{ parameter.name }}": "{{ parameter.value }}"{% if not loop.last %},{% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+ }
+ ],
+ }
+ ]
+ {% endblock %}
+ },
+ "modelInfo": {
+ "modelType": "pnf",
+ "modelInvariantId": "{{ pnf.model_invariant_id }}",
+ "modelVersionId": "{{ pnf.model_version_id }}",
+ "modelName": "{{ pnf.model_name }}",
+ "modelVersion": "{{ pnf.model_version }}",
+ "modelCustomizationId": "{{ pnf.model_customization_id }}",
+ "modelCustomizationName": "{{ pnf.name }}"
+ }
+ }
+ }
+ ],
+ "aLaCarte": false
+ },
+ "project": {
+ "projectName": "{{ project }}"
+ },
+ "owningEntity": {
+ "owningEntityId": "{{ owning_entity.owning_entity_id }}",
+ "owningEntityName": "{{ owning_entity.name }}"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{{ service_instance.instance_id }}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "{{ service.unique_uuid }}",
+ "modelVersionId": "{{ service.identifier }}",
+ "modelName": "{{ service.name }}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ]
+ },
+ "serviceInstanceId": "{{ service_instance.instance_id }}"
+}
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
new file mode 100755
index 0000000..a6571bd
--- /dev/null
+++ b/src/onapsdk/so/templates/instantiate_pnf_macro_so_pnf.json.j2
@@ -0,0 +1,117 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "instanceName": "{{ service_instance.instance_name }}",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "demo",
+ "productFamilyId": "1234"
+ },
+ "modelInfo": {
+ "modelType": "pnf",
+ "modelInvariantId": "{{ pnf.model_invariant_id }}",
+ "modelVersionId": "{{ pnf.model_version_id }}",
+ "modelName": "{{ pnf.model_name }}",
+ "modelVersion": "{{ pnf.model_version }}",
+ "modelCustomizationId": "{{ pnf.model_customization_id }}",
+ "modelInstanceName": "{{ pnf.name }}"
+ },
+ "cloudConfiguration": {
+ "tenantId": "{{ tenant.tenant_id }}",
+ "cloudOwner": "{{ cloud_region.cloud_owner }}",
+ "lcpCloudRegionId": "{{ cloud_region.cloud_region_id }}"
+ },
+ "platform": {
+ "platformName": "{{ platform }}"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "{{ line_of_business }}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{{ service_instance.service_subscription.customer.global_customer_id }}"
+ },
+ "requestParameters": {
+ {% block subscriptionServiceType %}
+ "subscriptionServiceType": "{{ service.name }}",
+ {% endblock %}
+ "userParams": [
+ {
+ "Homing_Solution": "none"
+ },
+ {
+ "service": {
+ "instanceParams": [],
+ "resources": {
+ {% block pnfs %}
+ "pnfs": [
+ {
+ "modelInfo": {
+ "modelName": "{{ pnf.model_name }}",
+ "modelVersionId": "{{ pnf.model_version_id }}",
+ "modelInvariantUuid": "{{ pnf.model_invariant_id }}",
+ "modelVersion": "{{ pnf.model_version }}",
+ "modelCustomizationId": "{{ pnf.model_customization_id }}",
+ "modelInstanceName": "{{ pnf.name }}"
+ },
+ "cloudConfiguration": {
+ "tenantId": "{{ tenant.tenant_id }}",
+ "cloudOwner": "{{ cloud_region.cloud_owner }}",
+ "lcpCloudRegionId": "{{ cloud_region.cloud_region_id }}"
+ },
+ "platform": {
+ "platformName": "{{ platform }}"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "{{ line_of_business }}"
+ },
+ "productFamilyId": "1234",
+ "instanceName": "{{ instance_name }}",
+ "instanceParams": [
+ {
+ {% for key, value in so_pnf.parameters.items() %}
+ "{{ key }}": "{{ value }}"{% if not loop.last %},{% endif %}
+ {% endfor %}
+ }
+ ],
+ }
+ ]
+ {% endblock %}
+ },
+ "modelInfo": {
+ "modelType": "pnf",
+ "modelInvariantId": "{{ pnf.model_invariant_id }}",
+ "modelVersionId": "{{ pnf.model_version_id }}",
+ "modelName": "{{ pnf.model_name }}",
+ "modelVersion": "{{ pnf.model_version }}",
+ "modelCustomizationId": "{{ pnf.model_customization_id }}",
+ "modelCustomizationName": "{{ pnf.name }}"
+ }
+ }
+ }
+ ],
+ "aLaCarte": false
+ },
+ "project": {
+ "projectName": "{{ project }}"
+ },
+ "owningEntity": {
+ "owningEntityId": "{{ owning_entity.owning_entity_id }}",
+ "owningEntityName": "{{ owning_entity.name }}"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "{{ service_instance.instance_id }}",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "{{ service.unique_uuid }}",
+ "modelVersionId": "{{ service.identifier }}",
+ "modelName": "{{ service.name }}",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ]
+ },
+ "serviceInstanceId": "{{ service_instance.instance_id }}"
+}