cps.git
5 months agoUpdate the cps's threshold for de-registration api 94/139894/1
halil.cakal [Mon, 13 Jan 2025 10:55:11 +0000 (10:55 +0000)]
Update the cps's threshold for de-registration api

- Due to the performance improvment of de-registration flow
   updating the cps' limit to 120 cmhandles/second

Issue-ID: CPS-2192
Change-Id: Ia0224a585deba9181de89c6bb4600e8d5529df14
Signed-off-by: halil.cakal <halil.cakal@est.tech>
5 months agoMerge "Implement Integration Testcases for XML Supported API's"
Lee Anjella Macabuhay [Fri, 10 Jan 2025 10:07:32 +0000 (10:07 +0000)]
Merge "Implement Integration Testcases for XML Supported API's"

5 months agoImplement Integration Testcases for XML Supported API's 74/139774/4
Rudrangi Anupriya [Thu, 9 Jan 2025 14:54:00 +0000 (20:24 +0530)]
Implement Integration Testcases for XML Supported API's

Issue-ID: CPS-2548
Change-Id: Icc7ffb66aabb03702355123c6d5c2eade0e7cb4a
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
5 months agodocs config files for oslo release v2 85/139885/1
thmsdt [Thu, 9 Jan 2025 15:27:59 +0000 (16:27 +0100)]
docs config files for oslo release v2

Issue-ID: DOC-826

Change-Id: I6f27294301724feb46b737094c95175a17c33dfc
Signed-off-by: thmsdt <thomas.kulik@telekom.de>
5 months agoMerge "Resolve Nexus-IQ report issues"
Daniel Hanrahan [Wed, 8 Jan 2025 13:19:18 +0000 (13:19 +0000)]
Merge "Resolve Nexus-IQ report issues"

5 months agoMerge "Remove hypersistence dependency in cps"
Daniel Hanrahan [Wed, 8 Jan 2025 12:41:28 +0000 (12:41 +0000)]
Merge "Remove hypersistence dependency in cps"

5 months agoResolve Nexus-IQ report issues 54/139854/3
seanbeirne [Mon, 6 Jan 2025 12:31:13 +0000 (12:31 +0000)]
Resolve Nexus-IQ report issues

- Upgrading Springboot 3.3.1->3.3.7
- Upgrading Springboot dependencies 3.2.4->3.2.12

Issue-ID: CPS-2550
Change-Id: I0630b4fbdcfe44cebc835ef7be0df1b306e801e5
Signed-off-by: seanbeirne <sean.beirne@est.tech>
5 months agoMerge "Add gauge metric for NCMP "cmhandle states""
Daniel Hanrahan [Tue, 7 Jan 2025 14:54:45 +0000 (14:54 +0000)]
Merge "Add gauge metric for NCMP "cmhandle states""

5 months agoRemove hypersistence dependency in cps 59/139859/2
emaclee [Tue, 7 Jan 2025 10:54:50 +0000 (10:54 +0000)]
Remove hypersistence dependency in cps

Issue-ID: CPS-2166
Change-Id: I543e32a97b84f87f9ec0bbb72e3883e7eea3c5e1
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
5 months agoAdd gauge metric for NCMP "cmhandle states" 14/139714/11
emaclee [Wed, 11 Dec 2024 14:58:25 +0000 (14:58 +0000)]
Add gauge metric for NCMP "cmhandle states"

Issue-ID: CPS-2456
Change-Id: I1aebcc68dfdc9c48c230c74376742d67b05c0615
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
6 months agoUpdate docs related to lock 31/139731/1
mpriyank [Fri, 20 Dec 2024 11:31:58 +0000 (11:31 +0000)]
Update docs related to lock

- added the distributed lock in the documentation as well
- updated the log level to debug to refrain printing every iteration of
  the scheduler

Issue-ID: CPS-2479
Change-Id: Ieeeff46168d70aca6f423e82bda15a12d6c405a5
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
6 months agoMerge "Add schema to persist notification subscription information"
Priyank Maheshwari [Fri, 20 Dec 2024 10:49:32 +0000 (10:49 +0000)]
Merge "Add schema to persist notification subscription information"

6 months agoMerge "Remove check before removing from hazelcast cache"
Toine Siebelink [Fri, 20 Dec 2024 09:49:39 +0000 (09:49 +0000)]
Merge "Remove check before removing from hazelcast cache"

6 months agoAdd schema to persist notification subscription information 30/139030/18
rajesh.kumar [Mon, 30 Sep 2024 12:41:47 +0000 (18:11 +0530)]
Add schema to persist notification subscription information

Add required schema to persist notification subscription information. It should contain
  - Schema yang file
  - New Dataspace, Anchors or any other database entity
  - Refactore duplicate code in NCMP

