aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin
AgeCommit message (Collapse)AuthorFilesLines
2020-08-24Add request IDs in command-executor logJulien Fontaine1-0/+5
* Update gRPC interface to handle SubRequestID and Originator ID * Update command-executor log format to handle request IDs in the log statement * Add SubRequest ID and Originator ID in BP log statement Issue-ID: CCSDK-2687 Change-Id: If261bb0912df5800ed2fc65371c5ee784d6a45fb Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca>
2020-08-04cds-exec shouldn't return "N/A" as outputOleg Mitsura1-8/+8
Issue-ID: CCSDK-2603 * execute-command-logs" should always be a list (in some cases, we had a string causing possible parsing problems) * response-data should be JSON and "N/A" not acceptible. Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: Ie6fceb6e1f4c86bfcdeb7671bacd74b909628096
2020-07-14cmd-exec payload should be payload, not err msg.Oleg Mitsura1-67/+50
Issue-ID: CCSDK-2549 fixes: 1. CMD-exec returns payload as JSON object. There was some regression where we overwrite returned JSON with errMsg. 2. adds 100ms delta to executionTimeout, as was in our downstream version (want to guarantee that we get grpc timeout exception on BP side rather than coroutine w/o waiting extra) 3. setNodeOutputErrors should not have ability to set execution status to success. rev1. initial import rev2. reworked the calls to setNodeOutputErrors: addError was brought out of it as we can set the node execution error based on prepare.env or execution. rev3. did not mean to add BlueprintRuntimeService change Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I6d509df5ae51598f33ab9f0ea53806d653cf79c0
2020-07-08cmd-exec server-side timeout.Oleg Mitsura1-1/+1
Issue-ID: CCSDK-2535 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I897678a5a8a23503a878f2d3eb836ba4597a6e6e
2020-07-02Command Executor : Invalid response_data when executed script failsJulien Fontaine1-18/+18
* Modified command exec returned value in case of failure during execution. It now prints the response_data defined by the user * Modified truncation method of the gRPC returned object to use ByteSize() to get the exact sizxe consumed within the buffer Issue-ID: CCSDK-2501 Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca> Change-Id: Ie1db8db265623b5137ab3946ff4e3abda1c54a78
2020-06-26cmdexec should return status=FAILURE on errorsOleg Mitsura1-40/+47
Issue-ID: CCSDK-2445 In certain cases, status message is returned on error instead of status=FAILURE. rev 2: reuse same msg rev 3: past elalto, compoment level timeout is implementation.timeout Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I2651e5706b7e62894c5e071dc1563fb1b9dd67e1
2020-06-18Missing note of timeout differences.Oleg Mitsura1-3/+8
rev1. initial commit rev2. spacing (silly klint!) Issue-ID: CCSDK-2445 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: Ie8cc62c89e212efbf5240304856b79c173c88abb
2020-05-05Truncate message published on Kafka / Spike: Define solution for logs separationJulien Fontaine1-23/+74
Refactoring of cmd-exec component - Improve display of error messages within the response - Fix gRPC buffer limitation (4Mb) by truncating error messages and cmd-exec logs if too heavy (>3Mb) Truncation of BP responses (<4Kb) before sending them in kafka audit topics. - Truncation if needed of error messages for every response - Truncation of cmd-exec logs in cmd-exec responses (Spike) Add a flag in the application.properties to enable/disable the display of cmd-exec responses on the BP side (Fix) Correction of BP processing with kafka regression (Fix) Changed default SSL Endpoint Algo Issue-ID: CCSDK-2326 Change-Id: If4d0e661117d1dd156cf19c95774824e754d870a Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca>
2020-04-09Merge "Improving CMD-exec err msgs/handling."Dan Timoney1-16/+51
2020-04-08Improving CMD-exec err msgs/handling.Oleg Mitsura1-16/+51
Issue-ID: CCSDK-2049 rev1. initial commit rev2. added better logging/passing errors. rev3. bugfixes rev4. bugfix for CommandExecutorServer.prepareEnv return status was still returning bool. (was caught only during a defective mariadb pip package install!) Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: Ifbddaeb0e15857f42b121af10e30e29dec5c20b2
2020-04-08Merge "Refactoring BP Code with ErrorCatalog"Dan Timoney1-0/+6
2020-04-06Refactoring BP Code with ErrorCatalogBrinda Santh1-0/+6
Issue-ID: CCSDK-2124 Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com> Change-Id: Ief468a56f9e7b3ef86c357965aa7b15f0a4cfa22
2020-03-30execution timeout not respected...Oleg Mitsura1-9/+25
Issue-ID: CCSDK-2012 rev1: initial commit rev2: reworked + added grpc deadline rev3: wrong err msg.. rev4: timeouts in millis rev5: timeout defaulting was after logging... Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I02eb414904cc5dfcf51ff7b7552dafe54857ed1e (cherry picked from commit 3f56fcfec7d14e7351280b9e2a1d220638626693)
2019-12-30Runtime services for Relationship Type and TemplatesBrinda Santh2-2/+2
Added and improved blueprint runtime service property resolution api. Relationship template CBA sample Performance improvement on Artifact resolutions. Added connection config DSL for DB, GRPC connections. Added starter relationship connection config models. Issue-ID: CCSDK-1054 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I73e1deed708dc924352867ddd1d1b2271c8ea106
2019-12-11Separate jython implementation and dependencies.Brinda Santh5-8/+325
Refactored cds python capabilities to python-executor function, so that it will easy to disable and deprecation This change is not jython depreciation, just separating out Issue-ID: CCSDK-1865 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I3727d72d7195c49d670c30a6fc4245f5a8599e3a
2019-11-26Formatting Code base with ktlintSingal, Kapil (ks220y)4-60/+98
No Business logic change, just the code format. Competible with IntelliJ: https://github.com/pinterest/ktlint#option-3 To format run: mvn process-sources -P format Issue-ID: CCSDK-1947 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: Ic9e9209fb7023d77f434693ad5a01229f8d09331
2019-11-19Changes return value from boolean to typical process return code;Serge Simard1-23/+29
Also ensure that if environment preparation does not succeed the processing fails. Issue-ID: CCSDK-1855 Signed-off-by: Serge Simard <serge@agilitae.com> Change-Id: Iab2ec8b44a0e9e7edef68d0d5c13860eedc5be67 Signed-off-by: Serge Simard <serge@agilitae.com>
2019-10-24Improve Remote Python Executor error handling and allow for structured responseSerge Simard1-9/+41
Issue-ID: CCSDK-1855 Signed-off-by: Serge Simard <serge@agilitae.com> Change-Id: I924918fb06a5a0f118772dedaa41c536c7eca9e7 Signed-off-by: Serge Simard <serge@agilitae.com>
2019-08-09Add resource source template DSL.Brinda Santh1-38/+40
Change-Id: If68ce2e944700cb19380d34ff3b466a9c8633472 Issue-ID: CCSDK-1577 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-08-09Add property definition type DSL.Brinda Santh1-5/+5
Change-Id: I83a3d1391c60cd426236b55d0d399e273e7c15dc Issue-ID: CCSDK-1577 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-08-01Add remote python executor DSL propertiesBrinda Santh2-0/+164
Change-Id: I7888ac302da2a51ca34c531b7553d04af13786ac Issue-ID: CCSDK-1380 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-07-17Enable dynamic remote python executorAlexis de Talhouët1-12/+19
Change-Id: I77a60de87acec862ce47256557a1223fefe82a12 Issue-ID: CCSDK-1497 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-07-10Python executor parameters sorted again.Oleg Mitsura1-10/+12
Issue-ID: CCSDK-1468 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: If8eb50fc2e8dfa084e486b02ace163eee1bfac77
2019-07-08Merge "Remote Python executor unescapes script parameter values"Dan Timoney1-2/+14
2019-06-25python-executor will provide output line-by-lineOleg Mitsura1-3/+4
* python-executor STDOUT contains cleaner logs * return status has been reworked to return a list of lines Issue-ID: CCSDK-1404 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: Ib17495e92a136ff4f950bb6e049246a9e100eb7d
2019-06-21Remote Python executor unescapes script parameter valuesSerge Simard1-2/+14
Issue-ID: CCSDK-1426 Signed-off-by: Serge Simard <serge@agilitae.com> Change-Id: I919e30b76bb472b4e0aeeb2294f0b3087a655efd
2019-06-14Python executor: Execution command and prepare environment logSteve Siani1-0/+2
Also fix error messages return when something goes wrong. Issue-ID: CCSDK-1404 Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com> Change-Id: Ifff396d8cee8d6608b6fb32d3a8e941a253ba24c
2019-04-24Multiples fixesAlexis de Talhouët1-0/+1
Change-Id: I83782006dc47a224e546b6877070d5e7e56dd2e6 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Delete the deployed blueprint if overriten Change-Id: I7e4f3a5c98388a965ef756467497ed31d23bc047 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Fix enhancement of workflow step for component Change-Id: I62c7904265495edb2b0a5bec0d64cfecd7573f97 Issue-ID: CCSDK-1168 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Update golden package Change-Id: I969fe9cf9b563911ebe4500fe8f3211aedb84593 Issue-ID: CCSDK-1231 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Do not fail to get execution property When prepareEnv fail, we should not fail by saying to property is not set. So set it as N/A until is get sets further done in the processing Change-Id: I06b9fcb9b1cf9e1605cef77864da9dbd18243800 Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-04-24Rework remote command argumentsBrinda Santh1-27/+25
Change-Id: Ibd24ce87ed67aee6ae1a66fc9ec6af35bee5008a Issue-ID: CCSDK-1215 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-04-23Support for dynamic property in command argsAlexis de Talhouët1-3/+6
Change-Id: I47c65557a553c79fefbbc28f8dab54b1c0a4a798 Issue-ID: CCCSDK-125 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-04-22Update package type nameAlexis de Talhouët1-16/+7
- split log output: prepare-env and exec-cmd - fix proxy support when not provided Change-Id: I40cdf90e7e3ebe31b0152923f8b6a38f6b6e9ca0 Issue-ID: CCCSDK-125 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-04-18Add support for Ansible packagesAlexis de Talhouët1-6/+8
- rework how to provide packages - support proxy as parameters Change-Id: I1d10d921ead0837aa0f74b965cadf985424ceedc Issue-ID: CCCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-04-16Add support to command to execute for remote pythonAlexis de Talhouët1-1/+3
Change-Id: I043ea301faf87fb487204180a3294de0a76d3543 Issue-ID: CCSDK-1164 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-04-16Integration Test - Component ExecutorAlexis de Talhouët1-13/+34
Change-Id: Icbe745b30c7bbb973bc9bb29bf547340b32f1b0f Issue-ID: CCSDK-1164 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-04-16Add remote scripts cbaBrinda Santh1-11/+9
Change-Id: Icc11ed1f2e229c92a7b46611087bb868ccd265b4 Issue-ID: CCSDK-1215 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-04-16Add grpc execution serviceBrinda Santh1-21/+33
Change-Id: Icfbd9cef8775f2f72329ec726309d14377b9188a Issue-ID: CCSDK-1215 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-04-16Add grpc property serviceBrinda Santh1-1/+1
Change-Id: Ifa1975235433ef3e84b0ed1261375108809946f4 Issue-ID: CCSDK-1215 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-04-16Add remote python executorBrinda Santh1-0/+101
Change-Id: I288e182847f250c8e26e9bc10b8f3124afc2f583 Issue-ID: CCSDK-1215 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
2019-04-04Improve step data access.Muthuramalingam, Brinda Santh1-2/+2
Change-Id: I3917905b1e38cebcb26e4422784a5553e2dbac9f Issue-ID: CCSDK-1127 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
2019-04-01Improve function interfacesMuthuramalingam, Brinda Santh2-19/+51
Change-Id: I24f45d39ac05491a4217101e00bcbf8d122e4e1a Issue-ID: CCSDK-1137 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
2019-03-25Migrate ccsdk/apps to ccsdk/cdsAlexis de Talhouët1-8/+8
Issue-ID: CCSDK-1177 Issue-ID: CCSDK-1178 Change-Id: I0c02702fbec52211ca367abbba72aebecee8cbaa Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-02-20Add component function scripting serviceMuthuramalingam, Brinda Santh5-261/+2
Change-Id: I7c5b49617823dd623566fb4be4d431012420e17c Issue-ID: CCSDK-959 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
2019-02-12Add netconf script component functionMuthuramalingam, Brinda Santh3-50/+107
Change-Id: I094025fba5626bae0b4b13320f1cbbb76cda3bfd Issue-ID: CCSDK-790 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
2019-02-12Fixes: manual integration test of CDSAlexis de Talhouët4-33/+39
- support to overwrite cba - fix map to json - finish meshing - fix python context not having the bluePrintRuntimeService injected - load all properties in the properties store Issue-ID: CCSDK-414 Change-Id: I6b65201529d0ffd9c3e18023a33e0081236b01de Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2019-02-12Jython execution component and serviceSteve Alphonse Siani7-150/+176
Change-Id: I2610e73a9c7ba073b5fa9d148dcd6fb5b9ad9ae3 Issue-ID: CCSDK-696 Signed-off-by: Steve Alphonse Siani <alphonse.steve.siani.djissitchi@ibm.com>
2019-01-17Resource Resolution ServiceSingal, Kapil (ks220y)1-2/+2
Enhancement to the Resource Resolution Service to add ResourceResolutionRunTimeService Change-Id: Ia0799447e8a71e7455c5a18abc08dce503db6d35 Issue-ID: CCSDK-958 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
2019-01-11Resource Resoulution ServiceSingal, Kapil (ks220y)1-2/+3
Implement Input Resource Resolution Processor Service along with Resource Resolution Utilities Change-Id: Ibb4899e415f4b79cd6cd1b190b0f4969b09c3fe4 Issue-ID: CCSDK-936 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
2018-12-17Change to base sli provider interfaces.Muthuramalingam, Brinda Santh(bs2796)1-4/+4
Change-Id: Icf16aa602ba107e2b2095f756f0c3af6f38891f5 Issue-ID: CCSDK-672 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
2018-12-04Add Netconf Executor Function moduleMuthuramalingam, Brinda Santh(bs2796)3-15/+42
Change-Id: If264e63d4fc4305bc26dc6b249a462afefcbfe1e Issue-ID: CCSDK-790 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
2018-11-30Add Jython Component model and validation logics.Muthuramalingam, Brinda Santh(bs2796)2-4/+56
Change-Id: I2bdba0016a41e16198d60be68dff68d1ce7ad13a Issue-ID: CCSDK-696 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>