cps.git
11 months agoMerge "NCMP: Update existing Batch endpoint (Moving url param into rest body)"
Toine Siebelink [Mon, 29 May 2023 08:52:22 +0000 (08:52 +0000)]
Merge "NCMP: Update existing Batch endpoint (Moving url param into rest body)"

11 months agoNCMP: Update existing Batch endpoint (Moving url param into rest body) 30/134530/12
sourabh_sourabh [Tue, 9 May 2023 13:34:59 +0000 (14:34 +0100)]
NCMP: Update existing Batch endpoint (Moving url param into rest body)

- NCMP batch endpoint is updated to accept details into request payload.
- Removed unused code of previous impl.

Issue-ID: CPS-1635

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: Ic290b750557da06b861c5a4a9bb12debc495ec2e
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
11 months agoAvc Event compliant with RFC8641 86/134586/6
mpriyank [Thu, 18 May 2023 13:56:07 +0000 (14:56 +0100)]
Avc Event compliant with RFC8641

- The event section of the payload will be now in the format of RFC8641.
- Once this event is updated , the corresponding code in the dmi plugin
  will be changed
- Schema is present in cps-ncmp codebase so we will create a release and
  then it will be used in the dmi plugin

Issue-ID: CPS-1668
Change-Id: Ibd811f318658d8b510b42575fad5d21357af9047
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
11 months agoNCMP : forward bulk response messages to client topic 00/134200/8
raviteja.karumuri [Thu, 13 Apr 2023 22:44:41 +0000 (23:44 +0100)]
NCMP : forward bulk response messages to client topic

Issue-ID: CPS-1557
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: I0ea040e98987f992f46105afea0a171c4031d64f

11 months agoMerge "LcmEvent to have header now"
Luke Gleeson [Mon, 22 May 2023 08:48:28 +0000 (08:48 +0000)]
Merge "LcmEvent to have header now"

11 months agoEntity ID types do not match types in database definition 68/134568/2
ToineSiebelink [Wed, 17 May 2023 15:40:44 +0000 (16:40 +0100)]
Entity ID types do not match types in database definition

As Liquibase is used, JPA does not manage database definition.
Within Liquibase changelog, only Anchor and Fragment have BIGINT (Long)
IDs. Other entities have INTEGER IDs.

- Change AnchorEntity/AnchorRepository ID type to Long
- Change YangResourceEntity/YangResourceRepository and
  ModuleReferenceRepository ID to Integer
- Modify datatypes of foreign key references in liquibase changelog to
  use correct types for dataspace_id, schema_set_id, yang_resource_id
- Update test liquibase changelog

Issue-ID: CPS-1676
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I26de6712b2e74d166fc5a48b1f8149de6a1e5199
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
11 months agoMerge "Change dmi plugin version to 1.4.0-SNAPHOST"
Luke Gleeson [Wed, 17 May 2023 13:17:25 +0000 (13:17 +0000)]
Merge "Change dmi plugin version to 1.4.0-SNAPHOST"

11 months agoChange dmi plugin version to 1.4.0-SNAPHOST 65/134565/2
halil.cakal [Tue, 16 May 2023 10:06:57 +0000 (11:06 +0100)]
Change dmi plugin version to 1.4.0-SNAPHOST

Issue-ID: CPS-1507
Change-Id: Ic812bd1be455d9df663e018383dd1d5c15359362
Signed-off-by: halil.cakal <halil.cakal@est.tech>
11 months agoMove integration test for adminService 59/134559/2
ToineSiebelink [Mon, 15 May 2023 16:32:28 +0000 (17:32 +0100)]
Move integration test for adminService

- finalized moving of admin service interation test
(just some scenarios were missing)
- deleted old test class (code coverage in RI module dropped)
- line/branch coverage now 100/100 (was 97/91)
- small refactoring; renaming and removed unnecessary check

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ic683548ea5e1e4e252f257c0f1034c5cf76e498d

11 months agoLcmEvent to have header now 44/134544/7
mpriyank [Thu, 11 May 2023 12:55:55 +0000 (13:55 +0100)]
LcmEvent to have header now

- Introduce LcmEventHeader as per our agreement with stakeholders
- The version remains v1 as we just add the header and dont change
  anything in the existing event payload.
- Later we will remove the header fields from the event payload.
- tests modification and little code refractor for dmi data avc as well

Issue-ID: CPS-1695
Change-Id: Ibef1138a6d0cc7ffec50b4c201a4d3417b99e27e
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
11 months agoFixing minor compilation 64/134564/2
waqas.ikram [Mon, 15 May 2023 11:03:33 +0000 (12:03 +0100)]
Fixing minor compilation

- Complilation issues while importing project in eclipse
- Fixing CSIT

Change-Id: Idb85b08066d27a7f2a9b297d1580915df2b67541
Issue-ID: CPS-1672
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
11 months agoRemove dataspace_id column from Fragment table 91/134491/7
danielhanrahan [Thu, 4 May 2023 21:34:41 +0000 (22:34 +0100)]
Remove dataspace_id column from Fragment table