Issue-ID:CPS-2427
Change-Id: I56c34400dc73c71b936a51260efd300924ababdc
Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
6 months agoMerge "Cps and Ncmp distributed lock for various use cases"
Toine Siebelink [Thu, 19 Dec 2024 16:09:23 +0000 (16:09 +0000)]
Merge "Cps and Ncmp distributed lock for various use cases"

6 months agoCps and Ncmp distributed lock for various use cases 83/139583/13
mpriyank [Wed, 27 Nov 2024 14:43:28 +0000 (14:43 +0000)]
Cps and Ncmp distributed lock for various use cases

- introduced cpsAndNcmpLock to be used for any use case needing
  coordination. Since it can be used for any use case hence placing the
  class accordingly.
- currently lock is being used for populating workQueue.
- Removed FencedLock as it was part of CPSubsystem which is moved to
  hazelcast-enterprise in 5.5.* version onwards.
- added info level logging statement to verify just one thread at a time
  in the critical section
- Note : integration test to be part of a separate patch.

Issue-ID: CPS-2479
Change-Id: I0f33c7232786c517383e5093fda91fd9a1839021
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
6 months agoMerge "RTD docs for async use case"
Lee Anjella Macabuhay [Thu, 19 Dec 2024 13:13:51 +0000 (13:13 +0000)]
Merge "RTD docs for async use case"

6 months agoRemove check before removing from hazelcast cache 29/139729/1
emaclee [Thu, 19 Dec 2024 12:25:56 +0000 (12:25 +0000)]
Remove check before removing from hazelcast cache

Issue-ID: CPS-2420
Change-Id: I2299d5790792f7c2b2b1a6aa371b5ea43c6a9ee8
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
6 months agoRTD docs for async use case 28/139728/4
mpriyank [Thu, 19 Dec 2024 10:48:12 +0000 (10:48 +0000)]
RTD docs for async use case

- Documented the suggestion to tune the kafka parameter for the case
  when client provides a non existent topic for the async batch usecase.

Issue-ID: CPS-2069
Change-Id: I93e1b3006c901b6b4fc3a61df16d3cb82e6c9906
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
6 months agoHazelcast related code update 27/139727/1
emaclee [Thu, 19 Dec 2024 09:31:43 +0000 (09:31 +0000)]
Hazelcast related code update

- this patch answers comments from 'Hazelcast Optimization'
  patch that was merged

Issue-ID: CPS-2420
Change-Id: Ic5cf005730f2a45eba553a7f6d32e9af6676821d
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
6 months agoMerge "Implementation of Data validation feature in CPS APIs"
Lee Anjella Macabuhay [Fri, 13 Dec 2024 09:32:29 +0000 (09:32 +0000)]
Merge "Implementation of Data validation feature in CPS APIs"

6 months agoMerge "Increase Test coverage for cps-ncmp-service"
Toine Siebelink [Thu, 12 Dec 2024 09:27:28 +0000 (09:27 +0000)]
Merge "Increase Test coverage for cps-ncmp-service"

6 months agoImplementation of Data validation feature in CPS APIs 92/139592/4
Rudrangi Anupriya [Mon, 2 Dec 2024 10:07:07 +0000 (15:37 +0530)]
Implementation of Data validation feature in CPS APIs

Added support to validate JSON/XML data without the need of persisting
it in the database.

 - added "dryRunInQuery" flag as a new query parameter in update/Replace/Add APIs
 - added new method as part of CpsDataService layer to perform data
   validation

Issue-ID: CPS-2516
Change-Id: I87bb33dd6021567d0fac606d5c4b0168d107311c
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
6 months agoIncrease Test coverage for cps-ncmp-service 91/139691/6
seanbeirne [Wed, 4 Dec 2024 16:23:11 +0000 (16:23 +0000)]
Increase Test coverage for cps-ncmp-service

Issue-ID: CPS-475
Change-Id: I35f127540e0fe5d412a9f855b647fef30f47159f
Signed-off-by: seanbeirne <sean.beirne@est.tech>
6 months agoMerge "Policy Executor API Review Board Comments"
Lee Anjella Macabuhay [Wed, 11 Dec 2024 12:38:53 +0000 (12:38 +0000)]
Merge "Policy Executor API Review Board Comments"

6 months agoMerge "Extend the container-up time after the tests finished"
Lee Anjella Macabuhay [Wed, 11 Dec 2024 09:49:57 +0000 (09:49 +0000)]
Merge "Extend the container-up time after the tests finished"

6 months agoPolicy Executor API Review Board Comments 96/139696/6
ToineSiebelink [Mon, 9 Dec 2024 11:22:29 +0000 (11:22 +0000)]
Policy Executor API Review Board Comments

- Implemented Guild review comments in API
- Updated Stub to reflect new API and 'support' all operations
- Updated production code to use new API
- Updated Semi-Integration Tests

