aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/resource-resolution/src
AgeCommit message (Collapse)AuthorFilesLines
2023-04-26Adding some minor featuresSingal, Kapil (ks220y)1-6/+6
* Adding proxy and ssl context to CloseableHttpClient * Adding paged capability to ResourceDictionary GET API, and adding POST APi to bulk load resource definitions * Adding more packages to swagger-maven-plugin to get more RestCOntroller generating swagger doc * Fixing maven artifact versions all places Issue-ID: CCSDK-3895 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I096f80a2326cd00068029330b241da209e46e31d
2022-10-04Fix the transform-templating for referenced complex typesLukasz Rajewski3-1/+75
After fix the transform-templating will be closer to the velocity artifact templating mechanism, what was not a case before, when templating with complex variables like json was not working. Issue-ID: CCSDK-3774 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: Icd5001cb2ea2de0220fe65a7c9c0510d1fba0911
2022-09-01Templating constants added to ResourceAssignmentLukasz Rajewski7-43/+55
Fixed values of inputs for resource assignment allow to build data dictionaries that are generic. Along with templating of outputs mapping, path, url and payload sdnc and aai dictionary entry may be one for support of all the attributes of specified object like for instance generic vnf one. Issue-ID: CCSDK-3716 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I1817303e997a4dfb7dda9c32d9ac690ec723b3d8
2022-09-01Resolution processors tests and extendabilityLukasz Rajewski11-203/+233
- Open resolution processors for in-CBA customization - Improve resolution tests verification - Use RestProcessor for testing RestProcessor Issue-ID: CCSDK-3716 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I7c05fc940647f40c20c37b4f7fcfe29f2c3076ba
2022-09-01CDS max-occurrence featureJuhi Arora6-3/+267
As part of occurrence feature, one or more version of the resource resolution can be resolved. However, user did not have granular control in case the user wants to resolve a specific value once and never again. Max-Occurrence feature implements the granular control to be give the user an option to specify the max number of times a resource to be resolved. It is specified as part of mapping in a cba. Max-occurrence value of 0 or not specifying it explicitly denotes the current default behaviour of unlimited resoltions. If a user specify a particular max-occurrence value then the resource is resolved that many times in subsquent requests and never again once we reached the max-occurrence limit of resource resolutions. Issue-ID: CCSDK-3736 Change-Id: Ie18764a313530e36be14531d8c7b93bf54f0b651 Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
2022-08-31Change SQL query syntax for delete resource/templateJozsef Csongvai4-21/+35
The delete query does not work with Mariadb version 10.1.24. Changed the syntax so that it will work with both older and newer versions. Typo in method names has been fixed as well. Issue-ID: CCSDK-3735 Change-Id: I225752d62068e5aa44354624aa6542a4f4bae73b Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
2022-08-31Add component for deleting resources and tempatesJozsef Csongvai2-0/+406
Users can now add component-resource-deletion as a nodetemplate in their CBA. This will delete resources and templates created by the cba, using resolution key or resource-id and resource-type. Issue-ID: CCSDK-3735 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: I22b7f2fe3369a3e5bac3b72a2114a81622d878dc
2022-08-29Add endpoint for deleting templatesJozsef Csongvai3-0/+162
Issue-ID: CCSDK-3735 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: I80d0da87651933da103e79d878902da743bb134e
2022-08-26Rest resolution enhancementsLukasz Rajewski1-8/+41
- Empty Output mapping means for JSON/MAP all keys and for other types extracting of primitive - Empty response is mapped to value is output mapping is empty (but not null) Issue-ID: CCSDK-3716 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: Ib67507eba07e08fad049307f7b69f7aac4c3ec45
2022-08-25Template headers, path and outputsmapping in the rest processorLukasz Rajewski1-9/+16
Issue-ID: CCSDK-3716 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I4abc2cdf3eeff1d982d2e96670df262cf16931b3
2022-08-24Refactor rest clients and support timeoutsLukasz Rajewski1-5/+6
- Refactored rest clients to remove redundant code - Timeouts added to the configuration of rest clients Issue-ID: CCSDK-3716 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I706b8efd8447570455b8b65bd5b1a22da474f62b
2022-08-03Enable deleting resources by lastN occurrencesJozsef Csongvai3-16/+166
Also enable deletion using resource-type and resource-id. Issue-ID: CCSDK-3735 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: Id1b487fce97f582bd3781dfd5bcff61a8df08c5c
2022-07-19[Blueprintsprocessor] Use all source-db resources instead of only processor-dbMichal Jagiello3-4/+39
In DatabaseResourceAssignmentProcessor class filter resourceSourceMappings to get all source-db resources instead of using only one: processor-db Issue-ID: CCSDK-3699 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I616ca6fe1336427b0b603a0386878ba4c8ea5828
2022-07-18Aligned attributes of CDS componentsLukasz Rajewski2-0/+5
Issue-ID: CCSDK-3698 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: Ie5c78a9a347373b5faf588627e42138806d69c0c
2022-07-12Change template query to return a result when duplicate rows existskuldipr1-0/+19
Issue-ID: CCSDK-3714 Change-Id: I516efc75d5d789903883437b6f3b50874bcfc79a Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
2022-05-24Merge "Extend Template API to retrieve resolutions by occurrence"Jozsef Csongvai3-0/+230
2022-05-24API to resolve resources based on optional 'occurrence' optionskuldipr3-2/+216
User can specificy options to get firstN, lastN and by the Range (begin, end) of 'occurrence' to get the resolutions. If no options are specified, all the resolutions are returned in decending oder (latest on top). Map of resolutions are returned with 'occurrence' as the key to the corresponding list of resolutions. Issue-ID: CCSDK-3665 Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: I9ecbfb339bde76510e81cd695e03cc1e061396ee
2022-05-24Extend Template API to retrieve resolutions by occurrencejuhi arora3-0/+230
Add new endpoints - template to get firstN, lastN and by Range (begin, end) of 'occurrence' to get the templates Issue-ID: CCSDK-3666 Change-Id: I242626e826022ed8b70a0abc287560ea634121b7 Signed-off-by: juhi arora <juhi.arora1@bell.ca>
2022-05-24Enable versioned resource resolution by using occurrencekuldipr6-8/+356
By setting occurrence to <= 0 in the CBA, a user indicates that each time resource resolution executes, it should produce a new set of values for a resolution-key or (resourceId, resourceType) pair. For each new execution, the occurrence is incremented to serve as the version number for the new set of values. Issue-ID: CCSDK-3663 Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: Ib535b20cb775dcbb5b02fe5a5f6904a335fda310
2022-05-23Merge "Enable force-resolution"Dan Timoney4-7/+28
2022-05-19Resource endpoint should support occurrencesKuldip Rai3-10/+19
The getOneFromResolutionKey endpoint would fail if there are multiple occurrences for a resource. Instead it should return the last occurrence. Issue-ID: CCSDK-3664 Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: I1468c41c164f64931ce719f9908b935baae6e1a4
2022-05-19Enable force-resolutionOleg Mitsura4-7/+28
If force-resolution is set to true in a CBA, all resolved values and templates will be overwritten for the given resolution-key or resource-id & resource-type. Issue-ID: CCSDK-3670 Change-Id: I1859a7029a16190a6e691cb1fa0c76ced470279a Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
2022-05-16Re-enable formatting and fix formatting issuesJozsef Csongvai6-21/+28
Issue-ID: CCSDK-3657 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: Idd1871e82a319325b042c339741a66c06499692c
2022-03-23Add indexes to Template/Resource resolutionOleg Mitsura2-2/+15
Issue-ID: CCSDK-3611 Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I7e761a3a7bd6a107748a4d90d3a335ebf77a759b
2022-01-17Add functions for retrieving multiple artifactsArne Chrestin5-4/+120
Add the functions AbstractComponentFunction .storedArtifactNamesAndResolutionKeysNB() to retrieve all artifact_names and resolution_keys for a given blueprint and AbstractComponentFunction .storedResolutionKeysForArtifactNameNB(artifactName) to retrieve all resolution_keys for a given blueprint and artifact_name. To support the required JPA query, an interface TemplateResolutionSelector was added in resource-resolution. Issue-ID: CCSDK-3543 Signed-off-by: arne.chrestin@telekom.de Change-Id: I1907949e49134ec13d28a876474f08502759762f
2021-07-28Revert "Renaming Files having BluePrint to have Blueprint"Jozsef 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-05-13Add MS SQL driver in CDS blueprints andPrudence Au1-4/+4
DB resolution fails on an empty dataset with required template mapping. Issue-ID: CCSDK-3293 Issue-ID: CCSDK-3294 Signed-off-by: Prudence Au <prudence.au@amdocs.com> Change-Id: I9f302d12e7359b62180fcdfddbd8ae2c993a8324
2021-03-17Refactoring 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>
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>