- Remove dataspace_id column from fragment table and drop associated
  index, foreign key constraint and uniqueness constaint.
- Add uniqueness constraint using only fragment xpath and anchor_id.
- Add not-null constraint to anchor_id.
- Update code and test data to remove references to dataspace_id.
- Repopulate the dataspace_id in Liquibase rollback
  (verified with manual testing of update/rollback).

Issue-ID: CPS-1677
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I467cccba25ac5d884ec790064ca58150281b7e1d

11 months agoMove integration test for moduleService 48/134548/2
ToineSiebelink [Mon, 8 May 2023 16:54:46 +0000 (17:54 +0100)]
Move integration test for moduleService

- all modules service interation test moved
- added some aditional scenarios to increase coverage
- removed unused method(s)
- remove javdoc on private methods
- some minor refactoring like replace 'var' with correct type

Issue-ID: CPS-1687
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I03ff1f3562cfe38318e8b9af81be47a1fe667da2

11 months agoSubscription Create Event Outcome Database Part 44/134444/6
halil.cakal [Wed, 3 May 2023 12:22:33 +0000 (13:22 +0100)]
Subscription Create Event Outcome Database Part

- Add mapper to convert subscription response to Yang model
- Add update operation to update Yang model into database
- Change Subscription persistence to support both save and update operations

Issue-ID: CPS-1669
Change-Id: I40cab1052ada5846945c67cac8640c393358e988
Signed-off-by: halil.cakal <halil.cakal@est.tech>
12 months agoMerge "DMI Data AVC to use kafka headers"
Toine Siebelink [Wed, 10 May 2023 14:20:09 +0000 (14:20 +0000)]
Merge "DMI Data AVC to use kafka headers"

12 months agoDMI Data AVC to use kafka headers 80/134480/14
mpriyank [Thu, 4 May 2023 10:24:29 +0000 (11:24 +0100)]
DMI Data AVC to use kafka headers

- POC done keeping AvcEvent schema in mind.
- Approach to have header schema per event schema.
- Moved the header information from AvcEvent to separate AvcEventHeader
  schema.
- Added Jsr303 annotation support for required field check

Issue-ID: CPS-1671
Change-Id: I2e4f969e8ca4f6282d1b9aa5fd52d16174a26084
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
12 months agoMove integration test (DataService) 05/134505/2
ToineSiebelink [Mon, 8 May 2023 16:07:54 +0000 (17:07 +0100)]
Move integration test (DataService)

- dropped ri module coverage to alow for move
- removed performance tests (already better tests in intergration module)
- added 'save' iue cases in new integration-test
- removed no longer used version for save single data node
(todo: remove old tests for similar functionality, will wait until new test cover same)

Issue-ID: CPS-1687
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I4c2e788e0a313938a923cd1e7e52584d739ec6f4

12 months agoMerge "Change default use of Model Loader to TRUE"
Priyank Maheshwari [Wed, 10 May 2023 11:25:24 +0000 (11:25 +0000)]
Merge "Change default use of  Model Loader to TRUE"

12 months agoMigrate cps-ri performance tests to integration-test module 18/134518/2
danielhanrahan [Tue, 9 May 2023 12:33:37 +0000 (13:33 +0100)]
Migrate cps-ri performance tests to integration-test module

- Migrate update and delete data service tests, using openroadm model
- Move module service tests to integration-test module
- Update performance test timings
- Remove all performance-related files from cps-ri
- Remove performance profile from cps-ri pom.xml

Issue-ID: CPS-1687
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Id9d864f8cab0377cb37c7967943d738748e1b6c5

12 months agoMerge "Support for Patch across multiple data nodes"
Toine Siebelink [Tue, 9 May 2023 12:44:19 +0000 (12:44 +0000)]
Merge "Support for Patch across multiple data nodes"

12 months agoSupport for Patch across multiple data nodes 19/134019/17
--global [Wed, 5 Apr 2023 11:38:08 +0000 (17:08 +0530)]
Support for Patch across multiple data nodes

- Added new method updateMultipleDataLeaves to perform Update on
  multiple data nodes
- Deprecated singular method of update data node(updateDataLeaves)
- Refactored code where singular version was used
- Updated release notes

Issue-ID: CPS-1006
Signed-off-by: <as00745003@techmahindra.com>
Change-Id: If67280e2dd3ad566de9a8217489f168415e624bc

12 months agoNCMP: Delete DatastoreType enum from cps-ncmp-rest 13/134513/1
sourabh_sourabh [Tue, 9 May 2023 09:34:02 +0000 (10:34 +0100)]
NCMP: Delete DatastoreType enum from cps-ncmp-rest

- Delete duplicate enum of datastore
- Use datastore from cps-ncmp-service

Issue-ID: CPS-1635

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I36484d6a327c81d81741b18a932fc6a1febfc520

12 months agoChange default use of Model Loader to TRUE 08/134508/1
emaclee [Tue, 9 May 2023 08:18:05 +0000 (09:18 +0100)]
Change default use of  Model Loader to TRUE

