2b48647ad9044ad1615fdf31168099b35042f77b
[optf/osdf.git] / osdf / templates / conductor_interface.json
1 {\r
2   "name": "{{ name }}",\r
3   "files": {},\r
4   "timeout": {{ timeout }},\r
5   "limit": {{ limit }},\r
6   "template": {\r
7     "conductor_template_version": "2018-02-01",\r
8     "parameters": {\r
9             "REQUEST_TYPE": "{{ requestType }}",\r
10         "CHOSEN_REGION": "{{ chosenRegion }}",\r
11         "LATITUDE": "{{ latitude }}",\r
12         "LONGITUDE": "{{ longitude }}",\r
13         {% if serviceType == 'DHV' %}\r
14         "E2EVPNKEY": "{{ e2eVpnKey }}",\r
15         "UCPEHOST": "{{ ucpeHostName }}",\r
16         "EFFECTIVE_BANDWIDTH": "{{ effectiveBandwidth }}",\r
17         "WAN_PORT1_UP": "{{ ipsec_bw_up }}",\r
18         "WAN_PORT1_DOWN": "{{ ipsec_bw_down }}",\r
19         "WAN_PORT2_UP": "{{ ipsec2_bw_up }}",\r
20         "WAN_PORT2_DOWN": "{{ ipsec2_bw_down }}",\r
21         {% endif %}\r
22         {% if serviceType != 'DHV' %}\r
23         "GW_TENANT_ID": "{{ gwTenantId }}",\r
24         "PORTAL_TENANT_ID": "{{ portalTenantId }}",\r
25         {% endif %}\r
26         "CHOSEN_COMPLEX": "{{ chosenComplex }}",\r
27         {% if serviceType == 'ADIOD' or serviceType == 'VPE' %}\r
28         "BANDWIDTH": "{{ bandwidth }}",\r
29         "UNIT": "{{ bandwidth_unit }}",\r
30         {% endif %}\r
31         "SERVICE_INST": "{{ serviceInstance }}",\r
32         "PROV_STATUS": {{ json.dumps(provStatus) }}\r
33     },\r
34     "locations": {\r
35         {% if serviceType == 'DHV' %}\r
36         "customer_loc": {\r
37             "host_name": { "get_param": "UCPEHOST" }\r
38         }\r
39         {% elif serviceType == 'ADIOD' %}\r
40         "customer_pref_location": {\r
41             "clli_code": { "get_param": "CHOSEN_COMPLEX" }\r
42         }\r
43         {% elif serviceType == 'NETBOND' %}\r
44         "peering_point": {\r
45             "latitude": { "get_param": "LATITUDE" },\r
46             "longitude": { "get_param": "LONGITUDE" }\r
47         }\r
48         {% else %}\r
49         "customer_pref_loc": {\r
50             "clli_code": { "get_param": "CHOSEN_COMPLEX" }\r
51         }\r
52         {% endif %}\r
53     },\r
54     "demands": {{ json.dumps(demand_list) }},\r
55     {% set comma_main = joiner(",") %}\r
56     "constraints": {\r
57       {% set comma=joiner(",") %}\r
58       {% for elem in policy_groups %} {{ comma() }}\r
59         {% for key, value in elem.items() %}\r
60           "{{key}}": {{ json.dumps(value) }}\r
61         {% endfor %}\r
62       {% endfor %}\r
63     },\r
64     "reservation": {\r
65       {% set comma=joiner(",") %}\r
66       {% for elem in reservation_groups %} {{ comma() }}\r
67         {% for key, value in elem.items() %}\r
68           "{{key}}": {{ json.dumps(value) }}\r
69         {% endfor %}\r
70       {% endfor %}\r
71     },\r
72     "optimization": {\r
73       {% set comma=joiner(",") %}\r
74       {% for elem in optimization_policies %} {{ comma() }}\r
75         {% for key, value in elem.items() %}\r
76           "{{key}}": {{ json.dumps(value) }}\r
77         {% endfor %}\r
78       {% endfor %}\r
79     }\r
80   }\r
81 }