Issue-ID: CPS-2479
Change-Id: Ibe307b0d859312b534009a384e9f71e1ea2affe0
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
6 months agoExtend the container-up time after the tests finished 07/139707/2
halil.cakal [Mon, 9 Dec 2024 17:38:35 +0000 (17:38 +0000)]
Extend the container-up time after the tests finished

- extend it 5 mins for kpi test suit
- extend it 7 mins for endurance test suit

Issue-ID: CPS-2535

Change-Id: Ifecf2cdea67c12ff671da5f90e6715de7089e755
Signed-off-by: halil.cakal <halil.cakal@est.tech>
6 months agoSeparated inventoryFacade to Interface and Impl 08/139708/1
leventecsanyi [Tue, 3 Dec 2024 09:45:57 +0000 (10:45 +0100)]
Separated inventoryFacade to Interface and Impl

  - created NetworkCmProxyInventoryFacade IF

Issue-ID: CPS-2513
Change-Id: Ibda2d7899514ee22d4b04cad971e107bfccce2df
Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
6 months agoMerge "Hazelcast Optimisation"
Toine Siebelink [Tue, 10 Dec 2024 10:21:07 +0000 (10:21 +0000)]
Merge "Hazelcast Optimisation"

6 months agoHazelcast Optimisation 03/139703/1
emaclee [Mon, 9 Dec 2024 13:00:25 +0000 (13:00 +0000)]
Hazelcast Optimisation

Issue-ID: CPS-2420
Change-Id: I707e0fbbddeb4ddc7c573a2b3ebd8fbca08126a6
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
6 months agoMerge "[k6] Use constant arrival rate"
Toine Siebelink [Mon, 9 Dec 2024 08:38:31 +0000 (08:38 +0000)]
Merge "[k6] Use constant arrival rate"

6 months ago[Module Sync] Store CM-handle IDs in work queue 75/139675/3
danielhanrahan [Fri, 1 Nov 2024 17:36:42 +0000 (17:36 +0000)]
[Module Sync] Store CM-handle IDs in work queue

This fixes bug CPS-2474, handling various edge cases, such as
CM handles being deleted during module sync.

- Change moduleSyncWorkQueue to store CmHandleId instead of DataNode.
- Freshly fetch Cm Handles in module sync task, so latest CM-handle
  state is used, and only process ADVISED CM handles in module sync.

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

6 months ago[k6] Use constant arrival rate 77/139677/1
danielhanrahan [Thu, 5 Dec 2024 00:06:24 +0000 (00:06 +0000)]
[k6] Use constant arrival rate

Currently, k6 KPI tests send requests using 'constant-vus' executor.
This continuously sends requests on different threads - as soon as
one request completes, another is sent. This leads to weird results
where improving performance of one operation ends up degrading other
test cases, due to more requests being sent per second.

This change makes KPI tests send requests at a constant rate,
making the mixed-load tests less prone to such anomalies.

- Send requests at constant rates for test cases 3, 4, 5, 6.
- Throughput tests 1, 2 & 7 still send at the fastest rate.
- Adjust expected performance timings.

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

6 months agoMoved common classes under the api package under api 73/139573/7
leventecsanyi [Tue, 26 Nov 2024 14:29:45 +0000 (15:29 +0100)]
Moved common classes under the api package under api

  - moved common classes under the api package
  - moved Spec files

Issue-ID: CPS-2512
Change-Id: I88046280ce359ce8cc488ad37d4e6f85406b0dbf
Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
6 months agoMerge "Add persistent storage to prometheus"
Toine Siebelink [Thu, 5 Dec 2024 08:49:05 +0000 (08:49 +0000)]
Merge "Add persistent storage to prometheus"

6 months agoInventory Persistance returns YangModelCmHandles for alternate Ids 28/139628/5
seanbeirne [Mon, 2 Dec 2024 11:33:36 +0000 (11:33 +0000)]
Inventory Persistance returns YangModelCmHandles for alternate Ids

-Remove getCmHandleDataNodeByAlternateId(s) methods and replace with
Yang Model methods

Issue-ID: CPS-2486
Change-Id: I2c9c96f033b3b1eefadb7eff14c91f9a936630e6
Signed-off-by: seanbeirne <sean.beirne@est.tech>
6 months agoMerge "[BUG] Effective trust factors in DMI trust level"
Toine Siebelink [Wed, 4 Dec 2024 16:38:45 +0000 (16:38 +0000)]
Merge "[BUG] Effective trust factors in DMI trust level"

6 months agoMerge "Add tests of attribute-axis feature"
Toine Siebelink [Wed, 4 Dec 2024 15:18:33 +0000 (15:18 +0000)]
Merge "Add tests of attribute-axis feature"

