summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/resource-resolution/src
AgeCommit message (Collapse)AuthorFilesLines
2021-07-28Revert "Renaming Files having BluePrint to have Blueprint"1.1.5Jozsef Csongvai38-382/+382
The renaming in CCSDK-3098 caused breaking changes to the grpc api and compile issues for kotlin scripts. Issue-ID: CCSDK-3385 Change-Id: I0d745cb858371678eabcb2284671c1fd76a1ab6d Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
2021-03-24Refactoring to enable on_failure for imperative workflowJozsef Csongvai13-23/+26
BlueprintError needs to associate errors with the steps in which they occurred in order for imperative workflow to handle on_failure properly. Made stepName more accessible and corrected places where stepName was assigned to nodeTemplateName. Issue-ID: CCSDK-3219 Change-Id: I7e5805745c63558cff6be533e1b99c32ad06c3db Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> (cherry picked from commit b96b44d6d7ca11dbbc3ad4bd2194df31fba5efb6)
2021-02-17Fixed null pointer exception for JSON RALukasz Rajewski1-1/+3
Fixed null pointer exception for JSON RA Issue-ID: CCSDK-3170 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I721ff7966a1c1bd99ab948cdc410f05688ddea23
2021-01-22Renaming Files having BluePrint to have BlueprintKAPIL SINGAL38-391/+391
Replacing BluePrint with Blueprint throughout Issue-ID: CCSDK-3098 Signed-off-by: KAPIL SINGAL <ks220y@att.com> Change-Id: Ibee8bad07ae7d9287073db2d4f2f2cd730fa8b96
2020-12-16Fixed NoClassDefFoundError when USE_SCRIPT_COMPILE_CACHE is set to falseJulien Fontaine4-18/+2
USE_SCRIPT_COMPILE_CACHE set to false cleans the Class Loader cache after each kotlin script execution. When several kotlin script are executed in parallel (ie no dependency between them) and USE_SCRIPT_COMPILE_CACHE=false then the class loader from the cache may be deleted before one of those executed kotlin script get the time to finish which to the NoClassDefFoundError. Removed cleanupInstance method for kotlin script executors that where causing the class loader to be removed prematurely. Now the behaviour is to remove the class loader from the cache only when we publish a new CBA which was already the case when CDS run with a single instance. In cluster mode, a topic has been added to hazelcast to allow the instance publishing the updated CBA to communicate to the other instances by sending a message to clean the class loader for this CBA from their cache. Added mutex on kotlin script compilation to fix race condition. For concurrent kotlin script execution each process wanted to compile an executable but it was causing a race condition if a process tries to execute while another still compile. Mutex on the execution path prevent this behaviour Issue-ID: CCSDK-3052 Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca> Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I6ab002352b3272898ad0b183341ee664652c8ae3
2020-12-14ResourceResolution should fail if required resource did not resolve -edge casekuldipr1-2/+5
Issue-ID: CCSDK-3022 Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: Ia88a86f13c693a7bcd2d61cdfb5c2e39041b5a31 Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
2020-12-04ResourceResolution should fail if required resource did not resolvekuldipr2-14/+28
Issue-ID: CCSDK-3022 Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: I6ca858988f0b11bdf3bbde07e8f4bde939342aa2 Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
2020-12-02CDS Fix Swagger issuesPiotr Stanior2-2/+2
Fixed unique id generation for overloaded method. Changed example values in ApiModelProperty annotation to fix issues in Swagger json file. Issue-ID: CCSDK-3014 Change-Id: If83dc88187b62346182d1fb4b753aae544bbc322 Signed-off-by: Piotr Stanior <piotr.stanior@t-mobile.pl>
2020-10-28Enable retrieving ResourceResolution objects from database in kotlin scriptskuldip Rai1-0/+19
Issue-ID: CCSDK-2949 Change-Id: I9605d8cdb2a61cba45c56f3dcc12740d4da0b5c8 Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
2020-10-21Update AAI endpoints to /aai/v22 for HonoluluLasse Kaihlavirta1-1/+1
- Update all /aai/v21 references to /aai/v22 for Honolulu - note that the previous https://gerrit.onap.org/r/c/ccsdk/cds/+/114057 was for Guilin only Issue-ID: CCSDK-2914 Signed-off-by: Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com> Change-Id: I8103b12610a9de7263789a0852140f2f0bb09393
2020-10-20Update AAI endpoints to /aai/v21Lasse Kaihlavirta1-1/+1
- Update all /aai/v14 references to /aai/v21 to resolve certificate problems in CDS when trying to resolve attribute values with aai-data source Issue-ID: CCSDK-2914 Signed-off-by: Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com> Change-Id: I6b150348b66e93b3d08ceaa49fa997d531ddb0e4
2020-10-13master: missing input shouldn't fail processOleg Mitsura2-16/+21
Issue-ID: CCSDK-2876 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I76279fee8adc91a3aed72c624c24e93c9cf9dea4
2020-10-06Fix resolution of keyIdentifiersJozsef Csongvai2-4/+4
Issue-ID: CCSDK-2875 Change-Id: Ie089ee7f186f74691556f65a52fbaa7c6c165061 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
2020-09-22Enabling Code FormatterSingal, Kapil (ks220y)34-272/+357
Code Formatter was turned off due to java 11 migation Issue-ID: CCSDK-2852 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I3d02ed3cc7a93d7551fe25356512cfe8db1517d8
2020-09-02Adding parent pom referenceSingal, Kapil (ks220y)1-1/+1
Adding parent pom to cba-assembly-descriptor as it needs to inherit repository from parent so maven-deploy-plugin works Issue-ID: CCSDK-2720 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I44ce3721f280555b81475580ca47539ae83d07ca
2020-06-09Add ResourceResolutionResult to ResourceResolutionServiceJozsef Csongvai7-51/+60
In order to ensure consistent behavior for assignment-map, supporting occurences and multiple artifact-prefixes, ResourceResolutionService needs to return assignment-map alongside generated template content. Issue-ID: CCSDK-2389 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I54c1991d23d65217f3492b08a2170a6d41b6482d
2020-05-27Fix sub-attribute parsing for accessing resolved valuesJozsef Csongvai6-1/+43
Added assignment-map attribute to ResourceResolutionComponent. This attribute will hold a json object with the resolved values for each artifact-prefix. It will enable accessing any resolved value, using get_attribute with JsonPath. Issue-ID: CCSDK-2389 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I3441569d9766fbd79703d2f224de448edd56dbb2
2020-05-19Improve logging for ResourceAssingmentUtilsJozsef Csongvai2-7/+16
Sort keys for generated resource param data logging Issue-ID: CCSDK-2381 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: Iea0a88fbe915e41e399ced45d842a8ef14d052c1
2020-05-18Add Naming Service & IP Assign custom resource resolution capabilityPaira, Saurav(sp694w)7-22/+1052
Issue-ID: CCSDK-2185 Signed-off-by: Paira, Saurav(sp694w) <sp694w@att.com> Change-Id: I70550fe9582b2db0a70c7b66591438b674173411
2020-04-30Fix null safety - ResourceResolutionDBService.writeJozsef Csongvai2-5/+29
Issue-ID: CCSDK-2352 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I49a56dff0636617111f02be141764600e0a1e082
2020-04-29RestResourceResolutionProcessor should always set StatusJozsef Csongvai1-0/+3
Issue-ID: CCSDK-2350 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: Ieadfb9b5931808f9eb298aa913d32cabbad67e2e
2020-04-16Fix default behavior for DatabaseResourceAssignmentProcessorJozsef Csongvai1-3/+3
If a data-dictionary did not declare an endpoint-selector, it would default to primary cds-db instead of using data-dictionary source to look up database configuration. Processor-db configurations were not used because of this. Also improved error messages and some refactoring. Issue-ID: CCSDK-2315 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I7122e1334951db4eec5b9ae8b01c1f66596636f6
2020-04-10Merge "Enable inline templating in mapping files"Dan Timoney4-0/+53
2020-04-09Fix parsing error for RestResourceSourceJozsef Csongvai2-2/+3
Issue-ID: CCSDK-2310 Change-Id: I3587187b115797ce00ffd8c9125d9ee5035e25be Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
2020-04-09Enable inline templating in mapping filesJozsef Csongvai4-0/+53
Issue-ID: CCSDK-2306 Change-Id: I9657eb73b48659edfc1adfd842ed96f35a095197 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
2020-04-08Merge "Refactoring BP Code with ErrorCatalog"Dan Timoney4-4/+28
2020-04-06Refactoring BP Code with ErrorCatalogBrinda Santh4-4/+28
Issue-ID: CCSDK-2124 Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com> Change-Id: Ief468a56f9e7b3ef86c357965aa7b15f0a4cfa22
2020-03-31Fix ResolutionSummary - return empty string instead of nullJozsef Csongvai2-9/+31
Issue-ID: CCSDK-2246 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I894bf605ee7f5b094d015fd637979ce055da5081
2020-03-19Fix kotlin cache lazy loadingSebastien Premont-Tendland2-0/+10
When USE_SCRIPT_COMPILATION_CACHE is set to false the classLoader is closed after the class is instantiated. This is causing an issue when lazy loading is happening during the script execution. Lazy loading occurs when a suspendible function returning something is called from "processNB", kotlin will create a second class that will be loaded during execution (needs to be in the classpath during execution). Issue-ID: CCSDK-2150 Signed-off-by: Sebastien Premont-Tendland <sebastien.premont@bell.ca> Change-Id: I64780287352d762325662e0e5d5b94038dedee7f
2020-03-09add a rest endpoint to remove resourcesJulien Fontaine3-0/+44
Issue-ID: CCSDK-2159 Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca> Change-Id: I504fa0aad6f4e7105a53e793d08d08d92bbb8df4
2020-03-03Add properties to ResolutionSummaryJozsef Csongvai3-19/+40
Also wrapping ResolutionSummary response to ease integration with SDNC. Issue-ID: CCSDK-2038 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: Ic1b8959e22ef795065d37664fb60f100af235a90
2020-02-28Fix - ResolutionSummary should contain resolved request-payloadJozsef Csongvai3-2/+3
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I87db63edcef6157da1f498bc9ab1af3cddf8c49a Issue-ID: CCSDK-2038
2020-02-21Eliminate Template RequirementJozsef Csongvai10-23/+260
Enables resource assignment without the use of a template. If no template is defined by the CBA, the default output is a kev-value map. If operation input: resolution-summary is set to true, output will be a list of ResolutionSummary. Issue-ID: CCSDK-2038 Change-Id: I5f6bcefcacec6e83cffac1134b13690b500a7563 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
2020-02-13DB resolutions are picking inputKeyMapping values from DDSteve Siani1-1/+1
Issue-ID: CCSDK-2092 Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com> Change-Id: I07e726ae038bbad853d789841942e98c62b1e0a8
2020-02-12Refactoring Resource Resolution ServiceSingal, Kapil (ks220y)2-25/+33
Removing Node Template dependency Issue-ID: CCSDK-2078 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I24f3e003c64f3ee40eee4699366cfadfc1d7147e
2020-01-31Spring boot, Kotlin version upgradesBrinda Santh3-16/+17
Dependent Patch : https://gerrit.onap.org/r/c/ccsdk/parent/+/100990 Fixed Jackson set method according to latest version. Fixed Security properties issues for failed JUnit test cases. Reused maven properties from parent for Spring boot, Nats, Kafka, etc Issue-ID: CCSDK-1737 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I04bb0e535161e05897f587a0f08a2689e10c5f41
2019-12-31Flexible DSL Types and Templates definition.Brinda Santh1-4/+24
Easy search definitions Types and Templates inside ServiceTemplate DSL builder. Unit test modifications to support this change. Issue-ID: CCSDK-1054 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: Ie944ff5f75f80c852555306e1a4e0fa7f5b803d7
2019-12-30Relationship Type and Templates modelsBrinda Santh1-11/+11
Enrichment Support for Relationship Types and Templates. Relationship DSL support for ConnectTo connections ( RestClient, SshClient, MessageProducer, MessageConsume, Nats) Moved datatype map from collection to complex type Issue-ID: CCSDK-1054 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I0f18db2cb52e1e93dfab04498b8298587cba2540
2019-12-24Refactoring log-protect for hiding sensitive data in logsJozsef Csongvai3-25/+9
Issue-ID: CCSDK-2010 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I72a4d8d49a202cea0fa1a200c7466300de1ff0b0
2019-12-11Metadata for name, version, tags and typeBrinda Santh2-8/+11
Mandate Tosca.meta template name, version, type and tags. Auto copy metadata from Tosca.meta to ServiceTemplate definitions. Optimize Blueprint context and runtime creation from file path. Removed attached CBA zip file in test repository dirs Issue-ID: CCSDK-1992 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I5d9d7a4599234a38d431328dbd9b74bd831e0115
2019-12-11Separate jython implementation and dependencies.Brinda Santh1-22/+15
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-29Optimize spring data JPA UT.Brinda Santh15-50/+159
Test case based database configuration, so that we can define what repositories and entities can be used for testing. Issue-ID: CCSDK-1735 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I4f8a7eb4ed47fec9ab17eb9552648ebd0de01236
2019-11-26Formatting Code base with ktlintSingal, Kapil (ks220y)42-774/+1307
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-18Merge "CCSDK-1603:Changes in 'Config via netconf' BP to pull data from AAI"Dan Timoney2-1/+5
2019-11-13CCSDK-1603:Changes in 'Config via netconf' BP to pull data from AAItragait2-1/+5
This commit includes changes in blueprint for "Configuration over netconf", So that CDS can fetch data from AAI. It has enhancement in UAT test yaml file, so this blueprint can be tested. An enhancement is also included to introduce request headers in the source-rest. Change-Id: I4ff973538249925239b89da4c5720ec63ffe8037 Issue-ID: CCSDK-1603 Signed-off-by: tragait <rahul.tyagi@est.tech>
2019-11-09Convert component functions IT to UT.Brinda Santh4-14/+13
Issue-ID: CCSDK-1735 Convert Netconf and Restconf Executor IT to UT. Remove duplicate BluePrintProperties. Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I2eafdbabb17a4df72541ab93c46e7fc9eb0fe8d7
2019-11-04Extension support for db configuration.Brinda Santh1-1/+2
Issue-ID: CCSDK-1046 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I404855eac4520f79ac33f70710dcdb6ae285891d
2019-10-29Provide ongoing occurrence value for scriptingAlexis de Talhouët2-0/+7
This patch fixes this for template https://gerrit.onap.org/r/#/c/ccsdk/cds/+/95081/ but not for script, where the occurrence value might be needed. In reality, this overall occurrence thing is a mistacke, but it's solving an issue that I yet don't know how to properly solve. Change-Id: I7f8579ad2bde3f96b06aaf09c8b8c67d4b97e7b0 Issue-ID: CCSDK-1693 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com> Signed-off-by: Shaaban Ebrahim <shaaban.eltanany.ext@orange.com>
2019-09-27ResourceAssignmentUtils Junit FixesSingal, Kapil (ks220y)1-2/+2
Fixing Junit which are failing in Windows due to carriage return type Issue-ID: CCSDK-1763 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I83ba91608683963b839bf5bd3afb8509ef947e11
2019-09-26Resource Resolution RefactoringSingal, Kapil (ks220y)2-1/+3
Refactoring some logging statements and adding new loggers Issue-ID: CCSDK-1748 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I5676659eea01056a7d29206f13473a4361516755