cps.git
20 months agoMerge "CmHandleState transition using state handler"
Toine Siebelink [Fri, 12 Aug 2022 13:41:17 +0000 (13:41 +0000)]
Merge "CmHandleState transition using state handler"

20 months agoMerge "Get Node API fix"
Toine Siebelink [Fri, 12 Aug 2022 13:38:37 +0000 (13:38 +0000)]
Merge "Get Node API fix"

20 months agoGet Node API fix 58/130258/2
puthuparambil.aditya [Thu, 11 Aug 2022 09:55:43 +0000 (10:55 +0100)]
Get Node API fix

Issue-ID: CPS-1179
Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
Change-Id: I1450ed5d05afd6dd30484eaf19b1e40fd586df8e

20 months agoMerge "Chore: Fix typo in INFO.yaml file"
Toine Siebelink [Thu, 11 Aug 2022 10:19:26 +0000 (10:19 +0000)]
Merge "Chore: Fix typo in INFO.yaml file"

20 months agoCmHandleState transition using state handler 02/130202/8
mpriyank [Fri, 5 Aug 2022 15:34:33 +0000 (16:34 +0100)]
CmHandleState transition using state handler

- Raise LCM Event when state transition happens.
- Raised events for ADVISED to READY, ADVISED to LOCKED, LOCKED to
  ADVISED.
- Refactor existing code to raise the events correctly.
- Refactored existing test scenarios to comply with the code change.

Issue-ID: CPS-1034
Change-Id: Ie548e644f6133304d7fa36c892ca2bec7393c074
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
20 months agoMerge "CSITs for DataStore SyncState"
Toine Siebelink [Wed, 10 Aug 2022 13:04:03 +0000 (13:04 +0000)]
Merge "CSITs for DataStore SyncState"

20 months agoCSITs for DataStore SyncState 08/130208/4
emaclee [Tue, 9 Aug 2022 08:03:57 +0000 (09:03 +0100)]
CSITs for DataStore SyncState

- add new test for dataSyncEnabled API
- verify data sync follows after setting dataSyncEnabled flag

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

20 months agoChore: Fix typo in INFO.yaml file 16/130216/1
Bengt Thuree [Wed, 10 Aug 2022 04:35:51 +0000 (14:35 +1000)]
Chore: Fix typo in INFO.yaml file

Remove duplicate on PTL, and fix his UserID.

Signed-off-by: Bengt Thuree <bthuree@linuxfoundation.org>
Change-Id: I3ed42eac79e16690f930a65687fd1e88030644c8

20 months agoModule Sync, Data Sync, Retry Mechanism RTD 03/130203/5
DylanB95EST [Mon, 8 Aug 2022 14:22:54 +0000 (15:22 +0100)]
Module Sync, Data Sync, Retry Mechanism RTD

- Add Documentation for Module Sync, Data Sync,
  and Retry Mechanism Proccesses for RTD
- Update CPS-Core header on the Index to just CPS
- Add Cps-NCMP Customizations for retry mechanism and
  data sync

Issue-ID: CPS-1181
Change-Id: Idb76de380e49e42ca337cabcf2708b940e15f46f
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
20 months agoMerge "Rename name column in yang resource table"
Joseph Keenan [Mon, 8 Aug 2022 09:36:00 +0000 (09:36 +0000)]
Merge "Rename name column in yang resource table"

20 months agoMerge "Upgrade Postgres Cps-Core"
Joseph Keenan [Mon, 8 Aug 2022 09:35:06 +0000 (09:35 +0000)]
Merge "Upgrade Postgres Cps-Core"

20 months agoRename name column in yang resource table 80/130180/2
DylanB95EST [Thu, 4 Aug 2022 17:07:24 +0000 (18:07 +0100)]
Rename name column in yang resource table

- Rename name column in yang_resource table to file_name
- Refactor instances where it occures in code and tests
- Add new changelog file to rename occurance

Issue-ID: CPS-529
Change-Id: I2aff97410bdb041b90d8ceaeff75e562ef8d9238
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
20 months agoUpgrade Postgres Cps-Core 81/130181/2
DylanB95EST [Thu, 4 Aug 2022 12:25:31 +0000 (13:25 +0100)]
Upgrade Postgres Cps-Core

Upgrade postgres version to 14 in accordance with Seccom

Issue-ID: CPS-897
Change-Id: I332c88f3c3e1ec3dd55afe31af5714b690b6bd07
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
20 months agoState Model RTD 77/130177/7
DylanB95EST [Thu, 4 Aug 2022 13:16:33 +0000 (14:16 +0100)]
State Model RTD

