cps.git
23 months agoFix sonar code smells 42/128942/3
kissand [Thu, 28 Apr 2022 08:20:39 +0000 (10:20 +0200)]
Fix sonar code smells

* Increase code coverage
  https://sonarcloud.io/component_measures?metric=uncovered_conditions&id=onap_cps

Issue-ID: CPS-475
Change-Id: I124bad6c01acbcb9658f52eb68079628e074168e
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
2 years agoMerge "Fix Absolute Path to list with Integer/String key"
Toine Siebelink [Tue, 26 Apr 2022 17:10:58 +0000 (17:10 +0000)]
Merge "Fix Absolute Path to list with Integer/String key"

2 years agoFix Absolute Path to list with Integer/String key 38/128238/16
Lathish [Thu, 31 Mar 2022 16:29:22 +0000 (17:29 +0100)]
Fix Absolute Path to list with Integer/String key

 - Introduced normalizedXpath to normalize the xpath and cpspath
 - Introduced normalizedAncestorpath to normalize the ancestor path in xpath and cpspath
 - Added new condition in the ANTLR Grammar to capture the invalid path in the xpath
 - Introduced PathParsingException to replace the IllegalStateException

Issue-ID: CPS-961
Change-Id: Ie10f5c6cfc466387e79eec184b933297d1d79587
Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
2 years agoReview spring framework dependency 83/128783/2
Bruno Sakoto [Thu, 21 Apr 2022 22:08:18 +0000 (18:08 -0400)]
Review spring framework dependency

Use default spring framework version from spring boot dependencies.
Then, cps application is now currently using spring-web 5.3.16 (from
spring boot 2.6.4) instead of previously specified 5.3.13.

Issue-ID: CPS-998
Change-Id: If16c5f4c7176a34b5a595a1411d3caa763d3c2f0
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
2 years agoDocument ncmp-inventory error code in openapi 06/128706/3
Renu Kumari [Mon, 18 Apr 2022 16:39:33 +0000 (12:39 -0400)]
Document ncmp-inventory error code in openapi

Issue-ID: CPS-896
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: Ic39da86c18ac921a6a3d213064f0b7c77d08e06f

2 years agoRefactor existing model sync code into separate package 41/128341/3
sourabh_sourabh [Wed, 6 Apr 2022 15:24:52 +0000 (16:24 +0100)]
Refactor existing model sync code into separate package

- Created a new class to seperate sync related operations of modules.
- Kept newly created class into .../api/inventory/sync package.
- Created a separate groovy test.
- Fixed existing groovy test.

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

2 years agoFix ANTLR version issue 92/128492/1
Lathish [Tue, 12 Apr 2022 13:39:02 +0000 (14:39 +0100)]
Fix ANTLR version issue

 - Updated ANTLR compiler version to 4.9.2 to be compatible with runtime version

Issue-ID: CPS-961
Change-Id: I78a3fe541c9edcfc891fb045a60ed117d3aa5b08
Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
2 years agoAdd bounds to sphinx requirement 41/128441/1
Cédric Ollivier [Mon, 11 Apr 2022 13:55:45 +0000 (15:55 +0200)]
Add bounds to sphinx requirement

As ONAP was created before Oct 20 2020 in RTD, we
must set bounds to enforce a compatible Sphinx version
(see manual).

Issue-ID: DOC-782
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: I5ed268d592986764bf040690a47c5024692768b7

2 years agoFix Sonar Qube Violations 16/128416/1
DylanB95EST [Mon, 11 Apr 2022 08:24:59 +0000 (09:24 +0100)]
Fix Sonar Qube Violations

Immediately return expression

Issue-ID: CPS-475
Change-Id: I2c33c94bef1ff097786299d3a037feea2b4ebbff
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoFix Sonar Qube Violations - Recurring task 97/128397/1
DylanB95EST [Fri, 8 Apr 2022 14:53:50 +0000 (15:53 +0100)]
Fix Sonar Qube Violations - Recurring task

Fix sonar issues in CPS.

- Remove Unnecessary cast to List
- Immediately return expession

Issue-ID: CPS-475
Change-Id: Ic3fa2f3f92784682045a780d87c6737d04f37659
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoMerge "Refactoring/ Adding Tests for Validation"
Joseph Keenan [Fri, 8 Apr 2022 13:18:12 +0000 (13:18 +0000)]
Merge "Refactoring/ Adding Tests for Validation"

