SDWAN sdnc DGs aai resource changes
[sdnc/oam.git] / platform-logic / datachange / src / main / json / DataChange_update-network-to-aai.json
1 [
2   {
3     "id": "20435d2f.b707b2",
4     "type": "dgstart",
5     "name": "DGSTART",
6     "outputs": 1,
7     "x": 129.01040649414062,
8     "y": 61.010414123535156,
9     "z": "3e15e6f8.d8900a",
10     "wires": [
11       [
12         "83ca6f8e.538a2"
13       ]
14     ]
15   },
16   {
17     "id": "83ca6f8e.538a2",
18     "type": "service-logic",
19     "name": "DataChange ${project.version}",
20     "module": "DataChange",
21     "version": "${project.version}",
22     "comments": "",
23     "xml": "<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}'>",
24     "outputs": 1,
25     "x": 218.01043701171875,
26     "y": 151.8993263244629,
27     "z": "3e15e6f8.d8900a",
28     "wires": [
29       [
30         "5fa2f1f3.bb35e"
31       ]
32     ]
33   },
34   {
35     "id": "5fa2f1f3.bb35e",
36     "type": "method",
37     "name": "method update-network-to-aai",
38     "xml": "<method rpc='update-network-to-aai' mode='sync'>\n",
39     "comments": "",
40     "outputs": 1,
41     "x": 254.1216583251953,
42     "y": 222.23265075683594,
43     "z": "3e15e6f8.d8900a",
44     "wires": [
45       [
46         "44238134.7d97f"
47       ]
48     ]
49   },
50   {
51     "id": "44238134.7d97f",
52     "type": "block",
53     "name": "block : atomic",
54     "xml": "<block atomic=\"true\">\n",
55     "atomic": "false",
56     "comments": "",
57     "outputs": 1,
58     "x": 479.3438415527344,
59     "y": 221.78833770751953,
60     "z": "3e15e6f8.d8900a",
61     "wires": [
62       [
63         "84458cb3.2004e",
64         "282c5771.31f2f8",
65         "c27c36c9.fe0038"
66       ]
67     ]
68   },
69   {
70     "id": "282c5771.31f2f8",
71     "type": "update",
72     "name": "save network-resource",
73     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='network-resource'  \n     key='network-resource.network-id = $tmp.network-id' >\n<parameter name='network-id' value='`$tmp.network-id`' />\n<parameter name='client-id' value='`$network.client-id`' />\n<parameter name='te-topo-id' value='`$network.te-topology-id`' />\n<parameter name='provider-id' value='`$network.provider-id`' />\n\n\n",
74     "comments": "",
75     "outputs": 1,
76     "x": 709.3436584472656,
77     "y": 127.01042938232422,
78     "z": "3e15e6f8.d8900a",
79     "wires": [
80       []
81     ]
82   },
83   {
84     "id": "8db597cb.e2ef58",
85     "type": "update",
86     "name": "save pnf",
87     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf' \n      key='network-resource.network-id = $tmp.network-id\n      AND pnf.pnf-name = $node.node-id' >\n<parameter name='pnf-name' value='`$node.node-id`' />\n<parameter name='pnf-id' value='`$node.node-id`' />\n<parameter name='operational-status' value='`$node.te.oper-status`' />\n<parameter name='admin-status' value='`$node.te.te-node-attributes.admin-status`' />\n<parameter name='in-maint' value='true' />\n\n\n\n\n\n",
88     "comments": "",
89     "outputs": 1,
90     "x": 899.1215515136719,
91     "y": 179.12151336669922,
92     "z": "3e15e6f8.d8900a",
93     "wires": [
94       []
95     ]
96   },
97   {
98     "id": "c27c36c9.fe0038",
99     "type": "for",
100     "name": "for each node",
101     "xml": "<for index='pidx' start='0' end='`$network.node_length`' >\n",
102     "comments": "",
103     "outputs": 1,
104     "x": 685.8992614746094,
105     "y": 171.3437271118164,
106     "z": "3e15e6f8.d8900a",
107     "wires": [
108       [
109         "8db597cb.e2ef58",
110         "6b246a86.7d22b4",
111         "79357b97.6a6604",
112         "629488d9.a436f8",
113         "89ed3af1.c4f958"
114       ]
115     ]
116   },
117   {
118     "id": "6b246a86.7d22b4",
119     "type": "set",
120     "name": "set network",
121     "xml": "<set>\n<parameter name='node.' value='`$network.node[$pidx].`' />\n",
122     "comments": "",
123     "x": 906.1214904785156,
124     "y": 145.23262786865234,
125     "z": "3e15e6f8.d8900a",
126     "wires": []
127   },
128   {
129     "id": "79357b97.6a6604",
130     "type": "save",
131     "name": "save pnf relationship to network-resource in AAI",
132     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $node.node-id' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"network-resource\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/network-resources/network-resource/' + $tmp.network-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"network-resource.network-id\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$tmp.network-id`\" />",
133     "comments": "",
134     "outputs": 1,
135     "x": 1017.7884216308594,
136     "y": 212.45490264892578,
137     "z": "3e15e6f8.d8900a",
138     "wires": [
139       []
140     ]
141   },
142   {
143     "id": "89ed3af1.c4f958",
144     "type": "for",
145     "name": "for each termination point",
146     "xml": "<for index='tidx' start='0' end='`$node.termination-point_length`' >\n",
147     "comments": "",
148     "outputs": 1,
149     "x": 950.4548645019531,
150     "y": 328.12149810791016,
151     "z": "3e15e6f8.d8900a",
152     "wires": [
153       [
154         "6bc546b5.f87e18",
155         "8d1a709c.fbdf6",
156         "ad4de444.eb7858",
157         "bd80da47.090a88"
158       ]
159     ]
160   },
161   {
162     "id": "6bc546b5.f87e18",
163     "type": "set",
164     "name": "set termination point",
165     "xml": "<set>\n<parameter name='tp.' value='`$node.termination-point[$tidx].`' />\n",
166     "comments": "",
167     "x": 1217.1217346191406,
168     "y": 289.01045989990234,
169     "z": "3e15e6f8.d8900a",
170     "wires": []
171   },
172   {
173     "id": "bd80da47.090a88",
174     "type": "update",
175     "name": "save p-interface",
176     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='p-interface' \n      key='network-resource.network-id = $tmp.network-id\n      AND pnf.pnf-name = $node.node-id\n      AND p-interface.interface-name = $unique-ltpId' >      \n<parameter name='interface-name' value='`$unique-ltpId`' />\n<parameter name='network-ref' value='`$tp.supporting-termination-point[0].network-ref`' />\n<parameter name='transparent' value='`$tp.svc.supported-classification.transparent`' />\n<parameter name='speed-value' value='`$tp.te.interface-switching-capability[0].max-lsp-bandwidth[0].te-bandwidth.eth-bandwidth`' />\n<parameter name='operational-status' value='`$tp.te.oper-status`' />\n<parameter name='in-maint' value=\"true\" />\n\n",
177     "comments": "",
178     "outputs": 1,
179     "x": 1200.8254699707031,
180     "y": 357.5660171508789,
181     "z": "3e15e6f8.d8900a",
182     "wires": [
183       []
184     ]
185   },
186   {
187     "id": "8d1a709c.fbdf6",
188     "type": "save",
189     "name": "save pnf relationship to p-interface in AAI",
190     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='pnf:relationship-list' \n      key='pnf.pnf-name = $node.node-id' force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"p-interface\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/network-resources/network-resource/' + $tmp.network-id + '/pnfs/pnf/' + $node.node-id '/p-interfaces/p-interface/' + $unique-ltpId`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"p-interface.interface-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$unique-ltpId`\" />",
191     "comments": "",
192     "outputs": 1,
193     "x": 1278.7142639160156,
194     "y": 395.34375762939453,
195     "z": "3e15e6f8.d8900a",
196     "wires": [
197       []
198     ]
199   },
200   {
201     "id": "ad4de444.eb7858",
202     "type": "set",
203     "name": "set unique-ltpId",
204     "xml": "<set>\n<parameter name='unique-ltpId' value=\"`'nodeId-' + $node.node-id + '-ltpId-' + $tp.te-tp-id`\" />\n",
205     "comments": "",
206     "x": 1201.0106506347656,
207     "y": 323.1215286254883,
208     "z": "3e15e6f8.d8900a",
209     "wires": []
210   },
211   {
212     "id": "84458cb3.2004e",
213     "type": "execute",
214     "name": "execute",
215     "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n    <parameter name=\"source\" value=\"`$network.network-id`\"/>\n    <parameter name=\"outputPath\" value=\"tmp.network-id\"/>\n    <parameter name=\"target\" value=\"/\"/>\n    <parameter name=\"replacement\" value=\"-\"/>\n    ",
216     "comments": "",
217     "outputs": 1,
218     "x": 659.0039367675781,
219     "y": 88.00390625,
220     "z": "3e15e6f8.d8900a",
221     "wires": [
222       []
223     ]
224   },
225   {
226     "id": "629488d9.a436f8",
227     "type": "save",
228     "name": "save pnf relation with esr-thirdparty-sdnc",
229     "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='esr-thirdparty-sdnc:relationship-list' \n      key='esr-thirdparty-sdnc.thirdparty-sdnc-id = $prop.sdncRestApi.thirdpartySdnc.id' \n      force=\"true\" pfx=\"tmp.AnAI-data\">\n<parameter name=\"relationship-list.relationship[0].related-to\" value=\"pnf\" />\n<parameter name=\"relationship-list.relationship[0].related-link\" value=\"`'/network/network-resources/network-resource/' + $tmp.network-id + '/pnfs/pnf/' + $node.node-id`\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-key\" value=\"pnf.pnf-name\" />\n<parameter name=\"relationship-list.relationship[0].relationship-data[0].relationship-value\" value=\"`$node.node-id`\" />\n",
230     "comments": "",
231     "outputs": 1,
232     "x": 999.0104064941406,
233     "y": 249.00391387939453,
234     "z": "3e15e6f8.d8900a",
235     "wires": [
236       []
237     ]
238   }
239 ]