Add Read The Doc documentation for CM-Handle state model
Briefly explain all 5 potnetial cm handle states

Issue-ID: CPS-1162
Change-Id: Iee52f9c280929337abf4aac2f5c9bbfb1edde30f
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
20 months agoDocument DataStore Sync State(RTD) 34/130034/3
bmiklos [Thu, 4 Aug 2022 13:36:11 +0000 (15:36 +0200)]
Document DataStore Sync State(RTD)

Added a CM-Handle data sync state description section under
Cps-Modelling -> NCMP-Modelling -> Basic Concepts -> Cm Handle

Issue-ID: CPS-1164
Change-Id: Ia53a1ccbacda388ec98a3de936af0913edad1c58
Signed-off-by: bmiklos <miklos.baranyak@est.tech>
20 months agoMerge "Query CM Handles RTD"
Joseph Keenan [Thu, 4 Aug 2022 12:20:29 +0000 (12:20 +0000)]
Merge "Query CM Handles RTD"

20 months agoQuery CM Handles RTD 23/130023/5
lukegleeson [Mon, 25 Jul 2022 10:00:11 +0000 (11:00 +0100)]
Query CM Handles RTD

Updates to RTD for CM Handles Querying
Removed documented limitation in CPS path which has since been implemeneted
Updated dmi-registry file in RTD modeling

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

20 months agoLcmEvent state handler refactoring 06/130006/13
mpriyank [Thu, 21 Jul 2022 15:38:55 +0000 (16:38 +0100)]
LcmEvent state handler refactoring

- State handler will now handle new structure of LcmEvent.
- We have 3 types of events i.e create, update and delete.
- Introduced the LcmEventCreatorHelper to delegate some of the
  responsibility of event creation based on event type and the state.
- New tests and existing refactoring
- Code rebased
- Refactored name as per group code review
- Code rebase with other commits
- Used copy constructor for deep copy operation of NcmpServiceCmhandle
  and CompositeState
- UPCOMING : Related user stories to trigger the event publishing using
  state handler.

Issue-ID: CPS-1128
Change-Id: I94b5a87d37d6a174c017ee0aa37cd0f0f74ba084
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
21 months agoMerge "Enable/Disable Data Sync for Cm Handle"
Joseph Keenan [Tue, 2 Aug 2022 12:59:07 +0000 (12:59 +0000)]
Merge "Enable/Disable Data Sync for Cm Handle"

21 months agoMerge "Incorrect response to {} for cmhandle id-searches"
Joseph Keenan [Tue, 2 Aug 2022 12:47:52 +0000 (12:47 +0000)]
Merge "Incorrect response to {} for cmhandle id-searches"

21 months agoMerge "Query CmHandles using CPS path"
Joseph Keenan [Tue, 2 Aug 2022 12:26:46 +0000 (12:26 +0000)]
Merge "Query CmHandles using CPS path"

21 months agoIncorrect response to {} for cmhandle id-searches 59/130059/2
lukegleeson [Thu, 28 Jul 2022 16:00:46 +0000 (17:00 +0100)]
Incorrect response to {} for cmhandle id-searches

An empty body for the CmHandles id-searches api returns an anchor instead of all cm-handles
Now returns all childnode ids for the dmi-registry

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

21 months agoMerge "Upgrade Liquibase to Version 4.14.0"
Joseph Keenan [Fri, 29 Jul 2022 14:35:27 +0000 (14:35 +0000)]
Merge "Upgrade Liquibase to Version 4.14.0"

21 months agoMerge "LCM events RTD"
Joseph Keenan [Fri, 29 Jul 2022 14:22:56 +0000 (14:22 +0000)]
Merge "LCM events RTD"

21 months agoLCM events RTD 49/130049/5
emaclee [Thu, 28 Jul 2022 05:52:39 +0000 (06:52 +0100)]
LCM events RTD

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

21 months agoQuery CmHandles using CPS path 53/129953/9
lukegleeson [Mon, 11 Jul 2022 09:55:53 +0000 (10:55 +0100)]
Query CmHandles using CPS path

Added withCpsPath condition parameter
Validated to prevent misuse and blocking of querying using private properties
Updated OpenAPI with examples and links to documentation
Moved methods related to cmHandle querying using cps path from InventoryPersistence to CmHandleQueries
Renamed private method deleteSchemaSetAndListElementByCmHandleId to deleteCmHandleByCmHandleId

Issue-ID: CPS-977
Change-Id: I83827215b7e58de74f8f62cd0140516d217d93f1
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
21 months agoEnable/Disable Data Sync for Cm Handle 86/129986/11
DylanB95EST [Tue, 19 Jul 2022 10:36:10 +0000 (11:36 +0100)]
Enable/Disable Data Sync for Cm Handle