2 years agoRefactoring/ Adding Tests for Validation 69/128269/11
DylanB95EST [Mon, 4 Apr 2022 12:09:22 +0000 (13:09 +0100)]
Refactoring/ Adding Tests for Validation

Refactored classes affected by validation
Have added tests for anywhere where validation is used
Have refactored the parse and sync modules validation
to be validated at the public api method

Issue-ID: CPS-322
Change-Id: I4989cfd03300fbdca41571d0aa2d0b96978858ba
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoMerge "Fix to stop build failure on CopyrightCheck Error"
Toine Siebelink [Fri, 8 Apr 2022 07:40:42 +0000 (07:40 +0000)]
Merge "Fix to stop build failure on CopyrightCheck Error"

2 years agoMerge "Update info.yml for new Committer"
Toine Siebelink [Fri, 8 Apr 2022 07:37:55 +0000 (07:37 +0000)]
Merge "Update info.yml for new Committer"

2 years agoUpdate info.yml for new Committer 69/128369/1
JosephKeenan [Thu, 7 Apr 2022 15:06:31 +0000 (16:06 +0100)]
Update info.yml for new Committer

-Updating INFO.yaml to include new committer for CPS (JosephKeenan)

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

2 years agoFix to stop build failure on CopyrightCheck Error 63/128363/1
lukegleeson [Thu, 7 Apr 2022 10:37:39 +0000 (11:37 +0100)]
Fix to stop build failure on CopyrightCheck Error

- This will make the maven build see an error thrown by the python script as a success and won't fail the build

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

2 years agoMerge "dmi plugin version updated to 1.2.0-SNAPSHOT-latest"
Bruno Sakoto [Wed, 6 Apr 2022 18:57:06 +0000 (18:57 +0000)]
Merge "dmi plugin version updated to 1.2.0-SNAPSHOT-latest"

2 years agoQuery based on Public CM Properties 41/127541/32
JosephKeenan [Mon, 28 Mar 2022 11:26:07 +0000 (12:26 +0100)]
Query based on Public CM Properties

-Updated OpenAPI for new Endpoint
-Will replace SQL with CPSPathQuery once investigation is complete
-Functionality in place to determine if public properties match -
-Added Unit and CSIT tests - small modifications may need to be made
-CSIT tests enhanced to add additional nodes and tests

Issue-ID: CPS-731
Change-Id: I403e603ce79c4a4a6994d51b459b5703510d5a83
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2 years agodmi plugin version updated to 1.2.0-SNAPSHOT-latest 39/128339/2
puthuparambil.aditya [Wed, 6 Apr 2022 13:44:22 +0000 (14:44 +0100)]
dmi plugin version updated to 1.2.0-SNAPSHOT-latest

CSIT updated to test the changes on Accept header

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

2 years agoAsync: NCMP Rest impl. including Request ID generation 24/128124/8
sourabh_sourabh [Mon, 28 Mar 2022 12:21:55 +0000 (13:21 +0100)]
Async: NCMP Rest impl. including Request ID generation

- Restructured code and moved some of them at controller and service
  layer.
- Unit is fixed and organized to it's belonging classes.

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

2 years ago[cps] Fix getResourceDataForPassthroughOperational endpoint 58/128158/15
puthuparambil.aditya [Tue, 29 Mar 2022 10:03:52 +0000 (11:03 +0100)]
[cps] Fix getResourceDataForPassthroughOperational endpoint

Get endpoint only accepts application/json.

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

2 years agoMerge "Structured Exception details for DMI"
Bruno Sakoto [Tue, 5 Apr 2022 12:30:00 +0000 (12:30 +0000)]
Merge "Structured Exception details for DMI"

2 years agoStructured Exception details for DMI 16/128116/13
mpriyank [Mon, 28 Mar 2022 10:17:47 +0000 (15:47 +0530)]
Structured Exception details for DMI

- Introduced DmiErrorMessage in API docs with 502 Bad Gateway
- HttpClientRequestException will be thrown which will be exposed as 502 BAD Gateway for the client from NCMP

Issue-ID: CPS-917
Change-Id: Iba8f159e8216bc1f63a9ab86208e5c802437e2e8
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2 years agoUpdate CM-Handle registration response 48/128148/9
Renu Kumari [Mon, 28 Mar 2022 14:22:41 +0000 (10:22 -0400)]
Update CM-Handle registration response