Issue-Id: CPS-1688
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: I18bb5e3ad45ccdf5f3a1e88dd5a34dc830e06f4a

12 months agoMerge "Use recursive SQL to fetch descendants in CpsPath queries (CPS-1664 #4)"
Sourabh Sourabh [Mon, 8 May 2023 09:57:37 +0000 (09:57 +0000)]
Merge "Use recursive SQL to fetch descendants in CpsPath queries (CPS-1664 #4)"

12 months agoMerge "Fix and refactor query across anchors (CPS-1664 #3)"
Sourabh Sourabh [Mon, 8 May 2023 09:51:19 +0000 (09:51 +0000)]
Merge "Fix and refactor query across anchors (CPS-1664 #3)"

12 months agoMerge "[CPS] RI: Code Refactoring # Replace '[\s\S]' to '.' as it is same as '.'...
Toine Siebelink [Mon, 8 May 2023 09:26:46 +0000 (09:26 +0000)]
Merge "[CPS] RI: Code Refactoring # Replace '[\s\S]' to '.' as it is same as '.' while grouping in regex # Updated the groovy files to add 'assert' and to replace deprecated method # Removed deprecated 'storeDataNode' method."

12 months agoMerge "Don't handle ancestor-axis using regex quickfind (CPS-1664 #2)"
Sourabh Sourabh [Mon, 8 May 2023 09:06:32 +0000 (09:06 +0000)]
Merge "Don't handle ancestor-axis using regex quickfind (CPS-1664 #2)"

12 months ago[CPS] RI: Code Refactoring 90/134490/1
raviteja.karumuri [Fri, 5 May 2023 13:52:07 +0000 (14:52 +0100)]
[CPS] RI: Code Refactoring
# Replace '[\s\S]' to '.' as it is same as '.' while grouping in regex
# Updated the groovy files to add 'assert' and to replace deprecated method
# Removed deprecated 'storeDataNode' method.

Issue-ID: CPS-1594
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: Iaa5f8b0cc8d66473c993060a8fc5a54e37e373b1

12 months agoFragment Entity does not represent the correct relationship with Anchor 88/134488/1
danielhanrahan [Thu, 4 May 2023 22:19:19 +0000 (23:19 +0100)]
Fragment Entity does not represent the correct relationship with Anchor

FragmentEntity incorrectly has OneToOne relationship to AnchorEntity,
instead of ManyToOne. The reason this has not caused errors so far is
that Liquibase is being used to generate database definition, not JPA.

Issue-ID: CPS-863
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I8d3c5dc19193a84fa59526de7f2cbab7ab20a8fc