-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>
21 months agoUpgrade Liquibase to Version 4.14.0 43/130043/1
lukegleeson [Wed, 27 Jul 2022 14:13:45 +0000 (15:13 +0100)]
Upgrade Liquibase to Version 4.14.0

liquibase-core 4.14.0 has been separated from commercial liquibase
As such, license should be resolved

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

21 months agoDistributed datastore solution for Module Sync Watchdog 22/129922/16
kissand [Thu, 14 Jul 2022 10:37:14 +0000 (12:37 +0200)]
Distributed datastore solution for Module Sync Watchdog

- use semaphore map in ModuleSyncWatchdog
- increase test timeout, because it needs more time for hazelcast
initialization

Issue-ID: CPS-1015
Change-Id: I71feed8fbbd047af9fabba29a5f762a1f17a1c78
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
21 months agoCmHandle creation performance degradation 29/129829/11
sourabh_sourabh [Thu, 7 Jul 2022 15:53:45 +0000 (16:53 +0100)]
CmHandle creation performance degradation

- Created a dedicated threadpool for scheduler.
- Tuned async threadpool of notification executor from setting RejectedExecutionHandler and application.yml.

Issue-ID: CPS-1126
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I2afe3c76c1aec78751777df0d2f08ddb8dcee102

21 months agoDe-registration: send event(s) using central state 32/129932/16
sourabh_sourabh [Mon, 25 Jul 2022 08:49:40 +0000 (09:49 +0100)]
De-registration: send event(s) using central state

- refactored method "parseAndRemoveCmHandlesInDmiRegistration"
- added method to send events for DELETING and DELETED
- introduced private method in state handler
- updated unit tests for registration spec
- added unit test to cover new private method in state handler

Issue-ID: CPS-1003
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: Ifc1d1e94b7103d85b6352b196edf7075257c211a
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
21 months agoRefractor code to use the new LcmEvent schema 33/129933/12
bmiklos [Thu, 14 Jul 2022 15:15:43 +0000 (17:15 +0200)]
Refractor code to use the new LcmEvent schema

-Old schema deleted and comments from tests are removed
-EventDateTimeFormatter utility added
-From LcmEventsCreator.populateLcmEvent the NcmpServiceCmHandle param
removed and tests are fixed accordingly
-Changes made in test of the LcmEventsCreator for payload testing
to make it more clear

Issue-ID: CPS-1147
Change-Id: Id87c81f2755a6617a0fc68ba92a3d0e3170fd20f
Signed-off-by: bmiklos <miklos.baranyak@est.tech>
21 months agoUpdate dependencies (release task) 66/129966/1
ToineSiebelink [Mon, 18 Jul 2022 10:38:37 +0000 (11:38 +0100)]
Update dependencies (release task)

Removed unnecessary direct dependency
- spring-context

Issue-ID: CPS-1106

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

21 months agoUpdate dependencies (release task) 27/129927/2
ToineSiebelink [Thu, 14 Jul 2022 12:38:26 +0000 (13:38 +0100)]
Update dependencies (release task)

Update to latest dependencies (minor) releases
-spring-boot-dependencies 2.6.9
-spring-cloud-dependencies 2021.0.3

Issue-ID: CPS-1106

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

21 months agoRemove ALL Docker File Versions 19/129919/2
sourabh_sourabh [Thu, 14 Jul 2022 09:23:35 +0000 (10:23 +0100)]
Remove ALL Docker File Versions

Issue-ID: CPS-1095
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I11790e271ec784dfa9dbdaea497d50e95f884600

21 months agoMerge "Code Refactoring Ncmp* to Lcm* as per new scope"
Toine Siebelink [Thu, 14 Jul 2022 09:18:17 +0000 (09:18 +0000)]
Merge "Code Refactoring Ncmp* to Lcm* as per new scope"

21 months agoMerge "Refactor unit test for Notification Error Handler"
Toine Siebelink [Thu, 14 Jul 2022 08:41:38 +0000 (08:41 +0000)]
Merge "Refactor unit test for Notification Error Handler"

21 months agoCode Refactoring Ncmp* to Lcm* as per new scope 39/129839/3
mpriyank [Mon, 11 Jul 2022 11:15:55 +0000 (12:15 +0100)]
Code Refactoring Ncmp* to Lcm* as per new scope

- Refactored code to reflect the LcmEvents scope now.
- Test cases updated and dependencies reviewed.
- You can find few occurences of NcmpEvent for now but that will be
  cleaned up once we implement CPS-1104 which is for LcmEvent schema
