blob: ba2ea3984d2180a938537f2bc7127b2dbdd4054f (
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
|
<service-logic
xmlns='http://www.onap.org/sdnc/svclogic'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='DataChange' version='${project.version}'>
<method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>
<block atomic="true">
<switch test="`$data-change-notification-input.aai-event-trigger`">
<outcome value='Update'>
<block atomic="true">
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
<parameter name="format" value="json"/>
<parameter name="httpMethod" value="post"/>
<parameter name="responsePrefix" value="token-result"/>
<parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
<parameter name="trustStorePassword" value="adminadmin"/>
<parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
<parameter name="keyStorePassword" value="adminadmin"/>
<outcome value='success'>
<set>
<parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
</set>
</outcome>
<outcome value='failure'>
<block></block>
</outcome>
</execute>
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
<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="get"/>
<parameter name="responsePrefix" value="topology"/>
<parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks"/>
<parameter name="trustStorePassword" value="adminadmin"/>
<parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
<parameter name="keyStorePassword" value="adminadmin"/>
<parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
<outcome value='success'>
<block atomic="true"></block>
</outcome>
<outcome value='failure'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
<parameter name="error-message" value="Error executing Create vpn rest api" />
</return>
</outcome>
</execute>
<for index='nidx' start='0' end='`$topology.networks.network_length`' >
<block>
<set>
<parameter name='network.' value='`$topology.networks.network[$nidx].`' />
</set>
<call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
</block>
</for>
</block>
</outcome>
<outcome value='delete'>
<block atomic="true"></block>
</outcome>
</switch>
</block>
</method>
</service-logic>
|