6 months ago[BUG] Effective trust factors in DMI trust level 46/139646/1
danielhanrahan [Wed, 4 Dec 2024 14:37:26 +0000 (14:37 +0000)]
[BUG] Effective trust factors in DMI trust level

Effective trust of a CM handle should be the trust level of the
handle or the DMI, whichever is lower. Currently, effective trust
level of a CM handle is not reported correctly when the DMI is down,
as DMI trust level is not considered.

- Add DMI service names to NcmpServiceCmHandle
- Introduce new DmiServiceNameResolver class
- Correctly calculate effective trust level

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

6 months agoAdd persistent storage to prometheus 32/139632/5
halil.cakal [Tue, 26 Nov 2024 16:33:46 +0000 (16:33 +0000)]
Add persistent storage to prometheus

- add healthcheck to ensure prometheus service is running correctly and
restarts it if it becomes unhealthy
- set the data retention time to 30d
- update readme

Issue-ID: CPS-2466

Change-Id: I0f6186f8577e8e0113831ed040298b823e33d624
Signed-off-by: halil.cakal <halil.cakal@est.tech>
6 months agoMerge "Plot metrics for each cps-and-ncmp instance separately in Grafana"
Daniel Hanrahan [Wed, 4 Dec 2024 13:29:46 +0000 (13:29 +0000)]
Merge "Plot metrics for each cps-and-ncmp instance separately in Grafana"

6 months agoPlot metrics for each cps-and-ncmp instance separately in Grafana 43/139643/2
halil.cakal [Wed, 4 Dec 2024 10:12:02 +0000 (10:12 +0000)]
Plot metrics for each cps-and-ncmp instance separately in Grafana

- assing port range to cps-and-ncmp service to plot metrics
   separately

Issue-ID: CPS-2536

Change-Id: Ic097017bbcca25f28341e8e77f658a0a4e8964d7
Signed-off-by: halil.cakal <halil.cakal@est.tech>
6 months agoMerge "Improve test coverage trustlevel manager"
Daniel Hanrahan [Wed, 4 Dec 2024 10:38:42 +0000 (10:38 +0000)]
Merge "Improve test coverage trustlevel manager"

6 months agoMerge "Add comments to (describe) all Liquibase steps"
Daniel Hanrahan [Wed, 4 Dec 2024 09:36:23 +0000 (09:36 +0000)]
Merge "Add comments to (describe) all Liquibase steps"

6 months agoImprove test coverage trustlevel manager 41/139641/1
ToineSiebelink [Tue, 3 Dec 2024 18:29:25 +0000 (18:29 +0000)]
Improve test coverage trustlevel manager

Issue-ID: CPS-475
Change-Id: I572227b4f6c61bd2286d8cb3fb85c3dc21142a47
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
6 months agoAdd comments to (describe) all Liquibase steps 37/139637/2
ToineSiebelink [Thu, 28 Nov 2024 11:04:40 +0000 (11:04 +0000)]
Add comments to (describe) all Liquibase steps

Issue-ID: CPS-776
Change-Id: I768da4e9d9a1e75d2cc1fa879a5237efb4c7421f
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
6 months agoAdded performance section and updated api version 38/139638/1
mpriyank [Tue, 3 Dec 2024 16:08:25 +0000 (16:08 +0000)]
Added performance section and updated api version

- Added a performance section to the release notes
- Populated the correct info.version for NCMP and CPS Rest interfaces

Issue-ID: CPS-2537
Change-Id: Iae07da57fc45100b4d250fcfb86a95079869b221
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
6 months agoAdd tests of attribute-axis feature 88/139588/3
danielhanrahan [Mon, 2 Dec 2024 14:49:10 +0000 (14:49 +0000)]
Add tests of attribute-axis feature

Following TDD, functional acceptance tests are added for
attribute-axis feature. This covers xpaths such as '//books/@title'

- Add stub to CpsQueryService throwing UnsupportedOperationException
- Add tests showing expected behaviour (tests currently ignored)
- Implementation will be provided in following commmit for CPS-2416

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

6 months agoMerge "[Cps Path Parser] Introduce Attribute axis"
Priyank Maheshwari [Tue, 3 Dec 2024 13:26:09 +0000 (13:26 +0000)]
Merge "[Cps Path Parser] Introduce Attribute axis"

6 months agoMerge "Faster CM-handle searches using Hazelcast optimization"
Toine Siebelink [Tue, 3 Dec 2024 10:28:46 +0000 (10:28 +0000)]
Merge "Faster CM-handle searches using Hazelcast optimization"

6 months ago[k6] Adjust expectations 33/139633/1
danielhanrahan [Mon, 2 Dec 2024 21:38:16 +0000 (21:38 +0000)]
[k6] Adjust expectations

Some performance improvements were made over last months,
so this commit adjusts expected performance to match.

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

