summaryrefslogtreecommitdiffstats
path: root/cps-application/src
AgeCommit message (Collapse)AuthorFilesLines
2024-02-29Disable Spring Security and HTTP Basic Auth (CPS-2126 #1)danielhanrahan2-107/+3
This allows any authorization header to be passed in. Issue-ID: CPS-2127 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib1c5bd7024eed39afd1ae6e19325ed4733c853d4
2024-02-28Revert Spring Boot Upliftmpriyank1-1/+1
- reverting back to spring 3.1.2 - manual changes to revert as other apps not fully ready for the delivery Issue-ID: CPS-2133 Change-Id: I670b67916fa4a5d4e5bced6548b7fcd5ee12e855 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-26Merge "Remove subscriptionModelLoader flag"Lee Anjella Macabuhay1-1/+0
2024-02-23Remove subscriptionModelLoader flagmpriyank1-1/+0
- removed the flag as the functionality around model loader is stable now - removed the config parameter from the application yaml file as well Issue-ID: CPS-2112 Change-Id: Ie4e3317c0689615b900dcd9bbf1896bc3a5f37b3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-22Uplift Spring Boot to 3.2.2waqas.ikram1-1/+1
- Upgraded hypersistence-utils-hibernate-60 to hypersistence-utils-hibernate-63 - Introduced @Qualifier annotations where needed Issue-ID: CPS-2101 Change-Id: I8303592ed91584deb6ca5cd4e49800210b6ea989 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2024-01-25Omitting the basic auth header in healthcheck testwaqas.ikram1-2/+2
as it is not required and adding v3 to uri of api-docs Issue-ID: CPS-2045 Change-Id: If229bbd46a5c5187ddac242f8bfda00d5c951995 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2024-01-10Enable hibernate write batchingdanielhanrahan1-1/+4
- Implement fragment ID sequence generator with allocation size of 100 - Enable write batching for insert and update, with batch size of 100 - Write performance is over 2x faster Issue-ID: CPS-1795 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7ebd0f834abb57c593603e2cd3fafc7e3425ab1e
2023-12-20Updating config variable names for HttpClientwaqas.ikram1-0/+5
for DMI Issue-ID: CPS-2016 Change-Id: Ief5428e6e4afc8309ceed2a8221365e2fab31686 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
2023-12-18Remove Notification code for updated eventsmpriyank1-4/+0
- removed existing code for sending notifications to topic cps.dataupdated events formerly used by cps-temporal - corresponding testware removed or updated - unnecessary to fetch anchor details for delete and replace operation removed which might gain minor performance boost - yaml configurations , documentation removal and update - Added missing test for AsyncConfig to comply with coverage check Issue-ID: CPS-2005 Change-Id: I1848f7f229cb713fe8c0302ea50328e7451652ee Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-11-27Return permit-uri from root to securtyegernug2-2/+3
In Springboot 3.0 an error was observed with security.permit-uri throwing a PatternParseException. This appears to be fixed in 3.1.2 Issue-ID: CPS-1875 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I8dd4f66868a5cc4db636d77f123ad5dbbd61f4b4
2023-11-10Update Architecture rule to add cache packagedanielhanrahan1-1/+4
- Modify test to allow org.onap.cps.cache package to access CPS classes - Update archunit to avoid exceptions during build related to Java 17 Issue-ID: CPS-1958 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If74dd897b8e41b83e41ea2a35e087ee56beb3088
2023-11-06[BUG] CPS NCMP management endpoints updatempriyank1-4/+1
- CPS and NCMP management endpoint updated from /manage to /actuator now - The management port is same as application port now - CSIT test cases update - Update in Security params to allow the changed URL. - Admin guid update - Release notes updated - Local docker-compose and prometheus updated Issue-ID: CPS-1923 Change-Id: I013d35fd96d393dec8cf067bbeae0f92b6b8d8db Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-10-18Fix Sonar code smellsemaclee1-8/+8
- Update deprecated methods in webSecurityCOnfig - Remove 'deprecated' tag on methods that are to be removed in EventsPublisher as they are still being used, methods with deprecated tag (for removal) must not be used Issue-ID: CPS-89 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I104d4b3e362d22bb7fc020580de6cb4f390e54c9
2023-09-27Uplift Spring Boot to 3.1.2egernug1-3/+2
To align with Ericsson Spring Boot is being uplifted to version 3.1.2 Issue-ID: CPS-1888 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Icfe97df15ab67a7fb25e0a98e4bbbbe91f332321
2023-09-22Reinstate Spring Boot 3.0 after revertegernug2-9/+6
Issue-ID: CPS-1789 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Iee5c514ccdba36a387f83948d8a3ba26e6b1de5b
2023-09-20Revert "Migrate CPS to Spring-boot 3.0"Toine Siebelink2-4/+4
This reverts commit 9693ec51cf6526082f0ad0c3ad208d144cbbb163. Reason for revert: Bug fix delivery Change-Id: I73bdc1528192c662983b0bbef73b10b6d612a719 Signed-off-by: egernug <gerard.nugent@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2023-09-18Merge "Migrate CPS to Spring-boot 3.0"Toine Siebelink2-4/+4
2023-09-14Migrate CPS to Spring-boot 3.0egernug2-4/+4
Issue-ID: CPS-1789 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I932fca8a50cedf2ae0604401c5e2b27896e4d449
2023-09-04Dmi plugin watchdog cheking alivenesshalil.cakal1-0/+2
- Add capability of GET request into DmiRestClient - Add watchdog job to check aliveness of dmi plugins - DmiPluginStatus enum as UP or DOWN - Add unit tests for the new function in dmi rest client - Add unit tests for dmi watchdog Issue-ID: CPS-1856 Change-Id: Ic38a96f0485a0bfe1b6af5bb2f57f6119d8fa563 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-18Device heartbeat listenermpriyank1-0/+2
- Infrastructure code to have the kafka listener and distributed set in place - performance tested locally - testware added Issue-ID: CPS-1642 Change-Id: I775dbe6e6b520b8777faa08610db439877757572 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-08-04Ability to disable sending auth headermpriyank1-0/+1
- introduced configurable parameter to disable sending auth header in the request to dmi-plugin - default is to include the auth header - DMI_AUTH_ENABLED flag can be set to true/false to control the behaviour - Also added the env variables to the CSITs - updated release-notes Issue-ID: CPS-1819 Change-Id: If97c06e33f06e391d2190b7300d73210ed2f4e27 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-07-26Subscription Creation: NCMP to Client CloudEvent transformationhalil.cakal1-2/+2
- Delete legacy avc subscription event and event outcome schemas - Change subscription response and outcome sample json file contents - Change ncmp event response code to support avc subscriptions - Add mapper that maps cloud event to subscription event response - Add mapper that maps subscription event outcome to cloud event - Change subscription event response consumer to consume CloudEvents - Change time out task to support response event instead client id and name - Change subscription event response mapper to support Cloud Event - Change subscription outcome mapper to group subscription responses as per details and status - Change subscription status to have fromString functionality - Change all unit tests to support new functionalities - Add cps exceptions for cloud event and outcome type - Add details field in yang model - Change data node helper to supoort details field - Consolidate final subscription response codes - Fix code smells reported by SonarLint Issue-ID: CPS-1739 Change-Id: I5eadeb8ef40d3d7befb762b5a8d2139fe3c85d7e Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-06-20Merge "Replace deprecated WebSecurityConfigurerAdapter"Toine Siebelink2-13/+41
2023-06-15Patch #2 : Introduce kafka template for cloud eventssourabh_sourabh1-2/+2
- Introduced a new cloud kafka template for cloud events that reads it's configuration from application.yml - Kept legacy kafka template for backward compatibility utill all cps events moved to cloud event comply. - Modified application.yml producer and consumer value deserializer properties to support cloud events. - Added new cloudevents-bom used into cps-ncmp-service pom. - For the time being we will have 2 kafkatemplates (legacyEventKafkaTemplate, cloudEventKafkaTemplate) into EventsPublisher until we fully move to cloudevents for all events. Once all cps events will be cloud event compy, we have TODO task where Deprecated: legacyKafkaEventTemplate will be removed with its java configuration file KafkaTemplateConfig. Issue-ID: CPS-1724 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I78c15bd480db063b89c6630c46c2d3a328b4fae4 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-06-15Replace deprecated WebSecurityConfigurerAdapteregernug2-13/+41
WebSecurityConfigurerAdapter has been deprecated in Spring 2.7. Change needed to use SecurityFilterChain and InMemoryUserDetailsManager. Note: WebMvcTest does not autoimport configurations that use beans. Issue-Id: CPS-1742 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I100884f10beaac6ce87e603302280aeb78559017
2023-05-26Improve error scenarios SubscriptionEventForwarderlukegleeson1-1/+1
- Added placeholder for emtpy outcome response when no cmhandles match targets Issue-ID: CPS-1564 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ia04bb656c639946d259da779971ab29b6e91acea
2023-05-09Change default use of Model Loader to TRUEemaclee1-1/+1
Issue-Id: CPS-1688 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I18bb5e3ad45ccdf5f3a1e88dd5a34dc830e06f4a
2023-05-02Align the hazelcast cluster namesmpriyank1-0/+1
- 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>
2023-04-28Timeout for Subscription Create Partial Responselukegleeson1-6/+12
- 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
2023-04-27Add retry mechanism on Subscription loaderemaclee1-196/+198
Issue-ID: CPS-1568 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I35697c260cc1a774f50d12552996b39f812fc2de
2023-04-24Extend capability of distributed cachempriyank1-1/+8
- 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>
2023-03-21Add event to mapper as wellmpriyank1-0/+1
- Explicitly add event to the mapper - Also parameterized the cm-events topic to be overridden later Issue-ID: CPS-1554 Change-Id: Ia6e75117dbb4214648d40318989c4c5fe6fd69f1 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-03-10Introduce control switchmpriyank1-1/+4
- introduced a control switch and keeping it as false due to init issues Issue-ID: CPS-1537 Change-Id: I8455a5ff6fea09527c6f810ffbc620b4e38c488c Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-03-09Merge "Create Base and Sample Performance Integration Tests"Sourabh Sourabh1-1/+2
2023-03-09Create Base and Sample Performance Integration TestsToineSiebelink1-1/+2
- added data (folders) for different models and json data - added base and data for cps-ncmp (registry) specific test cases - integrated Ahila's (large) openroadm model and data (corrected version provided by Lee Anjella) - created profiles to exclude/include *PerfTest - fixed dependency test check - included integration test for overall coverage - increased margings in existing perf test to reduce nordix intermitten failures Issue-ID: CPS-1516 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ia82826f610636c14aa7e8939b385c278e5039817
2023-03-08[CPS] Add configurable params for topicmpriyank1-0/+3
- Configurable parameter for topic dmi-cm-events Issue-ID: CPS-1538 Change-Id: I5396ee8f50f33ea3c117291a314f10c1870966bc Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-01-31Introduce InstrumentationToineSiebelink5-15/+96
- Add instrumentation related dependency - Added Timed Instrumentation - CPS-Service Crud methods - CPS Yang parsing - NCMP Registration methods - NCMP Events handling - Remove manual Gauge for YanResources Cache as (better!) instrumentation is already built into the 3PP - Sorted dependecies alphabetically (as we used to enforce, to prevent duplicates) - Added ## P E R F O R M A N C E T E S T R E S U L T S ### mini report - (unrelated) test improvement (because of bug that turned out to be invalid) Reviewers: Sourabh,Priyank, Luke Issue-ID: CPS-1457 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I34b20bece2f59488b022b8effa9470704c57be4d
2023-01-23Merge "[NCMP] Consume & Forward to client topic"Toine Siebelink1-7/+7
2023-01-23[NCMP] Consume & Forward to client topicseanbeirne1-7/+7
-Consumes event from dmi-cm-events -Immediately forwards to static topic (topic selection for events comes later from subscription information) -Added Kafka test -SHOULD BE MERGED BEFORE DMI PART Issue-ID: CPS-138 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: I0a426381e2c3f9173b8d3916960c05722ad4f77d Signed-off-by: seanbeirne <sean.beirne@est.tech>
2022-12-22Consume Subscription Creation Eventseanbeirne1-0/+2
Issue-ID: CPS-1392 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I0a5a8c256319a1a2944ee6606db1c14b50e8f8e4
2022-10-17Node API - GET Method performance issue (disable sql logging)JosephKeenan1-0/+1
Reviewers: Toine, Sourabh, & Priyank Issue-ID: CPS-1171 Signed-off-by: JosephKeenan <joseph.keenan@est.tech> Change-Id: Ifc5c9c57c3e8bad15780c8cac09dcd3eea05df94
2022-09-20Add NCMP tag in propertiesmpriyank1-19/+19
- Added back NCMP tag back as part of the comment in patch https://gerrit.onap.org/r/c/cps/+/129274 - Added parallelism level under ncmp as well. - Correcting env variable in the docker compose file for local run as well as the CSITs. Issue-ID: CPS-1279 Change-Id: I1f2993ac66f47ee2e5e7db0c4a6aac113a714d2a Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-09-14Database tuning for cpssourabh_sourabh1-1/+1
- Reverted leakDetectionThreshold to its previous working value Issue-ID: CPS-1126 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ia43f164d2e24874ca09d3faad918020828661bef
2022-09-13CmHandle registration/module sync watchdog performance improvmentsourabh_sourabh1-4/+6
- Tuned CPS DB parameters - Removed deprecated CPS DB parameter - Modified module sync watch logic - Added aditional logs - Removed logic to get FragmentEntities as stream - Removed detaching of fragment entity as it was causing NCMP to break with an exception "SQLSTATE(08006)" Issue-ID: CPS-1126 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I0bde11895f754602dece132efde701d82b377f12
2022-09-01Performance Improvement: Watchdog Parallel execution with configurationsourabh_sourabh1-0/+4
- Introduced AsyncSyncExecutor to get task and execute it with configured number of parallel threads. - Number of parallel thread can be configured from application.yml. - AsyncTaskExecutorSpec is added - Fixed existing grovvy test now async task would be submitted. Issue-ID: CPS-1200 Change-Id: I58c0368b945c90e619c2acfc7458ba58de047484 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-08-29Performance Improvement: Use hazelcast blocking queueToineSiebelink1-1/+1
- Introducing hazelcast for queue and progress map - process batch of 100 at the time - decreased module sync watchdog sleeptime to 5 seconds - separate module sync tasks in new class and some other async preparations and easier testing - tests for batching in module sync watchdog - remove qualifiers annotation (support) where no longer needed Issue-ID: CPS-1210 Issue-ID: CPS-1126 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I0a7d3755bf774e27c5688741bddb01f427d4a8a7
2022-08-19Merge "Performance Improvement: Async Notification Pool Configuration"Joseph Keenan1-2/+2
2022-08-18Performance Improvement: Async Notification Pool ConfigurationToineSiebelink1-3/+3
Reduce threads available for notifications to allow more resources for module sync Issue-ID: CPS-1199 Issue-ID: CPS-1126 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Iff56dd614ea0074a1b6aa08b81e324e2d0ce33c1
2022-08-18Performance Improvement: Postgres Pool ConfigurationToineSiebelink1-1/+8
Issue-ID: CPS-1198 Issue-ID: CPS-1126 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I6e1e6b28cd8e20800df61deae1826ecc2db2945e
2022-07-28Enable/Disable Data Sync for Cm HandleDylanB95EST1-5/+1
-Create API Which will enable/disable data sync enabled flag -Default functionality of module sync watchdog is to set to false -Remove global config param -Will set initial sync state based on data sync enabled flag -Throws an Exception if the same data sync enabled flag tries to be set -Throws Exception if state is not in READY -Data Sync enabled must be true to complete data sync process - Delete all resource data within fragment table related to synced cm handle when data sync is set to false Issue-ID: CPS-1133 Change-Id: Ib47bbd8293f083c1d705d91bd0def74e6a105c72 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>