- update openapi.yml with new response structure
- send only details of failed cm-handle operations
- updated csit to validate 200 status

Issue-ID: CPS-896
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I3b868bcc5b8ff488c31faef51edc82c771452234

2 years agoFix issue around duplicate build tag 30/128230/2
ToineSiebelink [Fri, 1 Apr 2022 08:00:44 +0000 (09:00 +0100)]
Fix issue around duplicate build tag

Fixes failing build after merge of CPS-322.
Duplicate build tag found in checkstyle POM

Issue-ID: CPS-322
Change-Id: I099e4242e419d7b393e7787d3f75f9909dce52ac
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2 years agoMerge "Additional validation for names/identifiers"
Toine Siebelink [Thu, 31 Mar 2022 13:08:13 +0000 (13:08 +0000)]
Merge "Additional validation for names/identifiers"

2 years agoMerge "Copyright Check Script"
Toine Siebelink [Wed, 30 Mar 2022 13:17:09 +0000 (13:17 +0000)]
Merge "Copyright Check Script"

2 years agoAdditional validation for names/identifiers 94/127594/31
DylanB95EST [Tue, 8 Mar 2022 17:26:34 +0000 (17:26 +0000)]
Additional validation for names/identifiers

Implementing additional regex validation for names/identifiers
in CPS

- Introduces a CpsValidator
- Applies to relevent java public API's
- Tests have been updated where necessary

Issue-ID: CPS-322
Change-Id: I29ab8820bb1fe0eee247e425d6bb018bcd38f28e
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoMerge "Updated the Documentation with sample yang and json"
Toine Siebelink [Mon, 28 Mar 2022 11:03:31 +0000 (11:03 +0000)]
Merge "Updated the Documentation with sample yang and json"

2 years agoRegistration Response for Create cmhandles operations 06/128106/2
Renu Kumari [Wed, 23 Mar 2022 20:50:14 +0000 (16:50 -0400)]
Registration Response for Create cmhandles operations

- Changed implementation to register each cm-handle at a time
  instead of registering all at once
- Removed YangCMHandleList class and using String format to
  generated expected JSON
- Response of all three operation types is returned in the
  updateDmiRegistrationAndSyncModule method
- Changed parseAndRemoveCmHandlesInDmiRegistration to protected
  to keep in sync with create flow
- Refactored existing create CMHandle test cases

Issue-ID: CPS-896
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I5b0c01b3b8e31ca7c257b1e04069e35268be1132

2 years agoMerge "Add Start and Stop sessions on JAVA API"
Toine Siebelink [Fri, 25 Mar 2022 18:29:31 +0000 (18:29 +0000)]
Merge "Add Start and Stop sessions on JAVA API"

2 years agoCopyright Check Script 92/127792/4
lukegleeson [Tue, 8 Mar 2022 11:41:52 +0000 (11:41 +0000)]
Copyright Check Script

- Prints warnings to build log if copyright issues detected
- File ignore included for checkstyle folder and common extensions which don't have copyrights
- Included Tests

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

2 years agoRegistration Response for Update and Delete cmhandles operations 91/127891/15
Renu Kumari [Fri, 18 Mar 2022 18:32:10 +0000 (14:32 -0400)]
Registration Response for Update and Delete cmhandles operations

- Process registration in the delete, create and update order
- updateRegistration returns DMIRegistartionRespons that contains
  response for all operations
- Added logic to not delete cmhandle if schemaset deletion fails

Issue-ID: CPS-896
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I907ff678d478894e7d4d3cc24b23a979c02ed97a

2 years agoAdd Start and Stop sessions on JAVA API 13/128013/5
emaclee [Wed, 23 Mar 2022 11:02:03 +0000 (11:02 +0000)]
Add Start and Stop sessions on JAVA API

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

2 years agoMerge "Update maven build deploy version"
Toine Siebelink [Fri, 25 Mar 2022 14:03:47 +0000 (14:03 +0000)]
Merge "Update maven build deploy version"

2 years agoUpdated the Documentation with sample yang and json 19/127819/9
Lathish [Tue, 15 Mar 2022 12:03:53 +0000 (12:03 +0000)]
Updated the Documentation with sample yang and json

