blob: e24a9ef3bc87fc35c2cf546973bb66a047a13b70 (
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
|
<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='network-topology-operation-create' mode='sync'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='validate-network-input-parameters' mode='sync' >
</call><get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="esr-thirdparty-sdnc"
key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $tmp.thirdparty-sdnc-id AND
depth = '1'"
pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
<outcome value='success'>
<block atomic="true"></block></outcome><outcome value='not-found'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Network model is_bound_to_vpn=true but no vpn_binding is present" />
</return></outcome><outcome value='Other'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Unexpected error retrieving vpn binding" />
</return></outcome></get-resource><set>
<parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.serviceUrl`" />
<parameter name='prop.sdncRestApi.templateDir' value='/opt/onap/sdnc/data' />
<parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.user-name`" />
<parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list[0].esr-system-info.password`" />
</set><for index='idx' start='0' end='`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`' >
<block>
<switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'name'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'service-type'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.service-type' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'topology'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.topology' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'technology'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.technology' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site1_name'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.site1_name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'site2_name'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.site2_name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'sna1_name'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.sna1_name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'sna2_name'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.sna2_name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'pe1_id'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.pe1_id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'pe2_id'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.pe2_id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac1_id'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac1_id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_id'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac2_id' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac1_ip'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac1_ip' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_ip'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac2_ip' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac1_peer_ip'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac1_peer_ip' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_peer_ip'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac2_peer_ip' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac1_svlan'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac1_svlan' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_svlan'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac2_svlan' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac1_protocol'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac1_protocol' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_protocol'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.name' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac1_protocol_bgp_as'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac1_protocol_bgp_as' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'ac2_protocol_bgp_as'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.ac1_protocol_bgp_as' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch><switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'af_type'`">
<outcome value='true'>
<set>
<parameter name='prop.l3vpn.af_type' value='`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].value`' />
</set></outcome></switch></block></for><execute plugin='com.att.sdnctl.sli.SliPluginUtils.SliPluginUtils' method='generateUUID' >
<parameter name="ctx-destination" value="prop.l3vpn.vpn-policy-id"/>
<outcome value='failure'>
<return status='failure'>
<parameter name='error-code' value='' />
<parameter name='error-message' value="An error occured while generation vpn policy ID" />
</return></outcome></execute><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smvpntemplate.json'"/>
<parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'"/>
<parameter name="restapiUser" value="$prop.sdncRestApi.thirdpartySdnc.user"/>
<parameter name="restapiPassword" value="$prop.sdncRestApi.thirdpartySdnc.password"/>
<parameter name="format" value="json"/>
<parameter name="httpMethod" value="post"/>
<parameter name="responsePrefix" value="restapi-result"/></execute><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smsitetemplate.json'"/>
<parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/sites'"/>
<parameter name="restapiUser" value="$prop.sdncRestApi.thirdpartySdnc.user"/>
<parameter name="restapiPassword" value="$prop.sdncRestApi.thirdpartySdnc.password"/>
<parameter name="format" value="json"/>
<parameter name="httpMethod" value="post"/>
<parameter name="responsePrefix" value="restapi-result"/></execute></block></method></service-logic>
|