3 "id": "b83fc37f.f69e88",
\r
9 "z": "9eef7e7e.8f1058",
\r
17 "id": "1dd92dc7.5da5d2",
\r
19 "name": "method get-data-from-policy",
\r
20 "xml": "<method rpc='get-data-from-policy' mode='sync'>\n",
\r
25 "z": "9eef7e7e.8f1058",
\r
33 "id": "78e991f6.6f7c58",
\r
34 "type": "service-logic",
\r
35 "name": "GENERIC-RESOURCE-API ${project.version}",
\r
36 "module": "GENERIC-RESOURCE-API",
\r
37 "version": "${project.version}",
\r
39 "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}'>",
\r
41 "x": 427.9403991699219,
\r
42 "y": 45.32145690917969,
\r
43 "z": "9eef7e7e.8f1058",
\r
51 "id": "cbf06f1d.725928",
\r
53 "name": "Call Policy Manager getPolicy",
\r
58 "z": "9eef7e7e.8f1058",
\r
62 "id": "46375ae1.7b558c",
\r
64 "name": "execute RestapiCallNode",
\r
65 "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='customHttpHeaders'\n value=\"`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `\" />\n\t<parameter name=\"responsePrefix\" value=\"tmp.pm-response\" />",
\r
70 "z": "9eef7e7e.8f1058",
\r
79 "id": "19b66f4d.72dee9",
\r
82 "xml": "<set>\n<parameter name='tmp.policy-name' value=\"`$get-data-from-policy-input.policy-instance-name`\" />\n",
\r
86 "z": "9eef7e7e.8f1058",
\r
90 "id": "4ce19c9e.b25124",
\r
92 "name": "block : atomic",
\r
93 "xml": "<block atomic='true'>",
\r
99 "z": "9eef7e7e.8f1058",
\r
112 "id": "ac19e1c6.8e36a8",
\r
115 "xml": "<record plugin=\"com.att.sdnctl.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: restapi-call-node Call Policy Manager getPolicy\"/>",
\r
120 "z": "9eef7e7e.8f1058",
\r
126 "id": "d7e1c7cf.a18d1",
\r
128 "name": "execute readProperties",
\r
129 "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",
\r
134 "z": "9eef7e7e.8f1058",
\r
143 "id": "59fd6138.91c4f8",
\r
146 "xml": "<outcome value='success'>\n",
\r
151 "z": "9eef7e7e.8f1058",
\r
159 "id": "d5dccc24.0e693",
\r
162 "xml": "<outcome value='failure'>\n",
\r
167 "z": "9eef7e7e.8f1058",
\r
175 "id": "33ec20fb.28aa18",
\r
177 "name": "block : atomic",
\r
178 "xml": "<block atomic='true'>",
\r
184 "z": "9eef7e7e.8f1058",
\r
193 "id": "72af1062.d19fd8",
\r
195 "name": "Read properties",
\r
200 "z": "9eef7e7e.8f1058",
\r
204 "id": "f3a9b2ce.918548",
\r
206 "name": "Process Policy Manager response",
\r
207 "info": "Use the three naming components returned from Policy Manager to build the name\n\nExtract from json response three data components:\n\n1. VNFNAME\n2. CONSTANT_TAG\n3. SEQUENCE",
\r
211 "z": "9eef7e7e.8f1058",
\r
215 "id": "d8d1e5cb.101cc",
\r
217 "name": "execute jsonStringToCtx",
\r
218 "xml": "<execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"jsonStringToCtx\">\n\t<parameter name=\"source\" value=\"policy-config\" />\n\t<parameter name=\"outputPath\" value=\"jsonContextPrefix\" />\n\t<parameter name=\"isEscaped\" value=\"true\" />\n\n",
\r
223 "z": "9eef7e7e.8f1058",
\r
232 "id": "f617542d.84f16",
\r
235 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: call jsonStringToCtx\"/>\n<parameter name='field3' value='`$policy-config`' />",
\r
240 "z": "9eef7e7e.8f1058",
\r
246 "id": "a789fff2.8e6668",
\r
249 "xml": "<outcome value='failure'>\n",
\r
254 "z": "9eef7e7e.8f1058",
\r
262 "id": "9a2680ce.7f8d88",
\r
265 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: Error calling Policy Manager getPolicy\"/>\n",
\r
270 "z": "9eef7e7e.8f1058",
\r
276 "id": "f694d7c1.52ec1",
\r
279 "xml": "<outcome value='success'>\n",
\r
284 "z": "9eef7e7e.8f1058",
\r
292 "id": "f53edd55.57cb58",
\r
295 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: getPolicy SUCCESS\"/>\n<parameter name='field3' value='`$tmp.pm-response.type`' />\n<parameter name='field4' value='`$tmp.pm-response.matchingConditions`' />\n<parameter name='field5' value='`$tmp.pm-response.config`' />\n<parameter name='field6' value='`$tmp.pm-response.response-code`' />\n<parameter name='field7' value='`$tmp.pm-response.response-message`' />",
\r
300 "z": "9eef7e7e.8f1058",
\r
306 "id": "bf2f9549.b5432",
\r
309 "xml": "<set>\n<parameter name='policy-config' value=\"`$tmp.pm-response.config`\" />\n",
\r
313 "z": "9eef7e7e.8f1058",
\r
317 "id": "9bb879f3.58bda",
\r
320 "xml": "<outcome value='failure'>\n",
\r
325 "z": "9eef7e7e.8f1058",
\r
333 "id": "bb351685.940688",
\r
336 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: Error calling jsonStringToCtx\"/>\n",
\r
341 "z": "9eef7e7e.8f1058",
\r
347 "id": "8ddbc03f.308d9",
\r
350 "xml": "<outcome value='success'>\n",
\r
355 "z": "9eef7e7e.8f1058",
\r
363 "id": "596244e1.06352c",
\r
366 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: jsonStringToCtx SUCCESS: policyName|policy-data|\"/>\n<parameter name='field3' value='`$jsonContextPrefix.policyName`' />\n<parameter name='field4' value='`$jsonContextPrefix.content.policy-data`' />",
\r
371 "z": "9eef7e7e.8f1058",
\r
377 "id": "3c75d70f.d3c808",
\r
379 "name": "block : atomic",
\r
380 "xml": "<block atomic='true'>",
\r
386 "z": "9eef7e7e.8f1058",
\r
398 "id": "6c8a4a5d.6a7de4",
\r
399 "type": "returnFailure",
\r
400 "name": "return failure",
\r
401 "xml": "<return status='failure'>\n<parameter name='error-code' value='502' />\n<parameter name='error-message' value='get-data-from-policy: getPolicy call to Policy Manger failed' />\n",
\r
405 "z": "9eef7e7e.8f1058",
\r
409 "id": "f2b6fd24.7801",
\r
410 "type": "returnFailure",
\r
411 "name": "return failure",
\r
412 "xml": "<return status='failure'>\n<parameter name='error-code' value='504' />\n<parameter name='error-message' value='get-data-from-policy: failed to parse Policy Manger getPolicy response' />\n",
\r
416 "z": "9eef7e7e.8f1058",
\r
420 "id": "b2b110f6.fc0288",
\r
423 "xml": "<block>\n",
\r
429 "z": "9eef7e7e.8f1058",
\r
438 "id": "e4a38d89.8cc9c8",
\r
441 "xml": "<block>\n",
\r
447 "z": "9eef7e7e.8f1058",
\r
456 "id": "61c23f62.ad7b28",
\r
458 "name": "Validate inputs",
\r
463 "z": "9eef7e7e.8f1058",
\r
467 "id": "392811b2.b8197e",
\r
468 "type": "switchNode",
\r
469 "name": "switch input.policy-instance-name",
\r
470 "xml": "<switch test='`$get-data-from-policy-input.policy-instance-name`'>\n",
\r
475 "z": "9eef7e7e.8f1058",
\r
483 "id": "71c6380.f2d7cc8",
\r
486 "xml": "<outcome value=''>\n",
\r
491 "z": "9eef7e7e.8f1058",
\r
499 "id": "a8f9fb15.acf4e",
\r
501 "name": "block : atomic",
\r
502 "xml": "<block atomic='true'>",
\r
508 "z": "9eef7e7e.8f1058",
\r
517 "id": "d0858194.bb868",
\r
519 "name": "Read properties and validate inputs",
\r
524 "z": "9eef7e7e.8f1058",
\r
528 "id": "4b6fc822.22489",
\r
531 "xml": "<block>\n",
\r
537 "z": "9eef7e7e.8f1058",
\r
547 "id": "9c6a1592.fb19c8",
\r
548 "type": "switchNode",
\r
549 "name": "switch response-code",
\r
550 "xml": "<switch test='`$tmp.pm-response.response-code`'>\n",
\r
555 "z": "9eef7e7e.8f1058",
\r
563 "id": "6e86997d.26955",
\r
566 "xml": "<outcome value='500'>\n",
\r
571 "z": "9eef7e7e.8f1058",
\r
579 "id": "659860d.dc39e2",
\r
582 "xml": "<block>\n",
\r
588 "z": "9eef7e7e.8f1058",
\r
597 "id": "10b87f4.b81b681",
\r
600 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: Error calling Policy Manager getPolicy\"/>\n",
\r
605 "z": "9eef7e7e.8f1058",
\r
611 "id": "cb7b17e7.127258",
\r
612 "type": "returnFailure",
\r
613 "name": "return failure",
\r
614 "xml": "<return status='failure'>\n<parameter name='error-code' value='502' />\n<parameter name='error-message' value='get-data-from-policy: getPolicy call to Policy Manger failed' />\n",
\r
618 "z": "9eef7e7e.8f1058",
\r
622 "id": "b5511e69.3d8618",
\r
624 "name": "block : atomic",
\r
625 "xml": "<block atomic='true'>",
\r
631 "z": "9eef7e7e.8f1058",
\r
639 "id": "947a2b69.ec9398",
\r
642 "xml": "<block>\n",
\r
648 "z": "9eef7e7e.8f1058",
\r
657 "id": "4f062576.7b6584",
\r
658 "type": "GenericXML",
\r
660 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: read properties file.\"/>",
\r
665 "z": "9eef7e7e.8f1058",
\r
671 "id": "24195f46.ca98f8",
\r
672 "type": "GenericXML",
\r
674 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: Could not read properties file.\"/>\n<parameter name=\"field3\" value='`$prop.restapi.pm.getpolicy.templatefile`'/>",
\r
679 "z": "9eef7e7e.8f1058",
\r
685 "id": "566a8d54.f462dc",
\r
686 "type": "returnFailure",
\r
687 "name": "return failure",
\r
688 "xml": "<return status='failure'>\n<parameter name='error-code' value='501' />\n<parameter name='error-message' value='get-data-from-policy: could not read generic-resource-api properties' />\n",
\r
692 "z": "9eef7e7e.8f1058",
\r
696 "id": "ac7758e6.06c038",
\r
699 "xml": "<block>\n",
\r
705 "z": "9eef7e7e.8f1058",
\r
714 "id": "d28d8a99.9ae948",
\r
715 "type": "GenericXML",
\r
717 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: input.policy-instance-name is not set\"/>",
\r
722 "z": "9eef7e7e.8f1058",
\r
728 "id": "3c7d35d5.15560a",
\r
729 "type": "returnFailure",
\r
730 "name": "return failure",
\r
731 "xml": "<return status='failure'>\n<parameter name='error-code' value='507' />\n<parameter name='error-message' value='get-data-from-policy: input.policy-instance-name is not set' />\n",
\r
735 "z": "9eef7e7e.8f1058",
\r
739 "id": "925a65d4.ac3ab8",
\r
741 "name": "Loop thru policy-data when it is a list",
\r
746 "z": "9eef7e7e.8f1058",
\r
750 "id": "c1f590f5.8f2c5",
\r
752 "name": "for each policy-data element",
\r
753 "xml": "<for index='policyDataIndex' start='0' end='`$jsonContextPrefix.content.policy-data_length`' >\n",
\r
758 "z": "9eef7e7e.8f1058",
\r
767 "id": "56f2caaf.a21404",
\r
769 "name": "block : atomic",
\r
770 "xml": "<block atomic='true'>",
\r
776 "z": "9eef7e7e.8f1058",
\r
784 "id": "e9c505d9.7641f8",
\r
787 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: policyDataIndex|nf-role|rule-1|rule-2:\"/>\n<parameter name='field3' value='`$policyDataIndex`' />\n<parameter name='field4' value='`$jsonContextPrefix.content.policy-data[$policyDataIndex].nf-role`' />\n<parameter name='field5' value='`$jsonContextPrefix.content.policy-data[$policyDataIndex].rule-1`' />\n<parameter name='field6' value='`$jsonContextPrefix.content.policy-data[$policyDataIndex].rule-2`' />",
\r
792 "z": "9eef7e7e.8f1058",
\r
798 "id": "5c9052.5d187fb",
\r
800 "name": "set known policy-data element name and value",
\r
801 "xml": "<set>\n<parameter name='get-data-from-policy-output.' value='`$jsonContextPrefix.content.policy-data.`' />",
\r
805 "z": "9eef7e7e.8f1058",
\r
809 "id": "3f8ba63d.63076a",
\r
811 "name": "for each nested extended-params element extract name and value",
\r
812 "xml": "<for index='policyDataExtendedParamsIndex' start='0' end='`$jsonContextPrefix.content.policy-data.extended-params_length`' >",
\r
817 "z": "9eef7e7e.8f1058",
\r
827 "id": "a2112800.e14638",
\r
829 "name": "Get extended-params when policy-data is not a list",
\r
834 "z": "9eef7e7e.8f1058",
\r
838 "id": "dff4e845.8c2d38",
\r
840 "name": "block : atomic",
\r
841 "xml": "<block atomic='true'>",
\r
847 "z": "9eef7e7e.8f1058",
\r
855 "id": "46e505f4.b9ba4c",
\r
857 "name": "set name and value from extended params element",
\r
858 "xml": "<set>\n<parameter name='output-param-name' value='`$jsonContextPrefix.content.policy-data.extended-params[$policyDataExtendedParamsIndex].param-name`' />\n<parameter name='output-param-value' value='`$jsonContextPrefix.content.policy-data.extended-params[$policyDataExtendedParamsIndex].param-value`' />",
\r
862 "z": "9eef7e7e.8f1058",
\r
866 "id": "dd037e4c.c7bb3",
\r
867 "type": "switchNode",
\r
869 "xml": "<switch test='`$jsonContextPrefix.content.policy-data_length > 0`'>",
\r
874 "z": "9eef7e7e.8f1058",
\r
882 "id": "72c5a068.2a844",
\r
883 "type": "outcomeTrue",
\r
885 "xml": "<outcome value='true'>\n",
\r
890 "z": "9eef7e7e.8f1058",
\r
898 "id": "1414756.a77f98b",
\r
900 "name": "Set known output params",
\r
905 "z": "9eef7e7e.8f1058",
\r
909 "id": "17b1aaaa.debfa5",
\r
912 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: get-data-from-policy-output.:\"/>\n<parameter name='field3' value='`$get-data-from-policy-output.`' />",
\r
917 "z": "9eef7e7e.8f1058",
\r
923 "id": "11920eb2.868ba1",
\r
924 "type": "switchNode",
\r
926 "xml": "<switch test='`$jsonContextPrefix.content.policy-data.extended-params_length > 0`'>",
\r
931 "z": "9eef7e7e.8f1058",
\r
939 "id": "6f485d54.b981f4",
\r
940 "type": "outcomeTrue",
\r
942 "xml": "<outcome value='true'>\n",
\r
947 "z": "9eef7e7e.8f1058",
\r
955 "id": "f7e9500f.a774f",
\r
957 "name": "printContext",
\r
958 "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/get-data-from-policy.log' />\n",
\r
963 "z": "9eef7e7e.8f1058",
\r
969 "id": "a278ba14.2107c8",
\r
970 "type": "returnSuccess",
\r
971 "name": "return success",
\r
972 "xml": "<return status='success'>",
\r
976 "z": "9eef7e7e.8f1058",
\r
980 "id": "f735acce.c6ff4",
\r
983 "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"LAINA: get-data-from-policy: policyDataExtendedParamsIndex|output-param-name|output-param-value:\"/>\n<parameter name='field3' value='`$policyDataExtendedParamsIndex`' />\n<parameter name='field4' value='`$output-param-name`' />\n<parameter name='field5' value='`$output-param-value`' />",
\r
988 "z": "9eef7e7e.8f1058",
\r
994 "id": "478129ad.d071b8",
\r
996 "name": "set output name and value pair from extended params",
\r
997 "xml": "<set>\n<parameter name=\"`'get-data-from-policy-output.' + $output-param-name`\" value=\"`$output-param-value`\" />",
\r
1001 "z": "9eef7e7e.8f1058",
\r
1005 "id": "56f0abfe.71e324",
\r
1007 "name": "set output element for name and values",
\r
1008 "xml": "<set>\n<parameter name=\"`'get-data-from-policy-output[' + $policyDataIndex + '].nf-role'`\" value= '`$jsonContextPrefix.content.policy-data[$policyDataIndex].nf-role`' />\n<parameter name=\"`'get-data-from-policy-output[' + $policyDataIndex + '].rule-1'`\" value= '`$jsonContextPrefix.content.policy-data[$policyDataIndex].rule-1`' />\n<parameter name=\"`'get-data-from-policy-output[' + $policyDataIndex + '].rule-2'`\" value= '`$jsonContextPrefix.content.policy-data[$policyDataIndex].rule-2`' />",
\r
1012 "z": "9eef7e7e.8f1058",
\r
1016 "id": "27b7d1c2.c574de",
\r
1018 "name": "set known policy-data element name and value",
\r
1019 "xml": "<set>\n<parameter name=\"`'get-data-from-policy-output[' + $policyDataIndex + ']'`.\" value= '`$jsonContextPrefix.content.policy-data[$policyDataIndex].`' />",
\r
1023 "z": "9eef7e7e.8f1058",
\r