2 xmlns='http://www.onap.org/sdnc/svclogic'
\r
3 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
\r
4 <method rpc='sotn-vf-operation-uni-activate' mode='sync'>
\r
5 <block atomic="true">
\r
6 <switch test='`$service-data.vnfs.vnf_length`'>
\r
8 <return status='failure'>
\r
9 <parameter name='ack-final' value='Y'/>
\r
10 <parameter name="error-code" value="500" />
\r
11 <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
\r
15 <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
\r
16 <switch test="`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`">
\r
17 <outcome value='true'>
\r
18 <block atomic="true">
\r
20 <parameter name='vnf-index' value='`$idx`' />
\r
23 <parameter name='tmp.vnf-id' value='`$vf-module-topology-operation-input.vnf-information.vnf-id`' />
\r
29 <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
\r
30 <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
\r
31 <parameter name='contextPrefix' value='prop' />
\r
33 <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
\r
35 <return status='failure'>
\r
36 <parameter name='ack-final' value='Y'/>
\r
37 <parameter name="error-code" value="500" />
\r
38 <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
\r
42 <return status='failure'>
\r
43 <parameter name='ack-final' value='Y'/>
\r
44 <parameter name="error-code" value="500" />
\r
45 <parameter name="error-message" value="vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data" />
\r
48 <outcome value='Other'>
\r
49 <block atomic="true">
\r
51 <parameter name='vf-module-length' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`' />
\r
53 <for index='idx' start='0' end='`$vf-module-length`' >
\r
54 <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-id == $vf-module-topology-operation-input.vf-module-information.vf-module-id`">
\r
55 <outcome value='true'>
\r
56 <block atomic="true">
\r
58 <parameter name='tmp.vidx' value='`$idx`' />
\r
59 <parameter name='ctx.vf-module-data.' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.`' />
\r
62 <parameter name='vf-module-request-input.' value='`$ctx.vf-module-data.vf-module-request-input.`' />
\r
71 <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
\r
72 resource="generic-vnf"
\r
73 key="generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id"
\r
74 pfx='tmp.aai.generic-vnf' local-only='false' >
\r
75 <!--AND depth = '0'"-->
\r
76 <outcome value='success'>
\r
78 <for silentFailure='true' index='vidx' start='0' end='`$tmp.aai.generic-vnf.relationship-list.relationship_length`' >
\r
79 <switch test='`$tmp.aai.generic-vnf.relationship-list.relationship[$vidx].related-to`'>
\r
80 <outcome value='uni'>
\r
81 <block atomic="true">
\r
82 <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
\r
84 key="uni.id = $tmp.aai.generic-vnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value"
\r
85 pfx='tmp.aai.uni' local-only='false' >
\r
86 <outcome value='success'>
\r
89 <!--<parameter name='`tmp.unis.uni[$vidx].tpId`' value="`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].relationship-data[0].relationship-value`" />-->
\r
90 <parameter name='`tmp.unis.uni[$vidx].`' value="`$tmp.aai.uni.`" />
\r
92 <!--<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >-->
\r
93 <!--<parameter name="original_string" value='`tmp.unis.uni[$vidx].tp-id`'/>-->
\r
94 <!--<parameter name="regex" value="nodeId"/>-->
\r
95 <!--<parameter name="tmp.unis.uni[$vidx].pnf-name" value=""/>-->
\r
96 <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
\r
97 <parameter name="original_string" value='`tmp.aai.uni.tp-id`'/>
\r
98 <parameter name="regex" value="nodeId"/>
\r
99 <parameter name="tmp.aai.uni.pnf-name" value=""/>
\r
100 <outcome value='success'>
\r
102 <parameter name='prop.lan.ip-address' value='`$ipandMask[0]`' />
\r
103 <parameter name='prop.lan.prefixLength' value='`$ipandMask[1]`' />
\r
106 <outcome value='failure'>
\r
107 <return status='failure'>
\r
108 <parameter name='error-code' value='' />
\r
109 <parameter name='error-message' value="An error occured while splitting sna1_route" />
\r
113 <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
\r
115 key="'pnf.pnf-name = $tmp.unis.uni[$vidx].pnf-name'
\r
117 pfx='tmp.aai.pnf' local-only='false' >
\r
118 <!--<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" -->
\r
119 <!-- resource="generic-vnf" -->
\r
120 <!-- key="'generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id' -->
\r
121 <!-- AND depth = '0'"-->
\r
122 <!-- pfx='tmp.aai.generic-vnf' local-only='false' >-->
\r
123 <outcome value='success'>
\r
126 <parameter name='`$tmp.unis.uni[$vidx].node-id`' value="`$tmp.aai.pnf.pnf-id`" />
\r
128 <for silentFailure='true' index='ridx' start='0' end='`$tmp.aai.pnf.relationship-list.relationship_length`' >
\r
129 <switch test='`$tmp.aai.src-pnf.relationship-list.relationship[$vidx].related-to`'>
\r
130 <outcome value='thirdparty-controller'>
\r
131 <block atomic="true">
\r
133 <parameter name='`$tmp.unis.uni[$vidx].thirdparty-sdnc-id`' value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
\r
137 <outcome value='network-resource'>
\r
138 <block atomic="true">
\r
140 <parameter name='`$tmp.unis.uni[$vidx].network-id`' value="`$tmp.aai.pnf.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
\r
142 <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
\r
143 resource="network-resource"
\r
144 key="'network-resource.network-id = $tmp.unis.uni[$vidx].network-id'
\r
146 pfx='tmp.aai.network-resource' local-only='false' >
\r
147 <outcome value='success'>
\r
149 <parameter name="`$tmp.unis.uni[$vidx].network-id`" value="`$tmp.aai.network-resource.network-id`" />
\r
150 <parameter name="`$tmp.unis.uni[$vidx].provider-id`" value="`$tmp.aai.network-resource.provider-id`" />
\r
151 <parameter name="`$tmp.unis.uni[$vidx].client-id`" value="`$tmp.aai.network-resource.client-id`" />
\r
152 <parameter name="`$tmp.unis.uni[$vidx].te-topo-id`" value="`$tmp.aai.network-resource.te-topo-id`" />
\r
153 <parameter name="`$tmp.unis.uni[$vidx].network-type`" value="`$tmp.aai.network-resource.network-type`" />
\r
171 <switch test='`$tmp.unis.uni_length < 2`' >
\r
172 <outcome value='true'>
\r
173 <return status='success'>
\r
174 <parameter name="ack-final-indicator" value="Y" />
\r
175 <parameter name="error-code" value="200" />
\r
176 <parameter name="error-message" value="`$error-message`" />
\r
183 <call module='GENERIC-RESOURCE-API' rpc='sotn-get-otn-tunnel-path-from-oof' mode='sync' ></call>
\r
185 <parameter name='tmp.unis.uni[0].id' value="`$vf-module-topology-operation-input.vf-module-information.vf-module-id`" />
\r
186 <parameter name='tmp.unis.uni[0].tp-id' value="networkId-providerId-5555-clientId-6666-topologyId-11-nodeId-0.190.0.1" />
\r
187 <parameter name='tmp.unis.uni[0].access-provider-id' value="`$domain-A.provider-id`" />
\r
188 <parameter name='tmp.unis.uni[0].access-client-id' value="`$domain-A.client-id`" />
\r
189 <parameter name='tmp.unis.uni[0].access-topology-id' value="`$domain-A.topology-id`" />
\r
190 <parameter name='tmp.unis.uni[0].access-node-id' value="0.190.0.1" />
\r
191 <parameter name='tmp.unis.uni[0].src-access-ltp-id' value="1234" />
\r
192 <parameter name='tmp.unis.uni[0].dst-access-ltp-id' value="5678" />
\r
193 <parameter name='tmp.unis.uni[0].network-id' value="domain2-providerId-5555-clientId-6666-topologyId-11" />
\r
194 <parameter name='tmp.unis.uni[1].id' value="5642e9dd-496c-4ef6-be97-5caf4e9beec9" />
\r
195 <parameter name='tmp.unis.uni[1].tp-id' value="networkId-domain2-providerId-5555-clientId-6666-topologyId-11-nodeId-0.191.0.4" />
\r
196 <parameter name='tmp.unis.uni[1].access-provider-id' value="`$domain-B.provider-id`" />
\r
197 <parameter name='tmp.unis.uni[1].access-client-id' value="`$domain-B.client-id`" />
\r
198 <parameter name='tmp.unis.uni[1].access-topology-id' value="`$domain-B.topology-id`" />
\r
199 <parameter name='tmp.unis.uni[1].access-node-id' value="0.190.0.3" />
\r
200 <parameter name='tmp.unis.uni[1].src-access-ltp-id' value="9123" />
\r
201 <parameter name='tmp.unis.uni[1].dst-access-ltp-id' value="4567" />
\r
202 <parameter name='tmp.unis.uni[1].network-id' value="domain2-providerId-5555-clientId-6666-topologyId-11" />
\r
203 <parameter name='tmp.unis.uni_length' value="2" />
\r
205 <for index='vidx' start='0' end='`$tmp.unis.uni_length`' >
\r
206 <block atomic="true">
\r
208 <parameter name='oof.vpn.' value='`$tmp.unis.uni[$vidx].`' />
\r
210 <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
\r
211 resource="network-resource"
\r
212 key="network-resource.network-id = $oof.vpn.network-id"
\r
213 pfx='tmp.aai.network-resource' local-only='false' >
\r
214 <outcome value='success'>
\r
216 <for index='ridx' start='0' end='`$tmp.aai.network-resource.relationship-list.relationship_length`' >
\r
217 <switch test='`$tmp.aai.network-resource.relationship-list.relationship[$ridx].related-to`'>
\r
218 <outcome value='esr-thirdparty-sdnc'>
\r
220 <parameter name='prop.sdncRestApi.thirdpartySdnc.id' value="`$tmp.aai.network-resource.relationship-list.relationship[$ridx].relationship-data[0].relationship-value`" />
\r
227 <outcome value='not-found'>
\r
228 <return status='failure'>
\r
229 <parameter name='ack-final' value='Y'/>
\r
230 <parameter name="error-code" value="500" />
\r
231 <parameter name="error-message" value="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
\r
234 <outcome value='Other'>
\r
235 <return status='failure'>
\r
236 <parameter name='ack-final' value='Y'/>
\r
237 <parameter name="error-code" value="500" />
\r
238 <parameter name="error-message" value="`'Unexpected error occurred while querying pnf from AnAI with pnf-name = ' + $prop.connection-attachement.access-node-id`" />
\r
242 <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
\r
243 resource="esr-thirdparty-sdnc"
\r
244 key="esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id AND
\r
246 pfx='tmp.aai.esr-thirdparty-sdnc' local-only='false' >
\r
247 <outcome value='success'>
\r
249 <parameter name='prop.sdncRestApi.thirdpartySdnc.url' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
\r
250 <parameter name='prop.sdncRestApi.thirdpartySdnc.user' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
\r
251 <parameter name='prop.sdncRestApi.thirdpartySdnc.password' value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
\r
252 <!--<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >-->
\r
253 <!--<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />-->
\r
254 <!--<parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />-->
\r
255 <!--<parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />-->
\r
256 <!--<parameter name="format" value="json"/>-->
\r
257 <!--<parameter name="httpMethod" value="get"/>-->
\r
258 <!--<parameter name="responsePrefix" value="topology"/>-->
\r
259 <!--<parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>-->
\r
260 <!--<parameter name="trustStorePassword" value="adminadmin"/>-->
\r
261 <!--<parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>-->
\r
262 <!--<parameter name="keyStorePassword" value="adminadmin"/>-->
\r
265 <outcome value='not-found'>
\r
266 <return status='failure'>
\r
267 <parameter name='ack-final' value='Y'/>
\r
268 <parameter name="error-code" value="500" />
\r
269 <parameter name="error-message" value="`'An error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
\r
272 <outcome value='Other'>
\r
273 <return status='failure'>
\r
274 <parameter name='ack-final' value='Y'/>
\r
275 <parameter name="error-code" value="500" />
\r
276 <parameter name="error-message" value="`'Unexpected error occurred while querying esr-thirdparty-sdnc from AnAI with thirdparty-sdnc-id = ' + $tmp.thirdparty-sdnc-id`" />
\r
280 <call module='GENERIC-RESOURCE-API' rpc='sotn-create-otn-tunnel' mode='sync' ></call>
\r
282 <parameter name='ietf-eth-tran-service_etht-svc.globals.etht-svc-bandwidth-profiles[0].bandwidth-profile-type' value='ietf-eth-tran-types:mef-10-bwp' />
\r
283 <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-type' value='ietf-eth-tran-types:p2p-svc' />
\r
284 <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].admin-status' value='ietf-te-types:tunnel-state-up' />
\r
285 <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].access-port-id' value='0' />
\r
286 <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[0].service-classification-type' value='ietf-eth-tran-types:port-classification' />
\r
287 <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].access-port-id' value='1' />
\r
288 <parameter name='ietf-eth-tran-service_etht-svc.etht-svc-instances[0].etht-svc-access-ports[1].service-classification-type' value='ietf-eth-tran-types:port-classification' />
\r
292 <return status='success'>
\r
293 <parameter name="ack-final-indicator" value="Y" />
\r
294 <parameter name="error-code" value="200" />
\r
295 <parameter name="error-message" value="`$error-message`" />
\r