12 months agoUse recursive SQL to fetch descendants in CpsPath queries (CPS-1664 #4) 75/134475/8
danielhanrahan [Wed, 3 May 2023 18:51:27 +0000 (19:51 +0100)]
Use recursive SQL to fetch descendants in CpsPath queries (CPS-1664 #4)

- Add recursive SQL method to fetch descendants from queries.
  This changes worst-case complexity from quadratic to linear,
  resulting in extremely large performance increase for large
  number of datanodes.
- Remove RegexQuickFind algorithm as it is no longer faster.
- Updated query performance test timings

Issue-ID: CPS-1664
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: If5f0b54a88af1cb681006bbeca7043345dcdc8da

12 months agoFix and refactor query across anchors (CPS-1664 #3) 74/134474/6
danielhanrahan [Tue, 2 May 2023 19:01:34 +0000 (20:01 +0100)]
Fix and refactor query across anchors (CPS-1664 #3)

- Fix CPS-1580: Query Across All Anchors Does NOT Filter on Dataspace
- Fix CPS-1582: NullPointerException in queryDataNodesAcrossAnchors
- Improve performance of queryDataNodesAcrossAnchors
- Refactor queryDataNodes
- Refactor FragmentQueryBuilder

Issue-ID: CPS-1580
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I8b83d4c580280d8719ab2ac33f3914f53e798774

12 months agoDon't handle ancestor-axis using regex quickfind (CPS-1664 #2) 73/134473/6
danielhanrahan [Tue, 2 May 2023 20:37:56 +0000 (21:37 +0100)]
Don't handle ancestor-axis using regex quickfind (CPS-1664 #2)

This is a preparatory patch to make refactoring easier in CPS-1664 #3

Issue-ID: CPS-1664
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I1f94fef137ae41f7dedc585d8314f13493885d1b

12 months agoMerge "Sensible equals and hashCode for FragmentEntity (CPS-1664 #1)"
Toine Siebelink [Thu, 4 May 2023 14:14:08 +0000 (14:14 +0000)]
Merge "Sensible equals and hashCode for FragmentEntity (CPS-1664 #1)"

12 months agoFix for quickfind with descendants incl. list entries 81/134481/2
ToineSiebelink [Thu, 4 May 2023 10:35:41 +0000 (11:35 +0100)]
Fix for quickfind with descendants incl. list entries

- add specialized regex
- fixed legacy issues with absolute paths (added ^ in regex's)
- split into 2 methods for normal queries and quickfind
- fixed order of private methods

Issue-ID: CPS-1671
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I785a230cd0e3e0359e3cbb0fa754a21b6e2be7ff

12 months agoSensible equals and hashCode for FragmentEntity (CPS-1664 #1) 72/134472/3
danielhanrahan [Wed, 3 May 2023 14:07:34 +0000 (15:07 +0100)]
Sensible equals and hashCode for FragmentEntity (CPS-1664 #1)

Include Anchor and Xpath in equals and hashCode methods for
FragmentEntity. (This also requires adding equals and hashCode for
AnchorEntity and DataspaceEntity.) The combination of dataspace,
anchor, and xpath uniquely identify a fragment/datanode.
This allows FragmentEntity objects returned from query across anchors
to be stored in Set collections.
Performance was observed to be unaffected by the change.

Issue-ID: CPS-1664
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I2c7e3957e392af36f5230d08c9bbd550f44e7444

12 months agoRefactor datatrore handling in API requests 42/134442/4
ToineSiebelink [Wed, 3 May 2023 17:21:46 +0000 (18:21 +0100)]
Refactor datatrore handling in API requests

- Fully parameterized datastore(name)
- Improved controler testing to verify all parameter handling
- Simplified service inject (alwasy using contructors instead of @AutoWire)
- Added delay to fix isuse with intermitting failign test
  that tests invocation of a method that is executed on a separate thread

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Iba5d118d2484badee9c7c90ec7694882f6557d16

12 months agoBump CPS version to 3.3.2-SNAPSHOT 41/134441/1
mpriyank [Wed, 3 May 2023 10:10:08 +0000 (11:10 +0100)]
Bump CPS version to 3.3.2-SNAPSHOT

- Update version properties as well as we prepare for the next release.

Issue-ID: CPS-1666
Change-Id: I44e44ac1755c44d7050ce30c9e40f83628fe9338
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
12 months agoMerge "Add container yaml for 3.3.1"
Sourabh Sourabh [Wed, 3 May 2023 09:54:31 +0000 (09:54 +0000)]
Merge "Add container yaml for 3.3.1"

12 months agoMerge "canUseRegexQuickfind does not test for contains-condition"
Toine Siebelink [Wed, 3 May 2023 09:52:00 +0000 (09:52 +0000)]
Merge "canUseRegexQuickfind does not test for contains-condition"

12 months agoAdd container yaml for 3.3.1 39/134439/1
mpriyank [Wed, 3 May 2023 09:36:30 +0000 (10:36 +0100)]
Add container yaml for 3.3.1

- Step 6 of the release process

Change-Id: I18185934b9c9e801d0269652658ae3965da5b119
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
12 months agocanUseRegexQuickfind does not test for contains-condition 25/134425/2
danielhanrahan [Tue, 2 May 2023 17:00:53 +0000 (18:00 +0100)]
canUseRegexQuickfind does not test for contains-condition

This bug causes queries using contains-condition to return wrong
results, when INCLUDE_ALL_DESCENDANTS option is set.

Issue-ID: CPS-1663
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: If323e0e3b54d8c9a213dffda46897b2efb01fe2a

12 months agoAdd maven stage yaml for 3.3.1 37/134437/1
mpriyank [Wed, 3 May 2023 09:17:09 +0000 (10:17 +0100)]
Add maven stage yaml for 3.3.1

- Step 5 of the release process

Change-Id: I5b796f909395e10c0b4f783358496719f0d4b492
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
12 months agoUpdate release docs 19/134419/2
mpriyank [Tue, 2 May 2023 14:58:55 +0000 (15:58 +0100)]
Update release docs

- Also synched up the API changes in openapi yml file
- Step 1 and 2 of the release process

Issue-ID: CPS-1662
Change-Id: I5b9485497a27a3dee8639faedfa9c1bd8ed3265e
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
12 months agoAlign the hazelcast cluster names 99/134399/2
mpriyank [Fri, 28 Apr 2023 14:02:00 +0000 (15:02 +0100)]
Align the hazelcast cluster names

- We need to align the hazelcast cluster names as members of the same
  cluster can join each other. We will still have exclusivity as the
  instance names and configs are different for each distributed object.
- Exposing env variable to override the cluster name depending on the
  env it is run on.
- Modified test cases to validate the cluster names as well

Issue-ID: CPS-1637
Change-Id: Ib0f8c80dc9b2268f976b0c2d3ccd6d64792d4781
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
12 months agoMerge "Add document for support for contains condition to cps-path"
Luke Gleeson [Fri, 28 Apr 2023 13:59:06 +0000 (13:59 +0000)]
Merge "Add document for support for contains condition to cps-path"

12 months agoTimeout for Subscription Create Partial Response 24/134124/12
lukegleeson [Thu, 6 Apr 2023 14:28:56 +0000 (15:28 +0100)]
Timeout for Subscription Create Partial Response

- Implemented default 30s timeout for DMI Responses
- Placeholders have been TODO'd for Outcome Response generation and Persisted Subscription Updating
- Refactored common HazelcastCacheConfig methods
- Some tests required a blocking variable due to seperate thread usage

Issue-ID: CPS-1599
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I2b1a35e93939daa0524d379ac4736d714ef61a6f

12 months agoMerge "Add retry mechanism on Subscription loader"
Luke Gleeson [Thu, 27 Apr 2023 15:26:21 +0000 (15:26 +0000)]
Merge "Add retry mechanism on Subscription loader"

12 months agoAdd retry mechanism on Subscription loader 83/134183/9
emaclee [Sun, 16 Apr 2023 16:48:15 +0000 (17:48 +0100)]
Add retry mechanism on Subscription loader

Issue-ID: CPS-1568
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: I35697c260cc1a774f50d12552996b39f812fc2de

12 months agoCPS-1553 :REST endpoint to accept collection of cm handles for GET operation 58/133858/21
sourabh_sourabh [Mon, 27 Mar 2023 13:36:20 +0000 (14:36 +0100)]
CPS-1553 :REST endpoint to accept collection of cm handles for GET operation

-Introduced an interface having all un-implemented or default defination
of any method that is further extended or implemented by abstract or
stubbed controller.
-Exposed an endpoint to accept bulk request
-Modified an existing methods for more readability. (Parameterized datasource for ... methods)
-Code impl. for getResourceDataFromDmi method to send bulk request to
new proposed dmi-plugin endpoint that would accept bulk request.
-We need to investigate a groovy test that fails only into onap CICD pipeline.
For now it's commented out by added TODO tag.  (org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy:205)

Issue-ID: CPS-1553

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: Ieac39690956e3a0eab41068db57c5d93a16d04f0
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
12 months agoAdd document for support for contains condition to cps-path 82/134382/3
Rudrangi Anupriya [Thu, 27 Apr 2023 06:34:52 +0000 (12:04 +0530)]
Add document for support for contains condition to cps-path

Issue-ID: CPS-1272
Change-Id: I32c03d5ed80e5d16d4b5c0f726539a6da487abd6
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
12 months agoMerge "Ordering of leaf elements to support combination of AND/OR in cps-path"
Luke Gleeson [Thu, 27 Apr 2023 09:02:23 +0000 (09:02 +0000)]
Merge "Ordering of leaf elements to support combination of AND/OR in cps-path"

12 months ago[CPS] RI, Service: Code Refactoring 56/134356/3
raviteja.karumuri [Tue, 25 Apr 2023 18:41:29 +0000 (19:41 +0100)]
[CPS] RI, Service: Code Refactoring

# Remove unused method "updateDataNodeAndDescendants"
# Remove unused production code

Issue-ID: CPS-1594
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: Id909e9da3e9181c181dfdfe62f051451d8e488a2

12 months agoOrdering of leaf elements to support combination of AND/OR in cps-path 14/134314/4
Rudrangi Anupriya [Tue, 25 Apr 2023 07:43:16 +0000 (13:13 +0530)]
Ordering of leaf elements to support combination of AND/OR in cps-path

Issue-ID: CPS-1629
Change-Id: Ib9df87e8171f4d53c49d80d27e3c6cf75aa3b209
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
12 months agoMerge "Remove 32K limit from queries with collection parameters"
Toine Siebelink [Tue, 25 Apr 2023 15:22:20 +0000 (15:22 +0000)]
Merge "Remove 32K limit from queries with collection parameters"

12 months agoExtend capability of distributed cache 93/134293/5
mpriyank [Mon, 24 Apr 2023 11:51:24 +0000 (12:51 +0100)]
Extend capability of distributed cache

- Extend cache configs to be able to work in stanalone mode as well as
  in cluster mode in kubernetes.
- Expose the parameters to enable or disable the feature.
- to make it work in standalone mode autodiscovery config will take care , and
  to run it on kubernetes enable the kubernetes option and provide the
  service name property.

Issue-ID: CPS-1637
Change-Id: I704c4aa11e65b17b5be80048e4246079014d8bb7
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
12 months agoRemove 32K limit from queries with collection parameters 28/134128/7
danielhanrahan [Thu, 13 Apr 2023 20:01:58 +0000 (21:01 +0100)]
Remove 32K limit from queries with collection parameters

SQL queries taking collection parameters currently create a seperate
query parameter for each collection element. There is a limit of
around 2^15 (32,768) query parameters.
Postgres DB natively supports array types, in which the whole array
is transmitted in binary as a single parameter. Changing queries to
use arrays removes the 32K limit on queries.

- Add support for Postgres arrays to queries
- Change repository methods to use arrays, and provide overloaded
  versions taking collection parameters
- Update tests to reflect 32K limit being lifted

Issue-ID: CPS-1573
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I64f2aeaedbe54bfe12e3079cba0f2216759142c3

12 months agoMerge "Use exact type for objectUnderTest in groovy tests"
Sourabh Sourabh [Mon, 24 Apr 2023 09:08:29 +0000 (09:08 +0000)]
Merge "Use exact type for objectUnderTest in groovy tests"

12 months agoMerge "Add cascade delete fragments to liquibase test config"
Toine Siebelink [Mon, 24 Apr 2023 08:02:01 +0000 (08:02 +0000)]
Merge "Add cascade delete fragments to liquibase test config"

12 months agoMerge "Add contains condition support to cps-path"
Luke Gleeson [Fri, 21 Apr 2023 14:31:07 +0000 (14:31 +0000)]
Merge "Add contains condition support to cps-path"

12 months agoAdd cascade delete fragments to liquibase test config 68/134268/1
danielhanrahan [Fri, 21 Apr 2023 10:08:01 +0000 (11:08 +0100)]
Add cascade delete fragments to liquibase test config

Cascade delete was added to fragments table in main DB changelog,
but not to integration-test changelog.

Issue-ID: CPS-1617
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: If85f120dfdc4bf3e9c8a1dde2b982378560d418a

12 months agoUse exact type for objectUnderTest in groovy tests 67/134267/1
danielhanrahan [Fri, 21 Apr 2023 09:54:11 +0000 (10:54 +0100)]
Use exact type for objectUnderTest in groovy tests

Intelli-J doesn't know the type of objectUnderTest since it is
assigned in setup function. Thus many IDE features such as as
JavaDocs and error detection of wrong arguments are unavailable.
By setting the exact type, all IDE features are enabled.

Issue-ID: CPS-1621
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I3dabf82ef9d07b3c18f9820fa768344c2eeec1b6

12 months agoAdd contains condition support to cps-path 45/134045/12
Rudrangi Anupriya [Mon, 17 Apr 2023 08:49:46 +0000 (14:19 +0530)]
Add contains condition support to cps-path

Issue-ID: CPS-1272
Change-Id: Ic81d1322cacc64a8752916324b801d02be47d34f
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
12 months agoAlign dependencies with DMI-Plugin 65/134265/2
ToineSiebelink [Thu, 20 Apr 2023 17:15:54 +0000 (18:15 +0100)]
Align dependencies with DMI-Plugin

- Use bom for testcontainer versions
- Remove 'version' jib-maven-plugin.version (i.e. use latest or defined by oparent?)
- remove 'version from swagger-codegen-maven-plugin (i.e. use latest or defined by oparent?)

Issue-ID: CPS-1627

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ic76302ae39e9ed723af3d6d496046daa9eccbd42

12 months agoMerge "Correct documentation for GET node API"
Luke Gleeson [Thu, 20 Apr 2023 15:42:58 +0000 (15:42 +0000)]
Merge "Correct documentation for GET node API"

12 months agoMerge "3.0.0 Release Step 7"
Priyank Maheshwari [Thu, 20 Apr 2023 15:37:24 +0000 (15:37 +0000)]
Merge "3.0.0 Release Step 7"

12 months agoMerge "3.3.0 Release Step 6"
Priyank Maheshwari [Thu, 20 Apr 2023 15:04:41 +0000 (15:04 +0000)]
Merge "3.3.0 Release Step 6"

12 months ago3.0.0 Release Step 7 64/134264/2
lukegleeson [Thu, 20 Apr 2023 14:32:12 +0000 (15:32 +0100)]
3.0.0 Release Step 7

Issue-ID: CPS-1631
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I9d9ea58a769d7b577a90bacf29191aaf4efb6b41

12 months agoMerge "3.3.0 Release Step 5"
Priyank Maheshwari [Thu, 20 Apr 2023 14:36:29 +0000 (14:36 +0000)]
Merge "3.3.0 Release Step 5"

12 months ago3.3.0 Release Step 6 63/134263/2
lukegleeson [Thu, 20 Apr 2023 14:17:10 +0000 (15:17 +0100)]
3.3.0 Release Step 6

Issue-ID: CPS-1631
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I1ab690a2f43666328be9bf420aacc1d66760ae28

12 months ago3.3.0 Release Step 5 61/134261/2
lukegleeson [Thu, 20 Apr 2023 13:45:46 +0000 (14:45 +0100)]
3.3.0 Release Step 5

Issue-ID: CPS-1631
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I7fa3efa3d3fd79eb9a14710832d88ff81cf001a6

12 months agoMigrate hibernate-types to hypersistence-utils 49/134249/2
danielhanrahan [Thu, 20 Apr 2023 11:26:47 +0000 (12:26 +0100)]
Migrate hibernate-types to hypersistence-utils

There is newer release of the dependency that provides JSONB support.
The newer version provides additional features, such as Postgres
arrays. It was renamed from hibernate-types to hypersistence-utils.

Issue-ID: CPS-1573
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Iab556850041b592a8c4d515270dfe4bd9547957a

12 months agoMerge "3.3.0 Release Steps 1 & 2"
Priyank Maheshwari [Thu, 20 Apr 2023 13:31:21 +0000 (13:31 +0000)]
Merge "3.3.0 Release Steps 1 & 2"

12 months ago3.3.0 Release Steps 1 & 2 59/134259/1
lukegleeson [Thu, 20 Apr 2023 13:11:20 +0000 (14:11 +0100)]
3.3.0 Release Steps 1 & 2

Issue-ID: CPS-1631
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I69e8725dd54b3e21718ae0f9da8b7d262845f579

12 months agoCorrect documentation for GET node API 21/134221/3
emaclee [Tue, 18 Apr 2023 13:49:24 +0000 (14:49 +0100)]
Correct documentation for GET node API

- Add new section on documentation to describe XPath
- Correct doc description on GET node API

Issue-ID: CPS-1607
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: I23e4ccd1185a2d93fbb0b9e02e9daab949c0f952

12 months agoUpgrade Liquibase to 4.16.0 39/134239/1
lukegleeson [Wed, 19 Apr 2023 14:16:48 +0000 (15:16 +0100)]
Upgrade Liquibase to 4.16.0

Issue-ID: CPS-1627
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I3f45948b3a483e450b84c53da2e35dd5dc5f686e

12 months agoAddtional dependency updates 35/134235/1
ToineSiebelink [Wed, 19 Apr 2023 11:04:50 +0000 (12:04 +0100)]
Addtional dependency updates

-Allign org.onap.oparent.checkstyle version with oparent version
-Move org.springdoc version control to dependcy mgmt module

Issue-ID: CPS-1627

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I0ce3e6bb18341fac1e3d4bd6d7290bcc3bf28f50

12 months agoUpdate spingboot dependencies 23/134223/1
ToineSiebelink [Tue, 18 Apr 2023 13:58:51 +0000 (14:58 +0100)]
Update spingboot dependencies

Issue-ID: CPS-1627

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I9a9b4a9593ae2800270dafd319e8b4d27d9e0b3b

12 months agoMerge "Add patch operation for update node leaves"
Priyank Maheshwari [Mon, 17 Apr 2023 15:09:52 +0000 (15:09 +0000)]
Merge "Add patch operation for update node leaves"

12 months agoRemove CollectionUtils dependency 89/134189/3
lukegleeson [Mon, 17 Apr 2023 11:22:07 +0000 (12:22 +0100)]
Remove CollectionUtils dependency

Remove dependency creating pipeline issue

Issue-ID: CPS-1626
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I64a6019a8196aa98dd3874d08f373c4fb9e3b8c9

12 months ago[CPS] Removing the duplicate producer code 33/134133/4
raviteja.karumuri [Thu, 13 Apr 2023 20:36:55 +0000 (21:36 +0100)]
[CPS] Removing the duplicate producer code

# Using the existing 'EventPublisher' class and deleting the duplicated producer classes.

Issue-ID: CPS-1557
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: I6dd8e9c9d9dbec06a2c9464fc2d382fa89f6fc32

12 months agoMerge "[CPS] Re-structuring the packages for better understanding"
Toine Siebelink [Mon, 17 Apr 2023 09:36:00 +0000 (09:36 +0000)]
Merge "[CPS] Re-structuring the packages for better understanding"

12 months agoUse cascade delete in fragments table 11/134111/6
danielhanrahan [Fri, 3 Mar 2023 08:53:56 +0000 (08:53 +0000)]
Use cascade delete in fragments table

- Add Liquibase change to cascade delete fragments
- Remove cascade delete logic from FragmentNativeRepository
- Remove unused method deleteFragmentEntity

Issue-ID: CPS-1617
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Iecf4f3022b402e0328609ddc11a879c83e5d7f30

12 months agoRemove @NotNull from repository methods 27/134127/4
danielhanrahan [Thu, 13 Apr 2023 16:27:03 +0000 (17:27 +0100)]
Remove @NotNull from repository methods

Issue-ID: CPS-1573
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I55312bdc5454ed9ca60441b3968d19a61028eb66

12 months agoAdd tests for 32K limit for collection parameters 26/134126/4
danielhanrahan [Thu, 13 Apr 2023 17:53:59 +0000 (18:53 +0100)]
Add tests for 32K limit for collection parameters

SQL queries taking collection parameters currently create a seperate
query parameter for each collection element. There is a limit of
around 2^15 (32,768) query parameters.

- Add tests for cps-service methods exceeding the collection size limit

Issue-ID: CPS-1573
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I7169b3604f4dd0bb23bba8ff33f0102c43052c03

12 months agoAdd OR operator to cps-path 52/132852/31
Rudrangi Anupriya [Thu, 13 Apr 2023 17:19:06 +0000 (22:49 +0530)]
Add OR operator to cps-path

Issue-ID: CPS-1215
Change-Id: I91fdf5bddcc4fc12a8cf9dbce75f77c832c55871
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
12 months ago[CPS] Re-structuring the packages for better understanding 89/134089/5
raviteja.karumuri [Wed, 12 Apr 2023 15:25:19 +0000 (16:25 +0100)]
[CPS] Re-structuring the packages for better understanding

Issue-ID: CPS-1557
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: I16be74808eea6e3ce24574ae24ce082063bd0de9

12 months agoAdd patch operation for update node leaves 34/134034/2
halil.cakal [Thu, 6 Apr 2023 11:03:35 +0000 (12:03 +0100)]
Add patch operation for update node leaves

Issue-ID: CPS-1602
Change-Id: Ie67e6cb6810cd6ea05f3a11f7b195f0f23d39138
Signed-off-by: halil.cakal <halil.cakal@est.tech>
12 months agoMigrate query tests to integration-test module #6 79/133979/17
danielhanrahan [Tue, 4 Apr 2023 13:56:09 +0000 (14:56 +0100)]
Migrate query tests to integration-test module #6

- Remove old tests and broken test data, where fragments in
  ANCHOR-005 have parent fragments in ANCHOR-004
- Migrate tests to new test framework using bookstore model
- Add two bookstore anchors to test querying across both
- Add bookstore data to another test dataspace, to verify querying
  across anchors should be limited to one dataspace
- Lower minimum module coverage, since cps-ri tests are now in
  integration-test
- @Ignore failing tests for now

Issue-ID: CPS-1595
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I808de288961cb84a486052f9e1dc8fed5f2afe03

12 months agoMerge "Remove "isTagged" mapping method"
Priyank Maheshwari [Thu, 13 Apr 2023 08:43:35 +0000 (08:43 +0000)]
Merge "Remove "isTagged" mapping method"

12 months agoMigrate query tests to integration-test module #5 67/134067/7
danielhanrahan [Tue, 11 Apr 2023 13:36:31 +0000 (14:36 +0100)]
Migrate query tests to integration-test module #5

- Migrate query tests for composite keys to integration-test
- Add addresses with composite key to bookstore model

Issue-ID: CPS-1597
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I6f8dfc2c44ae6ba3bac1cce804841671ef5a009d

12 months agoRemove "isTagged" mapping method 83/134083/1
lukegleeson [Wed, 12 Apr 2023 13:04:47 +0000 (14:04 +0100)]
Remove "isTagged" mapping method

Remove redundant mapping method causing sonarqube violation

Issue-ID: CPS-1394
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: Ie3ed1411c05fcc3671e547b80b41826dcd6e1fab

12 months agoMerge "Expose endpoint to accept bulk request"
Sourabh Sourabh [Wed, 12 Apr 2023 12:57:52 +0000 (12:57 +0000)]
Merge "Expose endpoint to accept bulk request"

12 months agoMigrate query tests to integration-test module #3 27/134027/5
danielhanrahan [Wed, 5 Apr 2023 16:11:24 +0000 (17:11 +0100)]
Migrate query tests to integration-test module #3

Issue-ID: CPS-1597
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I1d92355f272271424a7014057d251cf88eac0203

12 months agoMerge "Migrate query tests to integration-test module #2"
Sourabh Sourabh [Wed, 12 Apr 2023 12:14:17 +0000 (12:14 +0000)]
Merge "Migrate query tests to integration-test module #2"

12 months agoPerformance tests for getDataNodes and queryDataNodes 10/133510/10
danielhanrahan [Tue, 28 Mar 2023 15:43:10 +0000 (16:43 +0100)]
Performance tests for getDataNodes and queryDataNodes

- Generate openroadm data from a single innerNode.json template
- Double the number of openroadm device nodes (25 -> 50) in tests
- Add new performance tests for getDataNodes and queryDataNodes to
  integration-test module, using openroadm and bookstore data
- Remove old performance tests from cps-ri

Issue-ID: CPS-1524
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Id9ec2a86d984d6c50c9ae6093e7a62729cb851da

12 months agoMigrate query tests to integration-test module #2 26/134026/5
danielhanrahan [Tue, 4 Apr 2023 18:00:44 +0000 (19:00 +0100)]
Migrate query tests to integration-test module #2

- Migrate some query tests to integration-test
- Edit bookstore model to add integer leaf-list 'editions'
- Lower cps-ri code coverage

Issue-ID: CPS-1597
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: If50bf15ad7d7f147448f6b60d464efc1cdc91005

12 months agoMerge "Migrate query tests to integration-test module #1"
Toine Siebelink [Tue, 11 Apr 2023 16:29:28 +0000 (16:29 +0000)]
Merge "Migrate query tests to integration-test module #1"

12 months agoMerge "Populate Dataspace field of DataNode"
Toine Siebelink [Tue, 11 Apr 2023 16:26:59 +0000 (16:26 +0000)]
Merge "Populate Dataspace field of DataNode"

12 months agoMigrate query tests to integration-test module #1 25/134025/3
danielhanrahan [Wed, 5 Apr 2023 15:41:55 +0000 (16:41 +0100)]
Migrate query tests to integration-test module #1

Issue-ID: CPS-1597
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I0403641e2e5293571c61a58aa2b67b144cf68ac4

12 months agoMerge "[CPS] Fix SonarQube Violations / Improve Coverage - Recurring task"
Toine Siebelink [Tue, 11 Apr 2023 15:51:43 +0000 (15:51 +0000)]
Merge "[CPS] Fix SonarQube Violations / Improve Coverage - Recurring task"