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
|
{
"name": "{{ name }}",
"files": {},
"timeout": {{ timeout }},
"limit": {{ limit }},
"template": {
"conductor_template_version": "2018-02-01",
"parameters": {
"REQUEST_TYPE": "{{ requestType }}",
"CHOSEN_REGION": "{{ chosenRegion }}",
"LATITUDE": "{{ latitude }}",
"LONGITUDE": "{{ longitude }}",
{% if serviceType == 'DHV' %}
"E2EVPNKEY": "{{ e2eVpnKey }}",
"UCPEHOST": "{{ ucpeHostName }}",
"EFFECTIVE_BANDWIDTH": "{{ effectiveBandwidth }}",
"WAN_PORT1_UP": "{{ ipsec_bw_up }}",
"WAN_PORT1_DOWN": "{{ ipsec_bw_down }}",
"WAN_PORT2_UP": "{{ ipsec2_bw_up }}",
"WAN_PORT2_DOWN": "{{ ipsec2_bw_down }}",
{% endif %}
{% if serviceType != 'DHV' %}
"GW_TENANT_ID": "{{ gwTenantId }}",
"PORTAL_TENANT_ID": "{{ portalTenantId }}",
{% endif %}
"CHOSEN_COMPLEX": "{{ chosenComplex }}",
{% if serviceType == 'ADIOD' or serviceType == 'VPE' %}
"BANDWIDTH": "{{ bandwidth }}",
"UNIT": "{{ bandwidth_unit }}",
{% endif %}
"SERVICE_INST": "{{ serviceInstance }}",
"PROV_STATUS": {{ json.dumps(provStatus) }}
},
"locations": {
{% if serviceType == 'DHV' %}
"customer_loc": {
"host_name": { "get_param": "UCPEHOST" }
}
{% elif serviceType == 'ADIOD' %}
"customer_pref_location": {
"clli_code": { "get_param": "CHOSEN_COMPLEX" }
}
{% elif serviceType == 'NETBOND' %}
"peering_point": {
"latitude": { "get_param": "LATITUDE" },
"longitude": { "get_param": "LONGITUDE" }
}
{% else %}
"customer_pref_loc": {
"clli_code": { "get_param": "CHOSEN_COMPLEX" }
}
{% endif %}
},
"demands": {{ json.dumps(demand_list) }},
{% set comma_main = joiner(",") %}
"constraints": {
{% set comma=joiner(",") %}
{% for elem in policy_groups %} {{ comma() }}
{% for key, value in elem.items() %}
"{{key}}": {{ json.dumps(value) }}
{% endfor %}
{% endfor %}
},
"reservation": {
{% set comma=joiner(",") %}
{% for elem in reservation_groups %} {{ comma() }}
{% for key, value in elem.items() %}
"{{key}}": {{ json.dumps(value) }}
{% endfor %}
{% endfor %}
},
"optimization": {
{% set comma=joiner(",") %}
{% for elem in optimization_policies %} {{ comma() }}
{% for key, value in elem.items() %}
"{{key}}": {{ json.dumps(value) }}
{% endfor %}
{% endfor %}
}
}
}
|