3 "id": "2b8f0645.8e4dda",
5 "name": "POLICY-UPDATE-NOTIFY-OPERATION",
8 "x": 538.3928527832031,
9 "y": 34.28571319580078,
10 "z": "c4ddb531.504de8",
14 "id": "640c5bf2.e2b254",
18 "x": 110.14285278320312,
19 "y": 85.03571319580078,
20 "z": "c4ddb531.504de8",
28 "id": "6371d353.9eabbc",
29 "type": "service-logic",
30 "name": "GENERIC-RESOURCE-API ${project.version}",
31 "module": "GENERIC-RESOURCE-API",
32 "version": "${project.version}",
34 "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='GENERIC-RESOURCE-API' version='${project.version}'>",
36 "x": 224.46426391601562,
37 "y": 124.7023868560791,
38 "z": "c4ddb531.504de8",
46 "id": "af806a5c.37c7f8",
48 "name": "method policy-update-notify-operation",
49 "xml": "<method rpc='policy-update-notify-operation' mode='sync'>\n",
53 "y": 165.0357151031494,
54 "z": "c4ddb531.504de8",
62 "id": "d17a989.54e5868",
63 "type": "returnSuccess",
64 "name": "return success",
65 "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"success\" />\n",
67 "x": 325.04773712158203,
68 "y": 783.9882183074951,
69 "z": "c4ddb531.504de8",
73 "id": "3cfb5438.adb59c",
75 "name": "block : atomic",
76 "xml": "<block atomic=\"true\">",
79 "x": 665.2977752685547,
80 "y": 443.8095178604126,
81 "z": "c4ddb531.504de8",
97 "id": "4c9eba0e.d56fd4",
99 "name": "RestapiCallnode getConfig",
100 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.pm.getpolicy.templatefile`\" />\n <parameter name='restapiUrl' value=\"`$prop.policy-manager.url + '/pdp/api/getConfig'`\" />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='responsePrefix' value=\"policy\" /> \n <parameter name='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n",
103 "x": 936.9048233032227,
104 "y": 420.7142581939697,
105 "z": "c4ddb531.504de8",
114 "id": "bbad0a81.e6a3e8",
116 "name": "readProperties",
117 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n",
120 "x": 904.285774230957,
121 "y": 198.57144355773926,
122 "z": "c4ddb531.504de8",
128 "id": "371b8aa7.b584d6",
131 "xml": "<outcome value='success'>\n",
134 "x": 1144.0476684570312,
135 "y": 397.857141494751,
136 "z": "c4ddb531.504de8",
144 "id": "bc023fa9.fe4ae",
146 "name": "block: atomic",
147 "xml": "<block atomic=\"true\">\n",
151 "x": 1307.7619934082031,
152 "y": 397.785617351532,
153 "z": "c4ddb531.504de8",
159 "id": "eb8e6d2.61e729",
162 "xml": "<outcome value='Other'>\n",
165 "x": 1140.1852073669434,
166 "y": 445.7803544998169,
167 "z": "c4ddb531.504de8",
175 "id": "c447c4e0.dd61f8",
176 "type": "returnFailure",
177 "name": "return failure",
178 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to get policy from Policy Manager' />\n",
180 "x": 1304.6190910339355,
181 "y": 445.4285640716553,
182 "z": "c4ddb531.504de8",
186 "id": "5bf6f09a.aa2a",
188 "name": "execute Contrail API update network policy",
189 "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.contrail.ContrailAdaptor' method='sendContrailRequest' emitsOutcome='true' >\n<parameter name='api-name' value='network-policy' />\n<parameter name='api-action' value='update' />\n<parameter name='resp-prefix' value='contrailResp' />\n<parameter name='cloud-region-id' value='`$policy-splits[1]`' />\n<parameter name='update-network-policy-json' value='`$policy.config`' />",
192 "x": 973.8094635009766,
193 "y": 725.4761505126953,
194 "z": "c4ddb531.504de8",
203 "id": "fca9fae0.1cd838",
206 "xml": "<outcome value='success'>\n",
209 "x": 1226.6666412353516,
210 "y": 702.6189994812012,
211 "z": "c4ddb531.504de8",
219 "id": "9b561741.693e18",
221 "name": "block: atomic",
222 "xml": "<block atomic=\"true\">\n",
226 "x": 1390.3809661865234,
227 "y": 702.5474753379822,
228 "z": "c4ddb531.504de8",
234 "id": "cadf6d1d.e304e",
237 "xml": "<outcome value='Other'>\n",
240 "x": 1222.8041801452637,
241 "y": 750.5422124862671,
242 "z": "c4ddb531.504de8",
250 "id": "bc7e3f77.a2464",
251 "type": "returnFailure",
252 "name": "return failure",
253 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Error updating Contrail: ' + $contrailResp.resp-message`\" />\n",
255 "x": 1385.809440612793,
256 "y": 751.6189785003662,
257 "z": "c4ddb531.504de8",
261 "id": "50b08b49.336914",
262 "type": "switchNode",
263 "name": "switch update-type",
264 "xml": "<switch test='`$policy-update-notify-operation-input.update-type`'>\n",
267 "x": 334.99998474121094,
268 "y": 444.28569412231445,
269 "z": "c4ddb531.504de8",
277 "id": "59ff8d7a.32d3d4",
279 "name": "block : atomic",
280 "xml": "<block atomic=\"true\">",
283 "x": 123.33332824707031,
284 "y": 614.0476264953613,
285 "z": "c4ddb531.504de8",
294 "id": "8100e6ab.3c2318",
297 "xml": "<outcome value='Update'>\n",
300 "x": 508.5714530944824,
301 "y": 443.8571300506592,
302 "z": "c4ddb531.504de8",
310 "id": "dadfe54.591ea18",
312 "name": "insert to POLICY_UPDATE_NOTIFICATION",
313 "xml": "<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n key=\"`$tmp.sql`\" pfx='pfx'>\n",
316 "x": 992.8572158813477,
317 "y": 294.28569889068604,
318 "z": "c4ddb531.504de8",
324 "id": "5210aeb1.e5ac2",
326 "name": "set sql statement",
327 "xml": "<set>\n<parameter name='tmp.sql' value=\"`'insert into POLICY_UPDATE_NOTIFICATION (policy_name,version_id,update_type) values ( '\n+ ' $policy-update-notify-operation-input.policy-name , $policy-update-notify-operation-input.version-id , $policy-update-notify-operation-input.update-type )'`\" />\n\n",
329 "x": 909.9999465942383,
330 "y": 245.71427249908447,
331 "z": "c4ddb531.504de8",
335 "id": "7d21e501.763d7c",
337 "name": "set tmp.policy-name",
338 "xml": "<set>\n<parameter name='tmp.policy-name' value='`$policy-update-notify-operation-input.policy-name`' />\n",
340 "x": 916.6665954589844,
341 "y": 343.33336639404297,
342 "z": "c4ddb531.504de8",
346 "id": "4ca8d575.f2c99c",
348 "name": "convert json config to variables",
349 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx' >\n <parameter name='source' value=\"policy.config\" />\n <parameter name='outputPath' value=\"tmp.config-ctx\" />\n <parameter name='isEscaped' value='false' />\n",
352 "x": 938.3333129882812,
354 "z": "c4ddb531.504de8",
363 "id": "215a8f00.3a1142",
366 "xml": "<outcome value='success'>\n",
369 "x": 1145.4761581420898,
370 "y": 497.14288330078125,
371 "z": "c4ddb531.504de8",
379 "id": "dc65e70.190b018",
381 "name": "block: atomic",
382 "xml": "<block atomic=\"true\">\n",
386 "x": 1309.1904830932617,
387 "y": 497.07135915756226,
388 "z": "c4ddb531.504de8",
394 "id": "bf040853.679c08",
397 "xml": "<outcome value='Other'>\n",
400 "x": 1141.613697052002,
401 "y": 545.0660963058472,
402 "z": "c4ddb531.504de8",
410 "id": "c3c3e9d5.9be4c8",
411 "type": "returnFailure",
412 "name": "return failure",
413 "xml": "<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value='Failed to convert config variable from PolicyManager' />\n",
415 "x": 1306.0475807189941,
416 "y": 544.7143058776855,
417 "z": "c4ddb531.504de8",
421 "id": "5d81f8f2.13ee78",
423 "name": "set policy-name",
424 "xml": "<set>\n<parameter name='policy-name' value='`$tmp.config-ctx.content.fq_name[2]`' />\n",
426 "x": 888.3333282470703,
427 "y": 608.3333606719971,
428 "z": "c4ddb531.504de8",
432 "id": "9cb05511.ecfcc8",
434 "name": "execute split",
435 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n <parameter name=\"original_string\" value=\"`$policy-name`\" />\n <parameter name=\"regex\" value=\"_\"/>\n <parameter name=\"limit\" value=\"3\" />\n <parameter name=\"ctx_memory_result_key\" value=\"policy-splits\" />\n",
438 "x": 876.9047546386719,
439 "y": 657.6190423965454,
440 "z": "c4ddb531.504de8",