- UPCOMING: LcmEvent schema and then the code to publish the events on
  cmHandleStates
- LATER : LcmEvents based on public properties update.

Issue-ID: CPS-1137
Change-Id: I9f395ed733b4028e706205894c36a38412e3452e
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
21 months agoRefactor unit test for Notification Error Handler 12/129912/2
emaclee [Wed, 13 Jul 2022 16:11:51 +0000 (17:11 +0100)]
Refactor unit test for Notification Error Handler

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

21 months agoAgree LCM Event Schema(s) 95/129895/3
bmiklos [Tue, 12 Jul 2022 15:03:34 +0000 (17:03 +0200)]
Agree LCM Event Schema(s)

New schema was created according to discussion
with minor fixes 2

Issue-ID: CPS-1104
Change-Id: I1809b679b2cc4d17c278f9e3a6fbd477ea2f3c84
Signed-off-by: bmiklos <miklos.baranyak@est.tech>
21 months agoMerge "Updating docker-compose version from 3.3 to 3.8"
Toine Siebelink [Tue, 12 Jul 2022 09:31:38 +0000 (09:31 +0000)]
Merge "Updating docker-compose version from 3.3 to 3.8"

21 months agoUpdating docker-compose version from 3.3 to 3.8 11/129811/3
JosephKeenan [Thu, 7 Jul 2022 08:24:43 +0000 (09:24 +0100)]
Updating docker-compose version from 3.3 to 3.8

Issue-ID: CPS-1095
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Change-Id: I31601a1f486a4925ed880283c160cd827fe2255b

21 months agoCmHandleState Handler 08/129808/7
mpriyank [Wed, 6 Jul 2022 20:56:47 +0000 (21:56 +0100)]
CmHandleState Handler

- State handler taking care of ADVISED, READY and LOCKED state
  transition at the moment.
- For now I have not removed the actual code but eventually state
  handler will take care of persisting the state and publishing of the
  events
- Rebased code to add the global parameter related to dataSyncCache
- UPCOMING : The classes will be prefixed/renamed with LCM once we have the
  LcmEvent created with new schema

Issue-ID: CPS-1118
Change-Id: Ic45d95169eb0c06cfb35c907d34380dbcbf2da11
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
21 months agoMerge "Define Initial Data Sync Enabled Flag and state"
Joseph Keenan [Thu, 7 Jul 2022 15:32:12 +0000 (15:32 +0000)]
Merge "Define Initial Data Sync Enabled Flag and state"

21 months agoDefine Initial Data Sync Enabled Flag and state 04/129804/3
DylanB95EST [Wed, 6 Jul 2022 12:54:01 +0000 (13:54 +0100)]
Define Initial Data Sync Enabled Flag and state

- Define the initial Data Sync Cache enabled through
configuration parameter
- Set the data sync enabled flag based on this
- And in turn define the initial sync state of the
Data Sync

Issue-ID: CPS-1119
Change-Id: I43bf03c79481291bf47c9b672f7bf408d789df61
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
21 months agoMerge "Improve test coverage on CompositeStateBuilder"
Toine Siebelink [Thu, 7 Jul 2022 15:14:53 +0000 (15:14 +0000)]
Merge "Improve test coverage on CompositeStateBuilder"

21 months agoUpdate cps-ncmp info.yaml 28/129828/1
JosephKeenan [Thu, 7 Jul 2022 14:45:37 +0000 (15:45 +0100)]
Update cps-ncmp info.yaml

Issue-ID: CPS-1134
Change-Id: I093eeb6e6f70bf82ba7868eb8985be91eb1d1c24
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
21 months agoImprove test coverage on CompositeStateBuilder 14/129814/1
bmiklos [Thu, 7 Jul 2022 11:32:16 +0000 (13:32 +0200)]
Improve test coverage on CompositeStateBuilder

Issue-ID: CPS-475
Change-Id: Id24f2b0c6fe95ca9c7559a8dbd160c4566ddc32f
Signed-off-by: bmiklos <miklos.baranyak@est.tech>
21 months agoMerge "Move persistence methods from NCMPproperty handler"
Joseph Keenan [Wed, 6 Jul 2022 11:32:25 +0000 (11:32 +0000)]
Merge "Move persistence methods from NCMPproperty handler"

21 months agoMerge "Distributed map setup for Module and Data Sync"
Toine Siebelink [Wed, 6 Jul 2022 10:28:38 +0000 (10:28 +0000)]
Merge "Distributed map setup for Module and Data Sync"