Issue-ID: CPS-940
Change-Id: I66b2f0cc1007a23498803cca695aa3d19c0eb433
Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
2 years agoUpdate SpringBoot when approved version has Log4J 2.17.1 or higher 11/128011/6
JosephKeenan [Wed, 23 Mar 2022 15:01:33 +0000 (15:01 +0000)]
Update SpringBoot when approved version has Log4J 2.17.1 or higher

-Updated cps-dependencies/pom.xml SpringBoot to v2.6.4
-Updated cps-parent/pom.xml springboot maven to v2.6.4
-Updated spring cloud dependencies to 2021.0.1

Issue-ID: CPS-958
Change-Id: I37aca89edf6da83501414b4f202d3bb88464c801
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2 years agoUpdate maven build deploy version 68/128068/1
emaclee [Thu, 24 Mar 2022 10:10:37 +0000 (10:10 +0000)]
Update maven build deploy version

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

2 years agoMerge "Update log4j dependency version from 2.17.1 to 2.17.2"
Toine Siebelink [Wed, 23 Mar 2022 08:26:22 +0000 (08:26 +0000)]
Merge "Update log4j dependency version from 2.17.1 to 2.17.2"

2 years agoMerge "Update docs to add info on providing additional config"
Bruno Sakoto [Tue, 22 Mar 2022 18:00:25 +0000 (18:00 +0000)]
Merge "Update docs to add info on providing additional config"

2 years agoMerge "Return Registration response for updating cmhandles"
Toine Siebelink [Tue, 22 Mar 2022 17:31:18 +0000 (17:31 +0000)]
Merge "Return Registration response for updating cmhandles"

2 years agoUpdate docs to add info on providing additional config 06/127906/3
Renu Kumari [Mon, 21 Mar 2022 13:18:41 +0000 (09:18 -0400)]
Update docs to add info on providing additional config

- Added information on overriding values of spring-supported properties

Issue-ID: CPS-918
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I660cd9ea0c4c73d972f9c1645f5ed28308282fdc

2 years agoUpdate log4j dependency version from 2.17.1 to 2.17.2 53/127953/1
emaclee [Tue, 22 Mar 2022 10:09:42 +0000 (10:09 +0000)]
Update log4j dependency version from 2.17.1 to 2.17.2

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

2 years agoUpdate versions for next release 28/127928/2
ToineSiebelink [Mon, 21 Mar 2022 16:17:23 +0000 (16:17 +0000)]
Update versions for next release

Update Minor version number (on master) for next release as part of creating
Jakarta release branch

Issue-ID: CPS-952

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

2 years agoReturn Registration response for updating cmhandles 96/127696/11
Renu Kumari [Fri, 11 Mar 2022 13:05:11 +0000 (08:05 -0500)]
Return Registration response for updating cmhandles

- Added CMHandleRegistrationResponse class for registration response
- Send response in the case of success and failure
- Each update operation in the request is independent on previous one

Issue-ID: CPS-896
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: Ic6cc69da48bd2078029784cabede4f5965054c03

2 years agoUpgrade to next snapshot version 56/127856/1
Bruno Sakoto [Wed, 16 Mar 2022 21:14:39 +0000 (17:14 -0400)]
Upgrade to next snapshot version

Issue-ID: CPS-933
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: I5ba87c850aa932737cc62e312a825c69a3db5a02

2 years agoRelease container artifact for version 3.0.0 50/127850/2
Bruno Sakoto [Wed, 16 Mar 2022 15:24:12 +0000 (11:24 -0400)]
Release container artifact for version 3.0.0

Issue-ID: CPS-933
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: I3131b12f025248250755360fd1e3221c8fc89278

2 years agoRelease maven artifacts for version 3.0.0 36/127836/1
Bruno Sakoto [Wed, 16 Mar 2022 04:52:31 +0000 (00:52 -0400)]
Release maven artifacts for version 3.0.0

Issue-ID: CPS-933
Change-Id: I8bede2dfd5f230e42096d54c5f6644a588c15110
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
2 years agoCreate primary documentation for Jakarta release 96/127796/3
Bruno Sakoto [Tue, 15 Mar 2022 12:09:07 +0000 (08:09 -0400)]
Create primary documentation for Jakarta release

* Update release notes
* Update openapi documentation
* Fix section title hierarchy
* Fix admin container directive not found

Issue-ID: CPS-935
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: Iabdc357aa0168c1becafd6de1ac7703ec3bd1afa