6 months agoUpdate the minor version of CPS 29/139629/1
mpriyank [Mon, 2 Dec 2024 14:26:03 +0000 (14:26 +0000)]
Update the minor version of CPS

- Update the minor version of cps.
- New version being 3.6.0-SNAPSHOT now.

Issue-ID: CPS-2488
Change-Id: I87fb29fe45dc942b258bc1d45e09a3351739539b
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
6 months agoFaster CM-handle searches using Hazelcast optimization 20/139620/4
danielhanrahan [Fri, 29 Nov 2024 13:03:21 +0000 (13:03 +0000)]
Faster CM-handle searches using Hazelcast optimization

This uses IMap::getAll(setOfKeys) to bulk read trust levels.
This reduces CM-handle search time by a third.

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

6 months ago[Cps Path Parser] Introduce Attribute axis 87/139587/3
danielhanrahan [Wed, 27 Nov 2024 15:38:41 +0000 (15:38 +0000)]
[Cps Path Parser] Introduce Attribute axis

Add grammar and tests for attribute-axis to match cps paths like:

  //books/@title

which should return the titles of all books (a subsequent patch will
implement the logic). The syntax is compatible with XPath standard.

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

6 months agoBump CPS to 3.5.6-SNAPSHOT 17/139617/4
egernug [Fri, 29 Nov 2024 12:49:10 +0000 (12:49 +0000)]
Bump CPS to 3.5.6-SNAPSHOT

Issue-ID: CPS-2488

Change-Id: Ib17e4283de959ec4aab3c68bb3ba8018a10a10b2
Signed-off-by: egernug <gerard.nugent@est.tech>
6 months agoMerge "Container yaml for 3.5.5"
Priyank Maheshwari [Fri, 29 Nov 2024 12:55:16 +0000 (12:55 +0000)]
Merge "Container yaml for 3.5.5"

6 months agoContainer yaml for 3.5.5 16/139616/2
egernug [Fri, 29 Nov 2024 12:31:22 +0000 (12:31 +0000)]
Container yaml for 3.5.5

Issue-ID: CPS-2488

Change-Id: Ie09e3239e1bcb1878b43f8201595f0aea175bfa9
Signed-off-by: egernug <gerard.nugent@est.tech>
6 months agomaven stage yaml for 3.5.5 15/139615/1
egernug [Fri, 29 Nov 2024 12:14:51 +0000 (12:14 +0000)]
maven stage yaml for 3.5.5

Issue-ID: CPS-2488

Change-Id: I04d65ba05e24b64932c887eea039f3ab05157702
Signed-off-by: egernug <gerard.nugent@est.tech>
6 months agoMerge "Update release notes for OSLO"
Daniel Hanrahan [Fri, 29 Nov 2024 11:51:40 +0000 (11:51 +0000)]
Merge "Update release notes for OSLO"

6 months agoUpdate release notes for OSLO 76/139476/6
mpriyank [Tue, 19 Nov 2024 22:59:08 +0000 (22:59 +0000)]
Update release notes for OSLO

- Added release notes for the features that were delivered in 3.5.5
  version of CPS

Issue-ID: CPS-2488
Change-Id: I31e863430a5aff41814bed0a4d39ef8546b8e617
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
6 months agoMerge "XML content support on Replace list content"
Priyank Maheshwari [Fri, 29 Nov 2024 10:28:06 +0000 (10:28 +0000)]
Merge "XML content support on Replace list content"

6 months agoMerge "De-Registration without Orphaned Module Check"
Toine Siebelink [Thu, 28 Nov 2024 17:17:24 +0000 (17:17 +0000)]
Merge "De-Registration without Orphaned Module Check"

6 months agoDe-Registration without Orphaned Module Check 84/139584/4
ToineSiebelink [Wed, 27 Nov 2024 15:32:27 +0000 (15:32 +0000)]
De-Registration without Orphaned Module Check