21 months agoDistributed map setup for Module and Data Sync 38/129738/14
mpriyank [Fri, 1 Jul 2022 13:47:09 +0000 (14:47 +0100)]
Distributed map setup for Module and Data Sync

- Introduce the hazelcast dependency and check how the builds react to
  it.
- Data Sync and Module Sync Map config.
- Added basic test scenarios.
- Updating the artifact-id from hazelcast-all to hazelcast-spring and
  version is 4.2.5. (5.1.2 is latest but has known vulnerabilities)
- Refactored the code as per the onsite review session
- Upcoming : Actual sub-task which will use the distributed maps in
  respective use cases.

Issue-ID: CPS-1050
Change-Id: I60314c4ff95c267b186b20862aef93a5c389a971
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
21 months agoMove persistence methods from NCMPproperty handler 82/129782/4
emaclee [Mon, 4 Jul 2022 21:49:41 +0000 (22:49 +0100)]
Move persistence methods from NCMPproperty handler

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

21 months agoCoverage for NotificationErrorHandler 83/129783/4
emaclee [Mon, 4 Jul 2022 22:23:22 +0000 (23:23 +0100)]
Coverage for NotificationErrorHandler

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

21 months agoMove persistence related methods 01/129701/7
emaclee [Tue, 28 Jun 2022 12:13:21 +0000 (13:13 +0100)]
Move persistence related methods

-created new method in inventory persistence service for getting module
references

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

21 months agoMerge "Fix: cps-ncmp-rest-stub implement new methods"
Toine Siebelink [Mon, 4 Jul 2022 11:18:17 +0000 (11:18 +0000)]
Merge "Fix: cps-ncmp-rest-stub implement new methods"

22 months agoFix: cps-ncmp-rest-stub implement new methods 72/129772/2
lukegleeson [Mon, 4 Jul 2022 09:09:35 +0000 (10:09 +0100)]
Fix: cps-ncmp-rest-stub implement new methods

Override getModuleDefinitionsByCmHandleId
Override getModuleReferencesByCmHandle

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

22 months agoMerge "Simplified 'External' lock reason Mapping"
Joseph Keenan [Mon, 4 Jul 2022 09:11:58 +0000 (09:11 +0000)]
Merge "Simplified 'External' lock reason Mapping"

22 months agoSimplified 'External' lock reason Mapping 04/129704/10
lukegleeson [Tue, 28 Jun 2022 11:15:33 +0000 (12:15 +0100)]
Simplified 'External' lock reason Mapping

Refactored LOCKED_MISBEHAVING -> LOCKED_MODULE_SYNC_FAILED
CompositeStateMapper will change internal reason LOCKED_MODULE_SYNC_FAILED to external reason LOCKED_MISBEHAVING for client payloads
Changed openapi description of lock-reason to reflect only enum currently available LOCKED_MISBEHAVING

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

22 months agoMerge "Add Logging to specify next retry"
Joseph Keenan [Mon, 4 Jul 2022 05:59:03 +0000 (05:59 +0000)]
Merge "Add Logging to specify next retry"

22 months agoAdd Logging to specify next retry 68/129768/3
DylanB95EST [Fri, 1 Jul 2022 15:38:14 +0000 (16:38 +0100)]
Add Logging to specify next retry

Adding logging to specify the next time in minutes
until the retry mechanism will attempt to unlock
the cm handle if it is not yet ready to be unlocked

Issue-ID: CPS-1076
Change-Id: Ic2b011966c779f13ad8380ebfd7d4b4354e6b3e1
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
22 months agoMerge "Modify Unit test for module definition"
Toine Siebelink [Fri, 1 Jul 2022 15:59:33 +0000 (15:59 +0000)]
Merge "Modify Unit test for module definition"

22 months agoModify Unit test for module definition 69/129769/1
emaclee [Fri, 1 Jul 2022 15:42:27 +0000 (16:42 +0100)]
Modify Unit test for module definition

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

22 months agoMerge "cps-ncmp-rest-stub can not be compiled and executed"
Toine Siebelink [Fri, 1 Jul 2022 15:40:56 +0000 (15:40 +0000)]
Merge "cps-ncmp-rest-stub can not be compiled and executed"

22 months agoMerge "use separated get methods for every cmHandle instead of one "get all" query"
Toine Siebelink [Fri, 1 Jul 2022 09:54:52 +0000 (09:54 +0000)]
Merge "use separated get methods for every cmHandle instead of one "get all" query"

22 months agocps-ncmp-rest-stub can not be compiled and executed 96/129696/4
puthuparambil.aditya [Mon, 27 Jun 2022 15:11:36 +0000 (16:11 +0100)]
cps-ncmp-rest-stub can not be compiled and executed