2 years agoAsync: NCMP Rest impl. including Request ID generation 18/127718/3
sourabh_sourabh [Sat, 12 Mar 2022 17:11:10 +0000 (22:41 +0530)]
Async: NCMP Rest impl. including Request ID generation

- In case of invalid topic return http status 400 with error message
- Unit test is modified to handle/validate InvalidTopicException

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

2 years agoMerge "Replacing ModelMapper with MapStruct"
Toine Siebelink [Mon, 14 Mar 2022 09:47:27 +0000 (09:47 +0000)]
Merge "Replacing ModelMapper with MapStruct"

2 years agoMerge "Async: NCMP Rest impl. including Request ID generation"
Bruno Sakoto [Fri, 11 Mar 2022 22:32:13 +0000 (22:32 +0000)]
Merge "Async: NCMP Rest impl. including Request ID generation"

2 years agoMerge "Updated cmhandle registration openapi documentation"
Toine Siebelink [Fri, 11 Mar 2022 17:39:03 +0000 (17:39 +0000)]
Merge "Updated cmhandle registration openapi documentation"

2 years agoMerge "Removed ExtendedModuleReference Object"
Toine Siebelink [Fri, 11 Mar 2022 10:40:54 +0000 (10:40 +0000)]
Merge "Removed ExtendedModuleReference Object"

2 years agoUpdated cmhandle registration openapi documentation 72/127672/2
Renu Kumari [Thu, 10 Mar 2022 21:02:55 +0000 (16:02 -0500)]
Updated cmhandle registration openapi documentation

- Fixed the cmhandle registration request example

Issue-ID: CPS-896
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: If4a7c820add676adb9637ce56678da3f5607bbcd

2 years agoReplacing ModelMapper with MapStruct 89/127489/7
lukegleeson [Wed, 2 Mar 2022 14:32:47 +0000 (14:32 +0000)]
Replacing ModelMapper with MapStruct

- Removed Model Mapper from pom files
- Replaced ModelMapper with MapStruct
- Added Tests for MapStruct
- Changed mapstruct annotations for individual variables to be null safe rather than all variables
- Excluded generated code from code coverage
- Set ModuleReferences input to required for SchemaSet so that ModuleReferences list set to empty list rather than null

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

2 years agoRemoved ExtendedModuleReference Object 93/127493/12
sourabh_sourabh [Thu, 3 Mar 2022 19:01:07 +0000 (00:31 +0530)]
Removed ExtendedModuleReference Object

-Introduced ModuleReference with 2 prop name and revision
-Removed default constructor of ModuleReference

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

2 years agoAsync: NCMP Rest impl. including Request ID generation 49/127149/24
sourabh_sourabh [Wed, 16 Feb 2022 16:23:41 +0000 (21:53 +0530)]
Async: NCMP Rest impl. including Request ID generation

- Based on topic api can be sync or async
- RequestId is generated using UUID
- Used UriComponentBuilder to populate dmi service url.
- New test cases are introduced to validate service url generation.

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

2 years agoMerge "Dependency Injection using Lombok"
Bruno Sakoto [Tue, 8 Mar 2022 11:44:54 +0000 (11:44 +0000)]
Merge "Dependency Injection using Lombok"

2 years agoDependency Injection using Lombok 13/127513/1
mpriyank [Mon, 7 Mar 2022 11:47:39 +0000 (17:17 +0530)]
Dependency Injection using Lombok

- NotificationService dependency injection using Lombok and populate
  dataspace patterns post injection.

Issue-ID: CPS-906
Change-Id: Ia7d32903b18861d22cdd4e6809d9fe746181d389
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2 years agoUpdating sequences in db migration script 99/127499/2
DylanB95EST [Fri, 4 Mar 2022 11:57:51 +0000 (11:57 +0000)]
Updating sequences in db migration script

Added a dynamic set value changeset for sequence id
to both changelog 05 and 10.

Issue-ID: CPS-900
Change-Id: Ia3ec0b66a89b151435acfa4ebaed3886307b75ea
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoMerge "Update dmi-registry yang to support cmHandle State"
Bruno Sakoto [Thu, 3 Mar 2022 23:28:44 +0000 (23:28 +0000)]
Merge "Update dmi-registry yang to support cmHandle State"

