aboutsummaryrefslogtreecommitdiffstats
path: root/src/onapsdk/so/templates/instantiate_network_vnf_macro_base.json.j2
blob: 116811abd62191e1b4ee4a5a97e7b5f2ea0631f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
    "requestDetails": {
        "requestInfo": {
            "instanceName": "{{ instance_name }}",
            "source": "VID",
            "suppressRollback": false,
            "requestorId": "test",
            "productFamilyId": "{{ service_instance.model_invariant_id }}"
        },
        "modelInfo": {
            "modelType": "network",
            "modelInvariantId": "{{ network.model_invariant_id }}",
            "modelVersionId": "{{ network.model_version_id }}",
            "modelName": "{{ network.model_name }}",
            "modelVersion": "{{ network.model_version }}",
            "modelCustomizationId": "{{ network.model_customization_id }}",
            "modelCustomizationName": "{{ network.name }}"
        },
        "requestParameters": {
            "userParams": [
                {
                    "Homing_Solution": "none"
                },
                {
                    "service": {
                        "resources": {
                            "networks": [
                                {
                                    "modelInfo": {
                                            "modelType": "network",
                                            "modelInvariantId": "{{ network.model_invariant_id }}",
                                            "modelVersionId": "{{ network.model_version_id }}",
                                            "modelName": "{{ network.model_name }}",
                                            "modelVersion": "{{ network.model_version }}",
                                            "modelCustomizationId": "{{ network.model_customization_id }}",
                                            "modelCustomizationName": "{{ network.name }}"
                                    },
                                    "cloudConfiguration": {
                                         "tenantId": "{{ tenant.tenant_id }}",
                                         "cloudOwner": "{{ cloud_region.cloud_owner }}",
                                         "lcpCloudRegionId": "{{ cloud_region.cloud_region_id }}"
                                    },
                                    "productFamilyId": "network-test",
                                    "instanceName": "network1",
                                    "networkDetails": [
                                        {
                                            "networkType": "{{ network_details.network_type }}",
                                            "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 %}
                                                        {% endfor %}
                                                        {%- 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 %}
                                                                {% endfor %}
                                                                }{%- if not loop.last %},{%- endif %}
                                                            {% endfor %}
                                                        ]
                                                        {%- endif %}
                                                    }
                                                }{%- if not loop.last %},{%- endif %}
                                                {% endfor %}
                                            ],
                                            {%- 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 %}
                                                        {% endfor %}
                                                        {%- 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 %}
                                                                {% endfor %}
                                                                }{%- if not loop.last %},{%- endif %}
                                                            {% endfor %}
                                                        ]
                                                        {%- endif %}
                                                    }
                                                }{%- if not loop.last %},{%- endif %}
                                                {% endfor %}
                                            ]
                                            {%- endif %}
                                        }
                                    ],
                                    "instanceParams": []
                                }
                            ]
                        },
                        "modelInfo": {
                            "modelType": "network",
                            "modelInvariantId": "{{ network.model_invariant_id }}",
                            "modelVersionId": "{{ network.model_version_id }}",
                            "modelName": "{{ network.model_name }}",
                            "modelVersion": "{{ network.model_version }}",
                            "modelCustomizationId": "{{ network.model_customization_id }}",
                            "modelCustomizationName": "{{ network.name }}"
                        },
                        "instanceParams": []
                    }
                }
            ],
            "aLaCarte": false,
            "testApi": "GR_API"
        },
        "cloudConfiguration": {
            "tenantId": "{{ tenant.tenant_id }}",
            "cloudOwner": "{{ cloud_region.cloud_owner }}",
            "lcpCloudRegionId": "{{ cloud_region.cloud_region_id }}"
        },
        "lineOfBusiness": {
            "lineOfBusinessName": "{{ line_of_business }}"
        },
        "platform": {
            "platformName": "{{ platform }}"
        },
        "relatedInstanceList": [{
            "relatedInstance": {
                "instanceId": "{{ service_instance.instance_id }}",
                "modelInfo": {
                    "modelType": "service",
                    "modelName": "{{ service.name }}",
                    "modelInvariantId": "{{ service.unique_uuid }}",
                    "modelVersion": "1.0",
                    "modelVersionId": "{{ service.identifier }}"
                }
            }
        }]
    },
    "serviceInstanceId" : "{{ service_instance.instance_id }}"
}