- Testware updates to  measure time spent for de-registration
- Removed orphan check from module delete methods
- Using @scheduled to run Db Cleaner method once
(see https://lf-onap.atlassian.net/wiki/spaces/DW/pages/52494359/CPS-2478+Module+Sync+Inefficiencies#De-Registration:-Test-Measurements-With-and-Without-Orphanage-removal for reasoning)
- Updated integration tests to call orphan check where need (after schema set deletion)

Issue-ID: CPS-2478
Change-Id: I513af9d8bb88486a242284b58e0363a527346dd4
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
6 months agoXML content support on Replace list content 43/138943/24
Rudrangi Anupriya [Wed, 27 Nov 2024 18:19:42 +0000 (23:49 +0530)]
XML content support on Replace list content

Here to bring Support for XML Response Entity in Replace List content

- Add ContentTypeInheadr in cpsData.yml to support application/xml
- Add contentTypeInHeader parameter to accept xml  in DataRestController.java
- Modify the code return xml Data
- written testcase for above changes made

Issue-ID: CPS-2411
Change-Id: Ibb7ffb66ccdd03703266123c6d5c2eade0e7cb4a
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
6 months agoMinor refactor of CPS rest controller 86/139586/1
danielhanrahan [Wed, 27 Nov 2024 17:31:23 +0000 (17:31 +0000)]
Minor refactor of CPS rest controller

Use streams to simplify logic

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

6 months agoMerge "Implement ancestor axis in SQL"
Priyank Maheshwari [Wed, 27 Nov 2024 16:38:14 +0000 (16:38 +0000)]
Merge "Implement ancestor axis in SQL"

6 months agoMerge "Catch data validation exception in dmi data operation"
Daniel Hanrahan [Wed, 27 Nov 2024 10:23:31 +0000 (10:23 +0000)]
Merge "Catch data validation exception in dmi data operation"

6 months ago[CPS] Reverted ncmp-dmi-plugin version to latest 75/139575/2
sourabh_sourabh [Tue, 26 Nov 2024 16:23:48 +0000 (16:23 +0000)]
[CPS] Reverted ncmp-dmi-plugin version to latest

- Reverted DMI_VERSION to latest Ncmp-dmi-Plugin 1.6.0-SNAPSHOT-latest
  for CSIT.
- Corrected dmi-stub docker image name from "dmi-plugin-demo-and-csit-stub" to "dmi-stub"

Issue-ID: CPS-2499
Change-Id: I99087b7230a40e958b3b789549a4a8e4c9dd0341
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
6 months agoImplement ancestor axis in SQL 11/139011/6
danielhanrahan [Sun, 1 Sep 2024 23:16:18 +0000 (00:16 +0100)]
Implement ancestor axis in SQL

Currenty ancestor axis is implemented in Java using regex,
which then sends a second SQL query to fetch ancestors.
Implementing ancestor axis in SQL is more efficient, and is
needed for limiting/paginating Cps Path Query results.

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

6 months agoDon't handle root xpath in getFragmentEntity 34/139534/2
danielhanrahan [Fri, 22 Nov 2024 12:50:19 +0000 (12:50 +0000)]
Don't handle root xpath in getFragmentEntity

getFragmentEntity is an internal method only used for resovling
parent xpaths. The root xpath handling is never reachable.

- Remove root xpath handling in getFragmentEntity
- Clean up unneeded FragmentRepository code

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

6 months agoMerge "[Cps Path Parser] Don't quote numbers in comparison"
Lee Anjella Macabuhay [Tue, 26 Nov 2024 11:07:34 +0000 (11:07 +0000)]
Merge "[Cps Path Parser] Don't quote numbers in comparison"

7 months agoCpsDataPersistenceService refactoring 32/139532/2
danielhanrahan [Fri, 22 Nov 2024 12:17:54 +0000 (12:17 +0000)]
CpsDataPersistenceService refactoring

- Extract common code to reduce duplication.
- Move private methods below public methods, and
  move private static methods to bottom of file.
- Note some private methods are left in-place due to
  checkstyle rules (method overloads belong together).

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

7 months ago[Cps Path Parser] Don't quote numbers in comparison 27/139527/2
danielhanrahan [Thu, 21 Nov 2024 18:05:05 +0000 (18:05 +0000)]
[Cps Path Parser] Don't quote numbers in comparison

Presently, Cps Path Parser will wrap numbers in quotes when
normalizing or getting parent path, which can lead to invalid paths.
For example:
  /books[@price > 15]
will be normalized to:
  /books[@price>'15']

This causes trouble when running queries on normalized paths:
(CpsPathException: "can use only > with integer")

Note this patch will still normalize numbers to string for equality:
  /books[@price='15']
Much existing code relies on this, and it does not cause problems.

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

7 months agoCatch data validation exception in dmi data operation 43/139543/2
seanbeirne [Mon, 25 Nov 2024 12:03:25 +0000 (12:03 +0000)]
Catch data validation exception in dmi data operation

Issue-ID: CPS-2510
Change-Id: I4093459c824c202dc8dec4b869e338d4b80fbac8
Signed-off-by: seanbeirne <sean.beirne@est.tech>
7 months agoRegistration Optimization remaining Code Comments 42/139542/1
ToineSiebelink [Mon, 25 Nov 2024 09:37:31 +0000 (09:37 +0000)]
Registration Optimization remaining Code Comments

Issue-ID: CPS-2478
Change-Id: I0aa3804225f053ff99176056fe71322a23cff31c
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
7 months agoDefine new Suite (js): Endurance 89/139489/4
halil.cakal [Tue, 19 Nov 2024 11:10:32 +0000 (11:10 +0000)]
Define new Suite (js): Endurance

- have one ncmp-test-runner.js with different configs: kpi.json and
  endurance.json
- move scenarios and thresholds settings into the json configs

Issue-ID: CPS-2444

Change-Id: I72f65036dc3f7762284b32903e1d05474dbed6c2
Signed-off-by: halil.cakal <halil.cakal@est.tech>
7 months agoMake Content-Type header default to JSON for CPS APIs 30/139530/1
danielhanrahan [Fri, 22 Nov 2024 09:20:03 +0000 (09:20 +0000)]
Make Content-Type header default to JSON for CPS APIs

Recent changes for XML support have made Content-Type header
mandatory, where before it was not. This change makes CPS
default to JSON if Content-Type is not specified.

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

7 months agoMerge "Prioritize cm handle ids over alternate ids in data operations"
Daniel Hanrahan [Thu, 21 Nov 2024 15:45:39 +0000 (15:45 +0000)]
Merge "Prioritize cm handle ids over alternate ids in data operations"

7 months agoPrioritize cm handle ids over alternate ids in data operations 07/139507/2
ToineSiebelink [Thu, 21 Nov 2024 15:08:39 +0000 (15:08 +0000)]
Prioritize cm handle ids over alternate ids in data operations

Issue-ID: CPS-2510
Change-Id: I7068d0de45cc2c2e5d8815f0e78c260369f3551e
Signed-off-by: seanbeirne <sean.beirne@est.tech>
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
7 months agoAdd Rest tests for yang module APIs 17/139517/2
danielhanrahan [Thu, 21 Nov 2024 10:37:16 +0000 (10:37 +0000)]
Add Rest tests for yang module APIs

Add tests of following rest endpoints, including error scenarios:
- /ncmp/v1/ch/${cmHandleReference}/modules
- /ncmp/v1/ch/${cmHandleReference}/modules/definitions

Change-Id: Ia4b5a638345840970794c7ae93dfd44e5ea62252
Issue-ID: CPS-2509
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
7 months agoMerge "Add new k6 test profile for running edurance tests"
Daniel Hanrahan [Thu, 21 Nov 2024 13:11:18 +0000 (13:11 +0000)]
Merge "Add new k6 test profile for running edurance tests"

7 months agoMerge "Upgrade liquibase to version 4.30.0"
Toine Siebelink [Thu, 21 Nov 2024 13:09:16 +0000 (13:09 +0000)]
Merge "Upgrade liquibase to version 4.30.0"

7 months agoUpgrade liquibase to version 4.30.0 14/139514/2
emaclee [Thu, 21 Nov 2024 11:24:07 +0000 (11:24 +0000)]
Upgrade liquibase to version 4.30.0

Issue-ID: CPS-2507
Change-Id: I8057d41ea14719a737554d9cc53e342e4eeec6c6
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
7 months ago[BUG] Fix for module endpoints using alternate ID 10/139510/1
danielhanrahan [Thu, 21 Nov 2024 09:44:15 +0000 (09:44 +0000)]
[BUG] Fix for module endpoints using alternate ID

The endpoints for fetching modules and module definitions
previously returned empty result if a CM handle was not
found or not ready. Recent changes for alternate ID have
changed the behaviour so it returns an error instead.
This restores original behaviour by swallowing the exception.

Change-Id: I63091d04d171e6f4ac6ad1c44b359b9a0c4b8f65
Issue-ID: CPS-2509
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
7 months agoUpdate error response for ncmp endpoints 91/139491/1
seanbeirne [Wed, 20 Nov 2024 11:00:49 +0000 (11:00 +0000)]
Update error response for ncmp endpoints

Issue-ID: CPS-2386
Change-Id: I0d1f09cff202e055be255b365fc2271a5ee43b37
Signed-off-by: seanbeirne <sean.beirne@est.tech>
7 months agoRevert "Update error response for ncmp endpoints" 88/139488/1
ToineSiebelink [Wed, 20 Nov 2024 08:21:23 +0000 (08:21 +0000)]
Revert "Update error response for ncmp endpoints"

This reverts commit 7e6fee9321e4f13cc4a0d81f83fc3693309cb5d7.

Reason for revert: This patch is causing blocking issues at ESH see CPS-2509
Issue-ID: CPS-2509
Change-Id: Ie1bd26ccca4abcac09faf35e2b97491dab32b14d
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
7 months agoMerge "Test to highlight ModuleSetTag Inefficiencies"
Sourabh Sourabh [Tue, 19 Nov 2024 15:59:25 +0000 (15:59 +0000)]
Merge "Test to highlight ModuleSetTag Inefficiencies"

7 months agoMerge "Update documentation to reflect changes made to rest endpoints"
Priyank Maheshwari [Mon, 18 Nov 2024 16:17:55 +0000 (16:17 +0000)]
Merge "Update documentation to reflect changes made to rest endpoints"

7 months agoUpdate documentation to reflect changes made to rest endpoints 20/139420/1
seanbeirne [Mon, 18 Nov 2024 14:57:07 +0000 (14:57 +0000)]
Update documentation to reflect changes made to rest endpoints

Issue-ID: CPS-2505
Change-Id: I503960e3b093a0e83754132db49cae1aa48690e9
Signed-off-by: seanbeirne <sean.beirne@est.tech>
7 months agoMerge "Update error response for ncmp endpoints"
Priyank Maheshwari [Mon, 18 Nov 2024 14:55:37 +0000 (14:55 +0000)]
Merge "Update error response for ncmp endpoints"

7 months agoAdd new k6 test profile for running edurance tests 41/139341/8
halil.cakal [Wed, 6 Nov 2024 15:05:22 +0000 (15:05 +0000)]
Add new k6 test profile for running edurance tests

- assign a profile name to the existing k6 tests (kpi)
- add control which profile is run using k6 config file
- both test profiles can run in parallel

Issue-ID: CPS-2464

Change-Id: I9fea13f12e2da46bd55b4315c68209843c1abe06
Signed-off-by: halil.cakal <halil.cakal@est.tech>
7 months agoUpdate error response for ncmp endpoints 26/139326/7
seanbeirne [Mon, 4 Nov 2024 16:36:10 +0000 (16:36 +0000)]
Update error response for ncmp endpoints

Issue-ID: CPS-2386
Change-Id: Ib4f37858f5f107e350a13e4bf7ed93493864ce60
Signed-off-by: seanbeirne <sean.beirne@est.tech>
7 months agoTest to highlight ModuleSetTag Inefficiencies 44/139344/10
ToineSiebelink [Tue, 5 Nov 2024 12:04:03 +0000 (12:04 +0000)]
Test to highlight ModuleSetTag Inefficiencies

- Add (micrometer) instrumentation to expose inefficiencies
- Add test config for micrometer
- Add setup methods in base to create many cm handles
- Set module sync parallelism to 2 for testing
- Add clean up methods for hazelcast related tests
- added test to show inefficiencies
- POC 1 use hazelcast set to prevent multiple threads working on same ModuleSetTag
- POC 2 'cache' module set tags per thread to prevent DB looks ups
- Main inefficiency left: create schemaset for EACH cm Handled even if same tag. No easy PoC...

Change-Id: Idf46b44c475a24727dd7084bb613459f4c29be55
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
7 months agoXML content support for only cps Query v2 52/138652/39
Rudrangi Anupriya [Wed, 6 Nov 2024 16:50:11 +0000 (22:20 +0530)]
XML content support for only cps Query v2

Here to bring Support for XML Response Entity in query data nodes

- Add ContentTypeInheadr in cpsQueryV2.yml to support application/xml
- Add contentTypeInHeader parameter to accept xml  in QueryRestController.java
- Implement logic to convert data to xml
- written testcase for above changes made

Issue-ID: CPS-2359
Change-Id: Ieb7eeb66ccbb03703626132c6d5c2eade0e7cb4b
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
7 months ago[k6] Lower load for legacy async batch operation test 00/139400/2
danielhanrahan [Wed, 13 Nov 2024 18:07:48 +0000 (18:07 +0000)]
[k6] Lower load for legacy async batch operation test

Legacy async batch operation test is failing and reporting zero
as result due to timeouts in the test.

- Lower total batch requests to 100 instead of 1000
- Limit the number of kafka messages per batch to 200 instead of 1000
  to avoid timeout issues.

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

7 months agoFixing dmi plugin version in NCMP 05/139405/3
mpriyank [Fri, 15 Nov 2024 15:21:53 +0000 (15:21 +0000)]
Fixing dmi plugin version in NCMP

- Fallback to previous stable version of NCMP in order to stabilize the
  CPS-NCMP CSIT issue so that we are not blocked in our development
- Note : Issue at DMI plugin is still investigated

Issue-ID: CPS-2503
Change-Id: I060c89e927465f16ef979e45f18f98fe605d5b7f
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
7 months agoMerge "Support alternate Id interface for ncmp inventory /ch/cmhandles endpoint"
Priyank Maheshwari [Fri, 15 Nov 2024 10:36:04 +0000 (10:36 +0000)]
Merge "Support alternate Id interface for ncmp inventory /ch/cmhandles endpoint"

7 months agoMerge "[k6] Output git build info in k6 log"
Toine Siebelink [Thu, 14 Nov 2024 08:29:18 +0000 (08:29 +0000)]
Merge "[k6] Output git build info in k6 log"

7 months agoMerge "Hashmark support in 3gpp objects"
Toine Siebelink [Wed, 13 Nov 2024 14:48:49 +0000 (14:48 +0000)]
Merge "Hashmark support in 3gpp objects"