2 years agoMerge "Bug fix for delete data node not working for root node"
Renu Kumari [Thu, 3 Mar 2022 14:27:49 +0000 (14:27 +0000)]
Merge "Bug fix for delete data node not working for root node"

2 years agoBug fix for delete data node not working for root node 97/127397/6
puthuparambil.aditya [Tue, 1 Mar 2022 11:51:20 +0000 (11:51 +0000)]
Bug fix for delete data node not working for root node

Fixing event for deletion of container node
Fixing event for deletion of root node when '' is passed as xpath

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

2 years agoUpdate dmi-registry yang to support cmHandle State 60/127060/15
lukegleeson [Thu, 10 Feb 2022 10:58:29 +0000 (10:58 +0000)]
Update dmi-registry yang to support cmHandle State

- Added dmi-registry@2022-02-10 which contains the new dmi-registry yang model to support the cmHandle State.
- Added changelog 12 which removes previous dmi-registries from the db
- Added changelog 13 which adds new dmi-registry
- Edited yangResourceCsvGenerator.py so that it generates for each argument given and does not generate the module_name and revision for dmi-registry@2021-12-13.
- Updated rollback for changeset 11.1

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

2 years agoUpdate dependencies as recommended by SECCOM 43/127443/1
ToineSiebelink [Wed, 2 Mar 2022 13:32:56 +0000 (13:32 +0000)]
Update dependencies as recommended by SECCOM

See also https://wiki.onap.org/display/SV/Jakarta+CPS

Issue-ID: CPS-815
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I184eabd45a62a99bbb09f09b699b74a5d51939f7

2 years agoMerge "CPS-475 - Fix SQ codesmells introduced as aprt of CPS-887"
Toine Siebelink [Wed, 2 Mar 2022 12:39:56 +0000 (12:39 +0000)]
Merge "CPS-475 - Fix SQ codesmells introduced as aprt of CPS-887"

2 years agoCPS-475 - Fix SQ codesmells introduced as aprt of CPS-887 39/127439/1
JosephKeenan [Wed, 2 Mar 2022 11:42:47 +0000 (11:42 +0000)]
CPS-475 - Fix SQ codesmells introduced as aprt of CPS-887

Issue-ID: CPS-475
Change-Id: If277242bd84e6c53d1ce288ac2a3803f99740ab2
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
2 years agoAddressed refactoring comments related to method name 35/127435/2
mpriyank [Wed, 2 Mar 2022 10:10:22 +0000 (15:40 +0530)]
Addressed refactoring comments related to method name

- YangRepository method names streamlined as per JPA

Issue-ID: CPS-647
Change-Id: Ifd514947944131894d849bdbf1b7ec52959b0164
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2 years agoMerge "Adding missing rollback for Liquibase change logs"
Toine Siebelink [Tue, 1 Mar 2022 16:51:33 +0000 (16:51 +0000)]
Merge "Adding missing rollback for Liquibase change logs"

2 years agoCreate Endpoint For Get Cm Handles By Name 44/126844/25
DylanB95EST [Thu, 27 Jan 2022 17:12:52 +0000 (17:12 +0000)]
Create Endpoint For Get Cm Handles By Name

Create endpoint and implement logic for
get cm handle details by cm handle name

Issue-ID: CPS-817
Change-Id: I83bd2da9219d13fac715a08b19108028ca6f6751
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoAdding missing rollback for Liquibase change logs 61/127261/3
lukegleeson [Wed, 23 Feb 2022 17:45:10 +0000 (17:45 +0000)]
Adding missing rollback for Liquibase change logs

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

2 years agoMerge "Bug fix for delete data node not working for root node"
Bruno Sakoto [Mon, 28 Feb 2022 23:25:49 +0000 (23:25 +0000)]
Merge "Bug fix for delete data node not working for root node"

2 years agoNCMP Java API depends on NCM-Rest-API (cyclic) through json properties on Java API 21/127221/15
DylanB95EST [Mon, 21 Feb 2022 12:57:08 +0000 (12:57 +0000)]
NCMP Java API depends on NCM-Rest-API (cyclic) through json properties on Java API

Using POJO and new converter class instead
of previous object mapper

Issue-ID: CPS-893
Change-Id: I75531f386f08cb172d2901a4bbe97ae22cc5937e
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoCPS-887 Decreasing performance of cmHandle registration 08/127208/30
JosephKeenan [Tue, 15 Feb 2022 18:23:05 +0000 (18:23 +0000)]
CPS-887 Decreasing performance of cmHandle registration

