aboutsummaryrefslogtreecommitdiffstats
path: root/cps-application/src
AgeCommit message (Collapse)AuthorFilesLines
6 daysMove TrustLevel FeatureToineSiebelink1-0/+4
-Moved TrustLevel impl from Controller to Inventory Facade -Applied new package name convention using impl\inventory\trustlevel for this (sub)feature -Renamed some trustlevel related classes to better describe their role -Disabled failing architecture test (agreed this is tech. debt and created CPS-2293) -Refactored YangDataConverter method names and signatures (moved Spec to correct place) -Cleaned up names and javadoc of class now called DeviceTrustLevelMessageConsumer -Applied conventions to modified test methods Issue-ID: CPS-2255 Change-Id: Iccd20541488e6b61444bb2c7406c90e61a34124d Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
13 daysHandle high frequency (faster then DMI) of passthrough request in NCMPsourabh_sourabh1-0/+2
- Added pendingAcquireMaxCount property into appliaction.yml. - Added findbugs google annotations dependency. - Supressed "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" spotbugs low error for reactor.netty.resources.ConnectionProvider. Issue-ID: CPS-2262 Change-Id: Ie755e40282473933f2052fbe7654e7090bb9b337 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-06-06#1: Dedicated web client instance is assigned for data, model and health ↵sourabh_sourabh1-5/+12
services - Switched web client instance based on dmi service type (like data or model) - 3 diff. beans are configured for data, model and health dmi service. - Added configurable properties for data and model. - Hard coded properties are assigned for health service. Issue-ID: CPS-2231 Change-Id: I39fb739c07c41430dae43509fe29ece5306b7d71 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-05-31Added OpenTelemetry to CPSdavid.mcweeney1-0/+21
Change-Id: I192fa53e293ea43cdff92ebd44d0382eb290bb76 Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: CPS-2172
2024-05-22Remove un-used code of RestTemplatesourabh_sourabh1-2/+2
- Removed unused property belons to resttemplate - Refactored dmi properties class (from static internal class) - Overriden getter method of dmi basepath that removes any leading and trailing slashes from it. Issue-ID: CPS-2202 Change-Id: I16f61388fce2a6b9e258788fa826d485581d6138 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-05-20Merge "CmSubscription topics param update"Lee Anjella Macabuhay1-4/+4
2024-05-17Replaced RestTemplate with WebClient in synchronous DMI callssourabh_sourabh1-0/+1
- added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - encode query params for DMI request - added configurable buffer size - Re-used ncmp.dmi.httpclient.maximumConnectionsTotal parameter (as documented in RTD) to control webclient connection poolsize Issue-ID: CPS-2173 Change-Id: I21584563034d58e8ae3ff3cbcf172e0d14b408fb Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-05-17CmSubscription topics param updatempriyank1-4/+4
- topic application parameters updated to be in sync with the actual convention we are following for the flow. - environment variables also updated to follow the same - removed the unused parameters related to notification Issue-ID: CPS-2210 Change-Id: If5adb3dac1ce81df5afe2e99f99513adc2011cc9 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-08Conditional cps change eventsmpriyank2-2/+6
- introduced a parameter to control the cps core change event notifications. we should be able to disable these notifications without affecting other notification flows. - fixed the LayeredArchitectureTest as we are accessing the Anchor model in the events package now. Issue-ID: CPS-2213 Change-Id: Id875925bc14de1cc6e8fa3193c0df470e09fe43f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-02Merge "Add Notification support in cps core"Priyank Maheshwari1-3/+4
2024-04-30[BUG]Defaults for cps and dmi user and passmpriyank1-4/+4
- provided default values for DMI_USERNAME and DMI_PASSWORD which is required to set when DMI_AUTH_ENABLED is true - Also provided defaults for CPS_USERNAME and CPS_PASSWORD as its been used in the logback xml file and if not provided then causes an issue with the logger Issue-ID: CPS-2194 Change-Id: I70fdbeca970556c7bd19f27c1b6b5123fd591283 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-04-30Reverted web client changes as it breaking CPS functionality:sourabh_sourabh1-1/+0
1. Error handling not working 2. Unable to make dmi call as url appens extra "/" Commit 1: Replace RestTemplate with WebClient in synchronous DMI calls - added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - ingnored failing NCMP related integration tests (related to WebClient, will be fixed in a future patch) - encode query params for DMI requests Commit 2: Module sync task failing with WebClient - added configurable buffer size Commit 3: Re-use ncmp.dmi.httpclient.maximumConnectionsTotal parameter (as documented in RTD) to control webclient connection poolsize Issue-ID:CPS-989, CPS-2195, CPS-2198 Change-Id: I6c71ab2801b222708404f51bd60f2b3031ebf32e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-04-30Add Notification support in cps corerajesh.kumar1-3/+4
Add notification support using cloud events Issue-ID:CPS-2068 Change-Id: I56c34400dc73c71b936a51260efd240223babacd Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2024-04-26Module sync task failing with WebClientleventecsanyi1-0/+1
- added configurable buffer size Issue-ID: CPS-2195 Change-Id: I7cdb09856fd4d80134a91e54faa7e6600f3721dc Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-04-23[BUG] Make failed async task report failure on Kafka topicdanielhanrahan1-2/+2
- In event of async task timeout, error code 102 (DMI_SERVICE_NOT_RESPONDING) is sent to client topic. - In event of unexpected error (such as database unavailable), error code 108 (UNKNOWN_ERROR) is sent to client topic. - The default timeouts have been adjusted so that the task timeout (60s) is longer than the HTTP and Database timeouts (30s), so that expected codes are returned. Issue-ID: CPS-2186 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I84c3447a625e084c445ab2f5c01e2b32a0c971ac
2024-03-29Uplift Spring boot 3.2.4emaclee1-1/+1
- uplifted spring boot from 3.1.2 to 3.2.4 - removed redundant dependencies - upgraded relevant dependencies - use of @Bean(some_name) is give a specific bean name - using @Bean(some_name) with @Qualifier so on the injection point to specify which bean to actually inject, this is used as we deal with multiple beans of the same type. Issue-ID: CPS-2101 Change-Id: I64d5bf567b9eb03fb39034a46528d0160b332715 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-03-14[Bug] Removing inner TaskExecutor to call DMImpriyank1-1/+1
- Removing TaskExecutor from cps-ncmp-service package as anyways the call coming over from the cps-ncmp-rest layer is managed by a different thread executor(CpsNcmpTaskExecutor) - Provided 60secs timeout value. - Spawning new thread from a different executor might not be needed - Removing @Async from a non spring managed method as its of no use Issue-ID: CPS-2150 Change-Id: Ic99632983aff2c40df81421d782cf98ec600fc41 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
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>