Issue-ID: CPS-1094
Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
Change-Id: I2cd010e0bbe140198db22cf1f62cc8b0b9c80729

22 months agouse separated get methods for every cmHandle instead of one "get all" 24/129724/4
kissand [Thu, 30 Jun 2022 10:14:56 +0000 (12:14 +0200)]
use separated get methods for every cmHandle instead of one "get all"
query

Issue-ID: CPS-1085
Change-Id: Ifac152f606b25b7a7d143315dba6d73698ef914e
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
22 months agoMerge "Allow Module Re-Sync"
Toine Siebelink [Fri, 1 Jul 2022 08:08:14 +0000 (08:08 +0000)]
Merge "Allow Module Re-Sync"

22 months agoAllow Module Re-Sync 98/129698/5
lukegleeson [Mon, 27 Jun 2022 15:26:21 +0000 (16:26 +0100)]
Allow Module Re-Sync

Allows the Resync of an already synced CmHandle
Currently: Advised -(create schemaset)-> Ready -(manual write)-> Advised -> Locked as schemaset for cmhandle already exists
With this: Advised -(create schemaset)-> Ready -(manual write)-> Advised -(delete schemaset, create schemaset)-> Ready
Included some logging
Renamed ModuleSyncSpec -> ModuleSyncWatchdogSpec to match class

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

22 months agoComposite state transition code change 20/129720/2
sourabh_sourabh [Wed, 29 Jun 2022 11:36:40 +0000 (12:36 +0100)]
Composite state transition code change

- Code cannge to set datastore to Unsynchronized when state moves from advice to ready
- if resource data is not available or there is any issue while reading
  data from simulator then state will be set to synchronized else remain
  unsynchronized.
- Handle serialization failure on empty bean.

Issue-ID: CPS-1000
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: Ie51a787770da649e00aaefc00341756f92f9fa83

22 months agoAdd method to get YANG module sources for CM handle 50/129650/20
emaclee [Fri, 17 Jun 2022 16:42:56 +0000 (17:42 +0100)]
Add method to get YANG module sources for CM handle

- part of this commit includes renaming the enum SyncState to
  DataStoreSyncState

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

22 months agoMerge "Fix performance degradation bug"
Joseph Keenan [Thu, 30 Jun 2022 10:06:53 +0000 (10:06 +0000)]
Merge "Fix performance degradation bug"

22 months agoMerge "Retry Module-Sync based on from last failure"
Toine Siebelink [Thu, 30 Jun 2022 08:55:31 +0000 (08:55 +0000)]
Merge "Retry Module-Sync based on from last failure"

22 months agoMerge "Kafka consumer can not be turned off"
Toine Siebelink [Thu, 30 Jun 2022 08:43:50 +0000 (08:43 +0000)]
Merge "Kafka consumer can not be turned off"

22 months agoKafka consumer can not be turned off 36/129636/36
JosephKeenan [Thu, 16 Jun 2022 15:19:09 +0000 (16:19 +0100)]
Kafka consumer can not be turned off

-NOTE: Build will fail until docker-compose version issues on build
server are fixed
  --Ticket raised https://jira.linuxfoundation.org/plugins/servlet/theme/portal/2/IT-24219
-added flag for async
-added response if async is triggered without being enabled & associated test
-modified to use one global flag for notifications

Issue-ID: CPS-1088
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Change-Id: If9d988b4dcb71bf37c1b1bf9464090782708ffc2

22 months agoFix performance degradation bug 29/129629/13
kissand [Tue, 28 Jun 2022 15:08:33 +0000 (16:08 +0100)]
Fix performance degradation bug

- do NOT use cpsPath query for gettign individual CM Handles
- change order of queries for more efficency (property query first)

Issue-ID: CPS-1085
Change-Id: Ia3bdf4f0d245a2b128557352685d2aa17c1f939c
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
22 months agoGet cm-handle state endpoint 76/129476/11
lukegleeson [Thu, 2 Jun 2022 09:56:43 +0000 (10:56 +0100)]
Get cm-handle state endpoint

Added new get cm-handle state endpoint
Refactored RestOutputCmHandleState to CmHandleCompositeState
Created new RestOutputCmHandleCompositeState OpenApi object
^This is done so that we get '"state: {" at the start of JSON response
Refactored RestOutputCmHandleStateMapper to CmHandleStateMapper
Added more detailed composite state to get cmHandleDetails endpoint tests
Rebased code
Code rebased on top of 129658: Unable to change state from LOCKED to ADVISED | https://gerrit.onap.org/r/c/cps/+/129658 which fixes output error

