summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy
AgeCommit message (Collapse)AuthorFilesLines
2024-02-23Merge "CmNotificationSubscription event from Dmi Plugin"Lee Anjella Macabuhay1-0/+85
2024-02-23Error reporting when registering cm handle with alternate idhalil.cakal4-86/+71
- refactored registration code all use cases; 1 method for each action - introduce new cps error code; 111 - TODO: error reporting registration, UPDATE Issue-ID: CPS-2100 Change-Id: I5049777ee4e08fdc94aa1db09e668e952ed8e1c3 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-23Merge "NCMP to DMI CmSubscription Event"Lee Anjella Macabuhay1-0/+64
2024-02-22Merge "NCMP to Client Cm Subscription Event"Lee Anjella Macabuhay1-0/+44
2024-02-22Introduce class for Module Delta during module syncdanielhanrahan2-23/+16
Removed ImmutableTriple<String, Map<String, String>, Collection<ModuleReference>> and replaced it with a ModuleDelta class to hold results. Split syncAndCreateOrUpgradeSchemaSetAndAnchor into methods syncAndCreateSchemaSetAndAnchor and syncAndUpgradeSchemaSet Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I95462ab55dcae7d98b9e2671fc278c4ded45f3fc
2024-02-22Improve performance of moduleSetTag lookupdanielhanrahan1-5/+7
- Using absolute cps-path /dmi-registry/cm-handles is faster than descendant cps-path //cm-handles due to CPS-2087. - Converting DataNodes to YangModelCmHandle allows checking if the handles are READY without needing to send additional DB queries via cmHandleQueries::cmHandleHasState. Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ied7e884b0f779f394854603a7f8b186d09eb5be8
2024-02-22Merge "Refactor YangDataConverter.convertCmHandleToYangModel"Sourabh Sourabh3-13/+14
2024-02-22Refactor check for no new modules in Module Syncdanielhanrahan2-39/+34
This change moves the check for no new module references into DmiModelOperations::getNewYangResourcesFromDmi (The method is only used by ModuleSyncService) Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I3cc65e7a327148ebe01b98b61dc64b70872e2cf5
2024-02-22Refactor YangDataConverter.convertCmHandleToYangModeldanielhanrahan3-13/+14
This method redundantly takes cmHandleId as a parameter, even though the DataNode representing a CM-handle is guaranteed to have the ID in a leaf called 'id'. Issue-ID: CPS-245 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib10097b6e13f7188fd933d6f6913110ec664273e
2024-02-21Improve unit test for regsitration, upgradeToineSiebelink1-13/+14
- verify schema set is created - add test case for upgarde to same tag Issue-ID: CPS-2027 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Id853f477d2a90a86d13828a27b9269c62e1d9462
2024-02-21Merge "adding isUniqueSubscriptionId method"Priyank Maheshwari1-2/+18
2024-02-21Upgrade yang modules using module set tagdanielhanrahan4-101/+17
- New algorithm is implemented as per the pseudo code -> https://wiki.onap.org/display/DW/CPS-1733%3A+Upgrade+YANG+Schema-Set+for+CM+Handle+Using+a+Module+Set+Tag Issue-ID: CPS-2027 Change-Id: I78fc1c8f927de1a1b814c3c1c62351dda58f2139 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
2024-02-21NCMP to Client Cm Subscription Eventmpriyank1-0/+44
- CmNotificationSubscriptionNcmpOut event to inform the client about the subscription he requested - Testware for the same - Code to provide the data to this producer will be part of other patches Issue-ID: CPS-2108 Change-Id: Ic302e798a20da54dd3c56d2cb792b800446cc2d3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-21Fix handling of blank moduleSetTagdanielhanrahan1-1/+1
Handling of blank moduleSetTag is very inconsistent. Sometimes it will be returned as null, '' or 'not-specified'. Specifically in the case of MODULE_UPGRADE_FAILED, on the retry, a blank moduleSetTag will be returned as 'not-specified', leading to incorrect upgrade. Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I3f4290dc5659c386c7b2b924325da2560d00d73b
2024-02-21Add moduleSetTag when getting a CM handledanielhanrahan1-6/+12
Test changes: - Check moduleSetTag (and alternateId) in unit test of get CM handle. - Verify moduleSetTag is updated in tests of CM handle upgrade. Code changes: - Set moduleSetTag when converting a YangModelCmHandle to NcmpServiceCmHandle. - Set moduleSetTag in YangModelCmHandle copy constructor. - Minor refactor using StringUtils::isBlank. Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6a9a92aa58d15c6ecf5a6bb21aa5c9d6ec8dc817
2024-02-21Remove alternate ID cachesleventecsanyi1-59/+0
- removed alternate id cache related classes and updated deployment.rst Issue-ID: CPS-2107 Change-Id: I567af7b2f44107fceffaef370205b00a5cf79522 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-20CmNotificationSubscription event from Dmi Pluginmpriyank1-0/+85
- Added infrastructure related code to read event from the dmi plugin - Just consuming and reading the message. - Core logic to introduced to be part of subsequent patches Issue-ID: CPS-2106 Change-Id: Ic58f4f80b3dded32df95daecac42315fa9212f58 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-19adding isUniqueSubscriptionId methodemaclee1-2/+18
Issue-ID: CPS-2044 Change-Id: I26b209ead80add7e60b4de9257a9f5c326ddea6f Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-02-19NCMP to DMI CmSubscription Eventmpriyank1-0/+64
- Ncmp to have a producer which converts CmNotificationSubscriptionDmiInEvent to Cloud event and then publishes it - For now , using the old topic prefix as topic name. Once topic names are finalized then they can be configured - Testware for the publishing code Issue-ID: CPS-2103 Change-Id: I83b6ce5b6647e92313839b25492cb076e528ce3e Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-16Use DB for checking Alternate IDshalil.cakal6-178/+174
- do NOT use hazelcast cache - introduced AlternateIcChecker - use checks during Inital registration - TODO: remvoe Hazalcast Cache (once perf test are OK) - TODO: use checks during UPDATE registration - TODO: error reporting during registration Issue-Id: CPS-2049 Change-Id: I0adcac52a7a49e26301758eafc4684152ddfcaf5 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-13Mapper to form event for DMI Pluginmpriyank1-0/+57
- cmSubscriptionPredicate to CmNotificationSubscriptionDmiInEvent mapper code and testware. - Based on the delta we find , we will be sending the events to the dmi plugins. Finding delta code will be separate patchset Issue-ID: CPS-2060 Change-Id: If1e15679b72c39352e3cf166651226df7e207ce0 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-13Prefix with CmNotificationSubscription refactoringmpriyank1-6/+6
- event schemas are now suffixed with CmNotificationSubscription - testware updated appropriately Issue-ID: CPS-2091 Change-Id: I9d0c4bdfaf7ea94812d35b071824d0fb083aa845 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-12Update cm-data-subscriptions modelmpriyank3-7/+7
- rename leaf-list subscribers to subscriptionIds - code using the same also updated - not creating a new version of model as nobody is using it at the moment Issue-ID: CPS-2088 Change-Id: I43d679047bdfc665b56f262757acc4bbaba2733f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-12CmSubscription minor code refactoringmpriyank4-112/+73
- As per discusstion , refactoring the naming of the classes and caches - Combining the validation service with CmSubscriptionPersistence service - removed dmiCmNotificationScopeFilter class and the attributes are part of Predicates only Issue-ID: CPS-2078 Change-Id: Ic2b3ee28a150f3ae6e0911e88296f01e22604ef5 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-08Merge "Correct use of Spock setup and cleanup methods (no need for @Before ↵Toine Siebelink3-39/+12
@After)"
2024-02-08Merge "Revert "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - ↵Toine Siebelink3-70/+23
error collection""
2024-02-08Revert "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error ↵Levente Csanyi3-70/+23
collection" This reverts commit 67681820f2a7fea88cbc6cbe5b3d483dae506d55. Reason for revert: does not work Change-Id: I92c063b59261d25774ee34664d834399c269f0c2 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-08Merge "Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error ↵Toine Siebelink3-23/+70
collection"
2024-02-08Introduce Hazelcast for alternateId-cmHandle relation pt. 2 - error collectionleventecsanyi3-23/+70
- added business logic to check duplicated ids (create and update scenarios) - added new unit test for CmHandleIdMapperSpec - added test for the new registration scenario Issue-ID: CPS-1988 Change-Id: I4bf2e25c87c57938d336f2fe70378b400bab07b0 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-08Correct use of Spock setup and cleanup methods (no need for @Before @After)ToineSiebelink3-39/+12
- unfortunately we copied the bad test code for logging about 4 times alraedy... - simplified setup for WatchdogSchedulingConfigurerSpec Issue-ID:CPS-465 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I8d068541263272fdf99a6e30d365d85e31726432
2024-02-08Merge "CmHandle delete is failing with InternalServerError: Null key is not ↵Toine Siebelink1-0/+9
allowed - add missing unit test"
2024-02-08Add alternateId to legacy lcm-eventJvD_Ericsson1-1/+16
Issue-ID: CPS-2039 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I03863e986ea6b847fd7d25e55a24f948ca9a983d
2024-02-07Replace sleep with PollingConditionsJvD_Ericsson4-55/+70
Issue-ID: CPS-1950 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I0e23c697ef6b5a134295728f352f2dff7be05a62
2024-02-07CmHandle delete is failing with InternalServerError: Null key is not allowed ↵leventecsanyi1-0/+9
- add missing unit test Issue-ID: CPS-2064 Change-Id: If765c25cae8d69796fff219fc39ab27455bfd957 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-02-06Merge "CmSubscription service layer method #1"Lee Anjella Macabuhay1-0/+50
2024-02-06Merge "CmSubscription validate datastore"Lee Anjella Macabuhay1-0/+39
2024-02-06moduleSetTag and cmhandle upgrade functionalities fixsourabh_sourabh3-18/+14
- Insert only unmapped yang resources - In case of removed module call dmi plugin service to get modules. Issue-ID: CPS-2027 Change-Id: Ic1903c20169a913c835a3eee909357daec45f51e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-02-02CmSubscription service layer method #1mpriyank1-0/+50
- adding a service layer method to check if we have an ongoing cmsubscription or not. - test scenario for the same. - Other service layer method to be introduced in the subsequent patches. Issue-ID: CPS-2042 Change-Id: I33637138457a0c5d49b80dd4967057bd5bfa69d4 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-01Merge "Extend API: Get Module Definitions"Sourabh Sourabh2-6/+25
2024-02-01Extend API: Get Module Definitionshalil.cakal2-7/+26
- add query parameters: module-name and revision to OpenAPI - extend the controller method to hande the new parameters - add the new method stack to the service layer - extend the SQL query to support the new parameters - add unit and integration testwares Issue-ID: CPS-1135 Change-Id: I089ad2ad71effb58ac0ba809e9f441d6cdb59c4f Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-01CmSubscription validate datastorempriyank1-0/+39
- introduced isValidDatastore to check the incoming datastore against the valid datastore for this use case. - Testware added Issue-ID: CPS-2059 Change-Id: I2602396fe2f404789fc4e0f01850eeba2a75bd21 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-01Introduce Hazelcast for alternateId-cmHandle relationleventecsanyi5-51/+234
- added new Hazelcast config - added cache initialization in CmHandleIdMapper - added unit tests - updated deployment.rst - refactored cache updating Issue-ID: CPS-1988 Change-Id: Iea6f884e584bf8cea8612ddbced4329e783c60a5 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-01-29Merge "Correct datastore names via DatastoreType Enum"Priyank Maheshwari1-2/+2
2024-01-26Correct datastore names via DatastoreType Enumemaclee1-2/+2
- Use existing DatastoreType enum in defining datastore name Issue-ID: CPS-2046 Change-Id: I6f2f77c96b239546f7141267c0c01edfc599b445 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-01-25CloudEvents support for cps-corempriyank11-141/+25
- Moving cloud events dependencies to the cps-service module instead of cps-ncmp-service - Testware has moved and new tests also introduced - EventsPublisher also moved Issue-ID: CPS-2040 Change-Id: Ibafb15e7e9efbdbe1e00e2b4f0da820bbcead004 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-22CmSubscription review commentsmpriyank1-1/+1
- Removed the old deprecated cmSubscription json examples - Incorporated minor review comments from myself Issue-ID: CPS-1951 Change-Id: Ifadaa186cc210b81bb1b27f73f537e1c11bf461d Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-01-22Read and validate incoming sub create request from Kafkaseanbeirne1-0/+93
Issue-ID: CPS-1951 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I402dacc47c93e77a4ca63598acebe27c780951de
2024-01-18Merge "Create datastores for NCMP w/subscription model"Priyank Maheshwari3-9/+40
2024-01-17Create datastores for NCMP w/subscription modelemaclee3-9/+40
Issue-ID: CPS-2035 Change-Id: I80234c7ca93c5774ee50082803cdc102f693a5a7 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-01-17Remove deprecated cmSubscription codempriyank13-1281/+0
- Newer approach for cm subscription is in progress so removing the deprecated code now - Also deleted the old cache config - Changes to trust level csit to fix the kafka unknown partition issue Issue-ID: CPS-2028 Change-Id: Ieb19669e53f3f64cca876fa67d0b6409a97b2a09 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>