- Creating temporary table module references from the
  node
- Query returning new moduleReferences for node to be added to CPS
- Modified registration for node to use new implementation (incl. tests)
- Refactored some interface to use collection instead of list
- Modified SQL statements to use String.format()
- Fixed tests

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

2 years agoMerge "Updated openapi.yaml to match to changes in get data node API"
Toine Siebelink [Mon, 28 Feb 2022 15:08:57 +0000 (15:08 +0000)]
Merge "Updated openapi.yaml to match to changes in get data node API"

2 years agoBug fix for delete data node not working for root node 03/127303/3
puthuparambil.aditya [Fri, 25 Feb 2022 10:37:24 +0000 (10:37 +0000)]
Bug fix for delete data node not working for root node

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

2 years agoUpdated openapi.yaml to match to changes in get data node API 09/127309/2
puthuparambil.aditya [Fri, 25 Feb 2022 13:24:03 +0000 (13:24 +0000)]
Updated openapi.yaml to match to changes in get data node API

  1. updated the pom version to 3.0.0-SNAPSHOT
  2. modified the examples for get data node api to match the post api.

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

2 years agoFix success response code CM Handle Registration 46/127246/8
mpriyank [Wed, 23 Feb 2022 09:47:23 +0000 (15:17 +0530)]
Fix success response code CM Handle Registration

- changed registartion response code to 204 NO_CONTENT
- improved exception handling for registration API
- fixed failing csit related to changed response code
- updated the release notes for CPS-892 and CPS-837

Issue-ID: CPS-892
Change-Id: I616e340debf1583b058e7ae6b8960972eec00f3e
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2 years agoAlign JSON DataNode for Get and Post/Put API in CPS 94/127094/14
puthuparambil.aditya [Mon, 14 Feb 2022 10:56:35 +0000 (10:56 +0000)]
Align JSON DataNode for Get and Post/Put API in CPS

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

2 years agoCore logic to update,add or remove cmHandle properties 16/126916/23
mpriyank [Fri, 28 Jan 2022 11:03:56 +0000 (16:33 +0530)]
Core logic to update,add or remove cmHandle properties

Issue-ID: CPS-837
Change-Id: Ia078b6a0291ae916931259a309dd592b0554da28
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2 years agoMerge "Fragment handling decreasing performance for large number of cmHandles"
aditya puthuparambil [Wed, 16 Feb 2022 06:47:43 +0000 (06:47 +0000)]
Merge "Fragment handling decreasing performance for large number of cmHandles"

2 years agoFix to keep yang resource cache in sync 61/127061/5
Renu Kumari [Thu, 10 Feb 2022 14:31:17 +0000 (09:31 -0500)]
Fix to keep yang resource cache in sync

- Removed schemaset from cache when schemaset is deleted
- Added separate test cases for yang resource cache

Issue-ID: CPS-864
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: Ie1f9978406de1c92b513549216873cba4a98cdd7

2 years agoFragment handling decreasing performance for large number of cmHandles 82/127082/8
DylanB95EST [Fri, 11 Feb 2022 12:46:27 +0000 (12:46 +0000)]
Fragment handling decreasing performance for large number of cmHandles

- allow fragmentEntity to set parent id (needed for optimization)
- updated addListAlement and addChildDataNode to use new common optimized metghod to add to exsiting children
- ensure methods are transactional
- Refactored test around adding list elements to clearly define test
  checking the presence of grandchild element

Issue-ID: CPS-886
Change-Id: Ic4381f0f7170ebd666d5bc8aa6ef2c4548d81766
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
2 years agoImprove logging in NCMP 21/127021/5
sourabh_sourabh [Tue, 8 Feb 2022 17:32:27 +0000 (23:02 +0530)]
Improve logging in NCMP

- Code to change to apply logs at runtime
- Fix for minor code smell

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

2 years agoMerge "Update release notes"
aditya puthuparambil [Mon, 14 Feb 2022 14:06:59 +0000 (14:06 +0000)]
Merge "Update release notes"

2 years agoMerge "Upgrade SDN-C"
Toine Siebelink [Mon, 14 Feb 2022 08:38:56 +0000 (08:38 +0000)]
Merge "Upgrade SDN-C"