Issue-ID: CPS-1019
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I361117c98c256a4aa578c13d21926bc6d7876a15

22 months agoRetry Module-Sync based on from last failure 05/129705/3
DylanB95EST [Mon, 20 Jun 2022 12:45:19 +0000 (13:45 +0100)]
Retry Module-Sync based on from last failure

Retry algorithm for module-sync based on last failure
Poll Lock Reason, check if lock has surpassed minimum time
based on last update time and lock reason

Issue-ID: CPS-1076
Change-Id: Ifbbabd2b403f88f1bbe3fae3f125b1e9cb2091aa
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
22 months agoUnable to change state from LOCKED to ADVISED 58/129658/12
sourabh_sourabh [Mon, 27 Jun 2022 13:08:03 +0000 (14:08 +0100)]
Unable to change state from LOCKED to ADVISED

-Refactor Cm Handle Registration to deal with null
pointer during Module Sync Retry
-Add Last Update Time to cm handle registration
-Add Fetch Descendants Option as paramater
for get misbehaving locked cm handles
-Fixes issue when state that goes to advised
after retry mechanism won't be retried again

Issue-ID: CPS-1097
Change-Id: Iffe1cef3479a796ea5c78b293a0bd24a86d13efd
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
22 months agoMerge "Introducing DELETING and DELETED Cmhandle State"
Joseph Keenan [Mon, 27 Jun 2022 10:08:47 +0000 (10:08 +0000)]
Merge "Introducing DELETING and DELETED Cmhandle State"

22 months agoRemove operation from NcmpEvent 73/129673/1
mpriyank [Thu, 23 Jun 2022 14:14:31 +0000 (15:14 +0100)]
Remove operation from NcmpEvent

- Remove operation field from NcmpEvent schema as it is not required
- Code refactoring corresponding to removal of operation field
- Fixed test cases around it
- UPCOMING: Some sort of state machine to handle the event publishing

Issue-ID: CPS-1100
Change-Id: Ib89b86bd1408de2808b01d37a48ee44a2601f83d
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
22 months agoIntroducing DELETING and DELETED Cmhandle State 71/129671/1
lukegleeson [Thu, 23 Jun 2022 11:33:24 +0000 (12:33 +0100)]
Introducing DELETING and DELETED Cmhandle State

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

22 months agoData Sync Watchdog Process 00/129400/23
sourabh_sourabh [Mon, 20 Jun 2022 14:57:24 +0000 (15:57 +0100)]
Data Sync Watchdog Process

- Get all the Cm Handles state in READY and Operational datastores sync state in UNSYNCHRONIZED
- Get a random Cm Handle
- Get the first resource data from the node
- Save the data in Cps Db
- Update the Operational datastores sync state to SYNCHRONIZED

Issue-ID: CPS-1052
Issue-ID: CPS-1053
Issue-ID: CPS-1054
Change-Id: I9a20391ef30e6d56c4d789a92b8bf42cd3756c62
Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
22 months agoMerge "Eliminate cmhandle-properties tag"
Joseph Keenan [Wed, 22 Jun 2022 09:16:56 +0000 (09:16 +0000)]
Merge "Eliminate cmhandle-properties tag"

22 months agoMerge "Quick fix for performance degradation bug"
Toine Siebelink [Tue, 21 Jun 2022 17:03:26 +0000 (17:03 +0000)]
Merge "Quick fix for performance degradation bug"

22 months agoEliminate cmhandle-properties tag 61/129661/1
mpriyank [Tue, 21 Jun 2022 15:31:23 +0000 (16:31 +0100)]
Eliminate cmhandle-properties tag

- Eliminate the cmhandle-properties tag in case of DELETE operation
- Fixed Test cases corresponding to that

Issue-ID: CPS-1098
Change-Id: Icd5e08403e0b101baf682f5e558c36ee4ebfd5c3
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
22 months agoMerge "Publish LCM Events"
Joseph Keenan [Tue, 21 Jun 2022 09:30:08 +0000 (09:30 +0000)]
Merge "Publish LCM Events"

22 months agoMerge "Exclude CM-Handles that are not in state 'READY'"
Toine Siebelink [Tue, 21 Jun 2022 09:21:59 +0000 (09:21 +0000)]
Merge "Exclude CM-Handles that are not in state 'READY'"

22 months agoPublish LCM Events 34/129634/4
mpriyank [Wed, 15 Jun 2022 13:40:50 +0000 (14:40 +0100)]
Publish LCM Events

