blob: 1919ec0f82cfc67d1acd0a8d83df37de3999a455 (
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
|
<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='update-open-ended-links' mode='sync'>
<block atomic="true">
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="logical-links"
pfx='tmp.aai.logical-links' local-only='false' >
<outcome value='success'>
<for index='llidx' start='0' end='`$tmp.aai.logical-links.logical-link_length`' >
<block atomic="true">
<set>
<parameter name='src-tpId' value='`$tmp.aai.logical-links.logical-link[$llidx].relationship-list.relationship[0].relationship-data[0].relationship-value`' />
<parameter name='dst-tpId' value='`$tmp.aai.logical-links.logical-link[$llidx].relationship-list.relationship[1].relationship-data[0].relationship-value`' />
<parameter name='ll-to-be-updated.' value='`$tmp.aai.logical-links.logical-link[$llidx].`' />
</set>
<switch test='$dst-tpId'>
<outcome value=''>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="p-interface"
key="p-interface.interface-name = $src-ltpId
AND depth = '0'"
pfx='tmp.aai.src-tp' local-only='false' >
<outcome value='success'>
<set>
<parameter name='src-plug-id' value='`$tmp.aai.src-tp.inter-domain-plug-id`' />
</set>
</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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
</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 occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
</return>
</outcome>
</get-resource>
</outcome>
</switch>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
resource="p-interfaces"
pfx='tmp.aai.p-interfaces' local-only='false' >
<outcome value='success'>
<for index='tpidx' start='0' end='`$tmp.aai.p-interfaces.p-interface_length`' >
<switch test='`$tmp.aai.p-interfaces.p-interface[$tpidx].inter-domain-plug-id`'>
<outcome value='`$src-plug-id`'>
<switch test='`$tmp.aai.p-interfaces.p-interface[$tpidx].interface-name != $src-tp-id `'>
<outcome value='true'>
<block atomic='true'>
<set>
<parameter name='dst-tp-new' value='`$tmp.aai.p-interfaces.p-interface[$tpidx].interface-name`' />
</set>
<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='logical-link:relationship-list'
key='logical-link.link-name = $ll-to-be-updated.link-name' force="true" pfx="tmp.AnAI-data">
<parameter name="relationship-list.relationship[1].related-to" value="p-interface" />
<parameter name="relationship-list.relationship[1].related-link" value="`'/p-interfaces/p-interface/' + $dst-tp-new`" />
<parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="p-interface.interface-name" />
<parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$dst-tp-new`" />
</update>
</block>
</outcome>
</switch>
</outcome>
</switch>
</for>
</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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
</return>
</outcome>
</get-resource>
</block>
</for>
</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="`'An error occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
</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 occurred while querying pnf from AnAI with pnf-name = ' + $prop.l3vpn.pe1_id`" />
</return>
</outcome>
</get-resource>
</block>
</method>
</service-logic>
|