2 years agoUpdate release notes 87/127087/1
Bruno Sakoto [Fri, 11 Feb 2022 20:05:29 +0000 (15:05 -0500)]
Update release notes

Adding Istanbul releases:
* 2.0.2
* 2.0.3
* 2.0.4

Issue-ID: CPS-891
Change-Id: I49c8c6160a9a501f8a2c46e4ee79a6c27fff9198
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
2 years agoUpgrade SDN-C 45/126945/15
emaclee [Thu, 3 Feb 2022 15:45:26 +0000 (15:45 +0000)]
Upgrade SDN-C

Issue-ID: CPS-802
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: I29604d4e57160c346b5a2a8ce30bda816eae2ecb
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
2 years agoDocument Logging Guidelines 12/126912/16
sourabh_sourabh [Tue, 1 Feb 2022 09:26:02 +0000 (14:56 +0530)]
Document Logging Guidelines

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

2 years agoMerge "Fix for retry mechanism on concurrent CmHandle registration"
Bruno Sakoto [Wed, 9 Feb 2022 16:53:20 +0000 (16:53 +0000)]
Merge "Fix for retry mechanism on concurrent CmHandle registration"

2 years agoFix for retry mechanism on concurrent CmHandle registration 49/126949/10
puthuparambil.aditya [Thu, 3 Feb 2022 16:42:13 +0000 (16:42 +0000)]
Fix for retry mechanism on concurrent CmHandle registration

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

2 years agoAdd support for delete data-node event 08/126908/5
Renu Kumari [Mon, 31 Jan 2022 19:01:42 +0000 (14:01 -0500)]
Add support for delete data-node event

- Changed process event input to address delete
- Send null data in the event if the operation is DELETE

Issue-ID: CPS-791
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: If851f7132e94bcbcaf4324d07a2a00c90d1882b7

2 years agoMerge "Refactor Delete Anchor functionality"
Renu Kumari [Mon, 7 Feb 2022 13:44:29 +0000 (13:44 +0000)]
Merge "Refactor Delete Anchor functionality"

2 years agoMerge "Test Scenario for replaceListContent"
aditya puthuparambil [Thu, 3 Feb 2022 11:09:26 +0000 (11:09 +0000)]
Merge "Test Scenario for replaceListContent"

2 years agoMerge "[TECHDEBT] Align CPS NCMP REST API Specification"
Bruno Sakoto [Thu, 3 Feb 2022 06:32:00 +0000 (06:32 +0000)]
Merge "[TECHDEBT] Align CPS NCMP REST API Specification"

2 years agoRefactor Delete Anchor functionality 79/126679/16
Renu Kumari [Thu, 20 Jan 2022 18:30:05 +0000 (13:30 -0500)]
Refactor Delete Anchor functionality

- Added a delete DataNode functionality in the CpsDataService
- CpsAdminService uses CpsDataService to delete DataNodes

Issue-ID: CPS-791
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I090500dbc4a2ccf061dc105f979472137d43b06d

2 years agoMerge "Refactored Delete SchemaSet functionality"
Renu Kumari [Wed, 2 Feb 2022 15:16:19 +0000 (15:16 +0000)]
Merge "Refactored Delete SchemaSet functionality"

2 years agoTest Scenario for replaceListContent 77/126777/3
ToineSiebelink [Wed, 2 Feb 2022 12:17:15 +0000 (12:17 +0000)]
Test Scenario for replaceListContent

-Improved a test scenarios for replaceListContent in CpsDataPersistenceServiceSpec
-Removed redundant SQL Data
-Used groovy shortcuts where posisble (no need for get...() methods when using Groovy :-)

Issue-ID: CPS-868
Change-Id: I3d29bbb0c5d035c6f266cf31bf2886f1bcf5d48a
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2 years ago[TECHDEBT] Align CPS NCMP REST API Specification 47/126847/6
JosephKeenan [Fri, 28 Jan 2022 11:22:22 +0000 (11:22 +0000)]
[TECHDEBT] Align CPS NCMP REST API Specification

- Updated ncmp.yml to align implementation with specification
- Added new Exception classes to differentiate between server NCMP
  issues and client based NCMP issues
- Added 500 error to specification
- To be merged after https://gerrit.onap.org/r/c/cps/+/126848
- Added excpetion handlers for SerNcmpException & DmiRequestException

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