- Publish LCM Create Event when watchdog process moves the cmHandle state from
  ADVISED to READY
- Publish LCM Update Event when public properties are updated, no event
  when DMI propertis are updated
- Publish LCM Delete Event when a cmHandle is been removed
- Related test scenarios update
- See User Story CPS-1034 for related sub-tasks

Issue-ID: CPS-1090
Change-Id: I70d81fde7c80794ea13a10cd1f235a7012b20b3c
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
22 months agoMerge "Fix release notes"
Joseph Keenan [Fri, 17 Jun 2022 10:25:36 +0000 (10:25 +0000)]
Merge "Fix release notes"

22 months agoQuick fix for performance degradation bug 28/129628/4
kissand [Wed, 15 Jun 2022 11:48:07 +0000 (13:48 +0200)]
Quick fix for performance degradation bug

Issue-ID: CPS-1085
Change-Id: I15715ef37909d4e2fe2f1f80e621a21c8037fbd0
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
22 months agoMerge "Fix sonar code smells"
Joseph Keenan [Thu, 16 Jun 2022 08:51:08 +0000 (08:51 +0000)]
Merge "Fix sonar code smells"

22 months agoMerge "Retry CM-Handles that are LOCKED, Failed-to-Sync"
Joseph Keenan [Wed, 15 Jun 2022 15:32:19 +0000 (15:32 +0000)]
Merge "Retry CM-Handles that are LOCKED, Failed-to-Sync"

22 months agoRetry CM-Handles that are LOCKED, Failed-to-Sync 75/129275/18
puthuparambil.aditya [Fri, 27 May 2022 09:59:19 +0000 (10:59 +0100)]
Retry CM-Handles that are LOCKED, Failed-to-Sync

Watchdog added to fetched locked cm handles by Lock reason
and operation sync state
Tests updated

Issue-ID: CPS-878
Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
Change-Id: I0ecc519e93b097ec3d309db7f686fb23a0fc59b2

22 months agoFix release notes 26/129626/1
Bruno Sakoto [Wed, 15 Jun 2022 11:57:42 +0000 (07:57 -0400)]
Fix release notes

* Add missing 3.0.1 for Jakarta
* Review 3.1.0 for Kohn (not released yet)

Issue-ID: CPS-1087
Change-Id: Id0ba8246935edff100fb952e9955f462d2313a7e
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
22 months agoNcmpEvent creation and Mapping 95/129595/7
mpriyank [Fri, 10 Jun 2022 11:09:20 +0000 (12:09 +0100)]
NcmpEvent creation and Mapping

- Mapping class to create header and event payload based on type of
  operation i.e CREATE, UPDATE and DELETE.
- Service class to get CmHandle public properties, create event and
  delegate request to event publisher.
- Modification in NcmpEvent schema json to mark field as String instead
  of URI
- Test scenarios
- UPCOMING: Call the service method from relevant code to actually
  publish the event.

Issue-ID: CPS-1037
Change-Id: I6bb7de4b27e602c4d8ee6a5528a866e5f7e8799a
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
22 months agoExclude CM-Handles that are not in state 'READY' 36/129136/9
JosephKeenan [Mon, 13 Jun 2022 09:04:05 +0000 (10:04 +0100)]
Exclude CM-Handles that are not in state 'READY'

Exclude CM-Handles which are not in state ready from ncmp operations

Issue-ID: CPS-877
Change-Id: I59783c860091d99e328cec9ccafb34c09b277753
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
22 months agoFix sonar code smells 04/129604/1
kissand [Mon, 13 Jun 2022 08:55:49 +0000 (10:55 +0200)]
Fix sonar code smells

- https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYFC3OguDZ5Vb3SQMOU1

Issue-ID: CPS-1016
Change-Id: Ic8fdae78337da1ff2c239ae2dfae67e23e88a4bb
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
22 months agoMerge "PoC Contract Stubs NCMP Rest Endpoints"
Toine Siebelink [Thu, 9 Jun 2022 16:51:03 +0000 (16:51 +0000)]
Merge "PoC Contract Stubs NCMP Rest Endpoints"

22 months agoMerge "Handle errors during cm handle search"
Toine Siebelink [Thu, 9 Jun 2022 16:08:18 +0000 (16:08 +0000)]
Merge "Handle errors during cm handle search"

22 months agoHandle errors during cm handle search 94/129494/5
kissand [Thu, 2 Jun 2022 14:26:23 +0000 (16:26 +0200)]
Handle errors during cm handle search

Issue-ID: CPS-1067
Change-Id: Iadc3413a29f9a455e658ec5bcaffc4881b7f7684
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>