ccsdk/sli/core.git
6 years agoInstall sdnc-core utils as karaf package 47/14347/2
Dan Timoney [Thu, 21 Sep 2017 20:07:02 +0000 (16:07 -0400)]
Install sdnc-core utils as karaf package

New utils jar was added in another change, but wasn't bundled as a karaf
feature and was not being installed in container. This broke odlsli
docker container. This change wraps that util package as a new
feature (sdnc-core-utils).

Change-Id: Ie8c1d608e2c67aa1635837bc400cec942761c81c
Issue-ID: CCSDK-54
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Improve code coverage for MdsalHelper"
Dan Timoney [Thu, 21 Sep 2017 14:49:31 +0000 (14:49 +0000)]
Merge "Improve code coverage for MdsalHelper"

6 years agoMerge "Remove unnecessary parentheses"
Dan Timoney [Thu, 21 Sep 2017 14:48:36 +0000 (14:48 +0000)]
Merge "Remove unnecessary parentheses"

6 years agoImprove code coverage for MdsalHelper 09/14209/1
Gaurav Agrawal [Thu, 21 Sep 2017 10:59:34 +0000 (16:29 +0530)]
Improve code coverage for MdsalHelper

Changes includes
1. Modified pom to take JUNIT version from parent pom.
2. Added basic testcases for MdsalHelper utilities with test YANG.
3. Made necessary pom additions.

Change-Id: Ib46bd9c8a87db33c90aaaf36736d709a7c17cbdd
Issue-Id: CCSDK-101
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
6 years agoRemove unnecessary parentheses 99/14199/1
surya-huawei [Thu, 21 Sep 2017 10:03:03 +0000 (15:33 +0530)]
Remove unnecessary parentheses

*Useless parentheses can sometimes be misleading
and hence removed

Issue-Id: CCSDK-87
Change-Id: I018d791500a42356296d07d04de45517d061bb7f
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFix Sonar Issues in sli/core module 97/14097/3
Bharat saraswal [Thu, 21 Sep 2017 05:47:57 +0000 (11:17 +0530)]
Fix Sonar Issues in sli/core module

Few major issues
*Remove unused variables
To increase code readability
*Replace the type specification with the diamond operator
*Add the "@Override" annotation above this method signature
To increase code readability"

Issue-Id: CCSDK-87
Change-Id: I2f0c16a83ab10a0a3e39a2a1d4db3c195ec2bba8
Signed-off-by: Bharat saraswal <bharat.saraswal@huawei.com>
6 years agoMerge "Abstract utility classes for re-use"
Dan Timoney [Wed, 20 Sep 2017 20:02:58 +0000 (20:02 +0000)]
Merge "Abstract utility classes for re-use"

6 years agoMerge "Fix Sonar Issues in sli/core module"
Dan Timoney [Wed, 20 Sep 2017 19:59:55 +0000 (19:59 +0000)]
Merge "Fix Sonar Issues in sli/core module"

6 years agoMerge "Fixes for MdsalHelper util"
Dan Timoney [Wed, 20 Sep 2017 19:58:23 +0000 (19:58 +0000)]
Merge "Fixes for MdsalHelper util"

6 years agoMerge "Fix Sonar Issue"
Dan Timoney [Wed, 20 Sep 2017 19:32:15 +0000 (19:32 +0000)]
Merge "Fix Sonar Issue"

6 years agoAbstract utility classes for re-use 03/13503/2
Ryan Goulding [Tue, 19 Sep 2017 15:14:41 +0000 (11:14 -0400)]
Abstract utility classes for re-use

When looking at the existing uses of BundleActivator(s), it became
immediately clear that other parts of the code have a strategy based
properties file resolution very similar to those abstracted by dblib.
This change aggregates a separate utils bundle for this functionality,
which is further abstracted for potential reuse with other use cases.

The next use case is in the sli bundle, which will be handled in
a follow-up patch.

Issue-Id: SDNC-54
Change-Id: Ie4d4bb679617474b1983e6044c08cca1742b9893
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoFix Sonar Issues in sli/core module 17/13817/1
surya-huawei [Wed, 20 Sep 2017 10:05:23 +0000 (15:35 +0530)]
Fix Sonar Issues in sli/core module

Few major issues
*Remove unused imports
To increase code readability
*Replace the type specification with the diamond operator
To reduce the verbosity of generics code
*Add the "@Override" annotation above this method signature
To increase code readability
*Remove this unnecessary cast to "String"
Unnecessary casting expressions pollutes code

Issue-Id: CCSDK-87
Change-Id: I38952f5026a5c61af73ac16706e8ddc278566b13
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFixes for MdsalHelper util 03/13803/1
Gaurav Agrawal [Wed, 20 Sep 2017 09:40:54 +0000 (15:10 +0530)]
Fixes for MdsalHelper util

1. Convert tabs to 4 spaces.
2. Break lines to be less than 120 characters
3. Remove extraneous spaces and parenthesis
4. Fixed blocker/critical sonar issues.
https://sonar.onap.org/component_issues/index?id=org.onap.ccsdk.sli.core%3Accsdk-sli-core#resolved=false|severities=BLOCKER%2CCRITICAL

Change-Id: I8b40784ecb178409a6fe9a00d28ccd03873044c5
Issue-Id: CCSDK-67
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
6 years agoFix Sonar Issue 81/13381/3
surya-huawei [Tue, 19 Sep 2017 09:27:17 +0000 (14:57 +0530)]
Fix Sonar Issue

One blocker issue in sli/core module
*Check for null dereferencing

Issue-Id: CCSDK-87
Change-Id: I5ebaef24b3fd6534b5e818c3087e3d8213ed770c
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFix few Major sonar issues 81/13681/1
ramu.n [Wed, 20 Sep 2017 05:42:43 +0000 (11:12 +0530)]
Fix few Major sonar issues

Fix few Major sonar issues in CCSDK SLI Core module
* Remove useless assignment to local variable
* Use built-in logger method string formatting instead of string concatination
* code indentation

Change-Id: I20fc9d8f4c510f6169e6f989c6f5595371e5f2dd
Issue-Id: CCSDK-67
Signed-off-by: Ramu N <ramu.n@huawei.com>
6 years agoMerge "Use Junit4 instead of Junit3 in sli/common"
Dan Timoney [Tue, 19 Sep 2017 23:58:10 +0000 (23:58 +0000)]
Merge "Use Junit4 instead of Junit3 in sli/common"

6 years agoRemove mysql dependencies in sli/core 07/13607/1
Dan Timoney [Tue, 19 Sep 2017 21:33:48 +0000 (17:33 -0400)]
Remove mysql dependencies in sli/core

Remove lingering mysql dependencies in sli/core, which prevented odlsli
container from starting up clean.  Note: tested this using bareodl container
and verified that these changes install clean AFTER changing incorrect
driver property name in dblib.properties.  This patch is fine, but a second
patch to ccsdk/distribution is needed to fix that property file.

Change-Id: I6a900d1c29998867bfbae29d5e113c4e392a8bb9
Issue-ID: CCSDK-95
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoUse Junit4 instead of Junit3 in sli/common 91/13591/1
ramu.n [Tue, 19 Sep 2017 20:47:00 +0000 (02:17 +0530)]
Use Junit4 instead of Junit3 in sli/common

Modified sli/common pom.xml file to take Junit version from parent pom file
and modified one Testfile as per Junit4

Change-Id: Iee4397125d9873def60c77ba8be5d541e0df62fa
Issue-Id: CCSDK-98
Signed-off-by: Ramu N <ramu.n@huawei.com>
6 years agoMerge "Fix few Major sonar issues"
Dan Timoney [Tue, 19 Sep 2017 18:31:36 +0000 (18:31 +0000)]
Merge "Fix few Major sonar issues"

6 years agoMerge "Fix few Major sonar issues"
Dan Timoney [Tue, 19 Sep 2017 18:31:16 +0000 (18:31 +0000)]
Merge "Fix few Major sonar issues"

6 years agoFix mariadb-connector-java references 45/13545/1
Dan Timoney [Tue, 19 Sep 2017 17:34:33 +0000 (13:34 -0400)]
Fix mariadb-connector-java references

Remove mariadb-connector-java reference in dblib features.xml

Change-Id: I29f7466a82b25e35b180eb48911dd553c86460fa
Issue-ID: CCSDK-95
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoFix mariadb-connector-java references 11/13211/1
Dan Timoney [Mon, 18 Sep 2017 19:43:56 +0000 (15:43 -0400)]
Fix mariadb-connector-java references

Correct mariadb JDBC connector artifactId should be mariadb-java-client,
not mariadb-connector-java

Change-Id: If58a33a1ef22d47e1d5c138bad164b0ad89219eb
Issue-ID: CCSDK-95
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoUpdate sli/core to use Mariadb connectori 03/13203/1
Dan Timoney [Mon, 18 Sep 2017 18:56:39 +0000 (14:56 -0400)]
Update sli/core to use Mariadb connectori

Update sli/core (including dblib, notably) to use mariadb-connector
for any jUnit tests.  Update Import-Package in dblib provider pom.xml
to import org.mariadb.jdbc so that org.mariadb.jdbc.Driver will
be resolved

Change-Id: I39dfe2cafb955ba1bf05b0ecdb0212d766fcc96c
Issue-ID: CCSDK-95
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Fix few Major sonar issues"
Dan Timoney [Mon, 18 Sep 2017 16:38:43 +0000 (16:38 +0000)]
Merge "Fix few Major sonar issues"

6 years agoExplicitly import com.mysql.jdbc package 71/13171/1
Dan Timoney [Mon, 18 Sep 2017 15:33:49 +0000 (11:33 -0400)]
Explicitly import com.mysql.jdbc package

Need to explicitly add com.mysql.jdbc to Import-Package in dblib/provider
pom.xml, so that Class.forName() can resolve com.mysql.jdbc.Driver.
Will also need to add org.mariadb.jdbc,but will do that in a separate
commit

Change-Id: I6a4be5d4e1841690919484940af75a2cb15c357b
Issue-ID: CCSDK-94
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoFix few Major sonar issues 65/13165/1
ramu.n [Mon, 18 Sep 2017 14:47:36 +0000 (20:17 +0530)]
Fix few Major sonar issues

Fix few Major sonar issues in CCSDK SLI Core module
* Use logger method's built-in string formatting instead of string concatination
* code formatting
* Use Integer.toString() instead of concatenating empty string "" to a primitive

Change-Id: I5a15c9b0049b71d7b0fa06c6791abe766a035c46
Issue-Id: CCSDK-67
Signed-off-by: Ramu N <ramu.n@huawei.com>
6 years agoFix few Major sonar issues 47/13147/4
ramu.n [Mon, 18 Sep 2017 13:37:17 +0000 (19:07 +0530)]
Fix few Major sonar issues

Fix few Major sonar issues in CCSDK SLI Core module
* Remove useless parentheses
* Remove useless assignment to local variable
* Use logger method instead of string formatting

Change-Id: Ie9958d0bc4e754c36c127d465a1953160c2c3e2b
Issue-Id: CCSDK-67
Signed-off-by: Ramu N <ramu.n@huawei.com>
6 years agoFix few Major sonar issues 15/13015/1
ramu.n [Mon, 18 Sep 2017 07:12:25 +0000 (12:42 +0530)]
Fix few Major sonar issues

Fix few Major sonar issues in CCSDK SLI Core module
* Remove useless parentheses
* Either log or rethrow the exception
* Add the "@Override" annotation
* Change "try" to a try-with-resources
* Replace duplicate string literals with constants

Change-Id: If52163220d7231ae42ef42b0313d56435f6745e1
Issue-Id: CCSDK-67
Signed-off-by: Ramu N <ramu.n@huawei.com>
6 years agoFix Sonar issues in sli/core module 25/12925/1
surya-huawei [Sun, 17 Sep 2017 17:23:41 +0000 (22:53 +0530)]
Fix Sonar issues in sli/core module

One major issue
* Use try with resources instead of try

Issue-Id: CCSDK-87
Change-Id: Ic30016f70ebc355f80a73c9e4632b7971d2b87be
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoMerge "Fix few Major sonar issues"
Dan Timoney [Sat, 16 Sep 2017 00:11:21 +0000 (00:11 +0000)]
Merge "Fix few Major sonar issues"

6 years agoFix service tag in sli/recording blueprint 69/12769/1
Dan Timoney [Fri, 15 Sep 2017 18:03:17 +0000 (14:03 -0400)]
Fix service tag in sli/recording blueprint

One of the service tags in sli/recording blueprint uses attribute 'class'
instead of 'interface' to advertise the service.  This is preventing
SDNC container from loading sdnc-sli-recording feature.

Change-Id: I4f6863d74dd6fb8babd91fde53b9680594aa7a31
Issue-ID: SDNC-54
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Log current DG & NodeId using MDC"
Dan Timoney [Fri, 15 Sep 2017 13:52:10 +0000 (13:52 +0000)]
Merge "Log current DG & NodeId using MDC"

6 years agoMerge "Fix Blocker/Critical sonar issues"
Dan Timoney [Fri, 15 Sep 2017 13:42:48 +0000 (13:42 +0000)]
Merge "Fix Blocker/Critical sonar issues"

6 years agoFix few Major sonar issues 25/12725/1
ramu.n [Fri, 15 Sep 2017 13:15:29 +0000 (18:45 +0530)]
Fix few Major sonar issues

Fix few Major sonar issues in CCSDK SLI Core module
* Remove useless parentheses
* Either log or rethrow the exception
* Remove unused variables
* Add the "@Override" annotation
* Change "try" to a try-with-resources

Change-Id: I64c4bd3c746bb2f226f4f58c39f28a8b2d178953
Issue-Id: CCSDK-67
Signed-off-by: Ramu N <ramu.n@huawei.com>
6 years agoPrepared DBLIB for multi-verndor JDBC Driver 95/12595/3
Rich Tabedzki [Fri, 15 Sep 2017 01:02:37 +0000 (01:02 +0000)]
Prepared DBLIB for multi-verndor JDBC Driver

Changes made:
1. removed hardcoded JDBC driver's name and made it a property.
2. Optimized connection pool initialization
3. Removed unused factories.

Change-Id: Id1d1868f7f1a6ae5a0429a97403042a8f6ee78d3
Issue-ID: CCSDK-92
Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com>
6 years agoLog current DG & NodeId using MDC 75/12575/2
Marcus G K Williams [Thu, 14 Sep 2017 22:25:57 +0000 (15:25 -0700)]
Log current DG & NodeId using MDC

Uses MDC.put to add current directed
graph and current nodeId to MDC
context which is then logged into the
standard karaf log.

Issue-Id: CCSDK-71
Change-Id: Ieeeea6a89761cdf0ee7a3e63f4e58e182f37ff28
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
6 years agoRemove pom.xml sections inherited from oparent 51/12551/1
Dan Timoney [Thu, 14 Sep 2017 20:16:12 +0000 (16:16 -0400)]
Remove pom.xml sections inherited from oparent

Remove pom.xml sections inherited from oparent.  In particular, comment
out distributionManagement so that it is inherited from oparent.

Change-Id: I702e70eb712ecfcf02f6707830b1268586c34e09
Issue-ID: CCSDK-43
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Fix critical issues"
Dan Timoney [Thu, 14 Sep 2017 18:21:17 +0000 (18:21 +0000)]
Merge "Fix critical issues"

6 years agoMerge "Fix SDNC service registration"
Dan Timoney [Thu, 14 Sep 2017 18:15:38 +0000 (18:15 +0000)]
Merge "Fix SDNC service registration"

6 years agoMerge "Fix few sonar issues"
Dan Timoney [Thu, 14 Sep 2017 18:14:59 +0000 (18:14 +0000)]
Merge "Fix few sonar issues"

6 years agoMerge "Clean up public interfaces"
Marcus Williams [Thu, 14 Sep 2017 17:57:40 +0000 (17:57 +0000)]
Merge "Clean up public interfaces"

6 years agoMerge "Use oparent-odlparent in sli/core"
Marcus Williams [Thu, 14 Sep 2017 17:51:03 +0000 (17:51 +0000)]
Merge "Use oparent-odlparent in sli/core"

6 years agoFix SDNC service registration 83/12483/1
Ryan Goulding [Thu, 14 Sep 2017 16:37:10 +0000 (12:37 -0400)]
Fix SDNC service registration

Instead of registgering services via BundleActivator(s), use blueprint
instead.  This change deletes the RecordingActivator, as it was just
used to kickstart the service registration using felix dm.  The idea
here is to instead use blueprint through recording-blueprint.xml.

The decision was also made to register the Service(s) using the
implementation class name instead of the interface class name for
backwards compatibility reasons.  In all reality, registering Service(s)
under the implementation name is less future proof since clients are
no longer able to easily swap in a separate implementation Service.
In the future, we should consider finding usages of this Service and
ensuring that they poll for the interface rather than the implementation.
However, that is separate from this change and is considered future work.

Issue-Id: SDNC-54
Change-Id: I757bb90f91d114668c153ec5debb5c65af44452a
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoMerge "Clean up BaseDBConfiguration class"
Marcus Williams [Thu, 14 Sep 2017 16:28:52 +0000 (16:28 +0000)]
Merge "Clean up BaseDBConfiguration class"

6 years agoClean up public interfaces 77/12477/3
Ryan Goulding [Thu, 14 Sep 2017 16:14:12 +0000 (12:14 -0400)]
Clean up public interfaces

The Java programming language assigns certain defaults for methods
and constants defined in interfaces.  This change removes the
unnecessary redundant modifiers appropriately.

For example:
* interface methods are public by default
* interface constants are public by default
* interface methods are abstract unless "default" is specifically
  used (as of JDK8+).

This is really just to get rid of annoying warnings present in
IDE(s).

Issue-Id: SDNC-79
Change-Id: I2e6b3e4fa02bad1beee2cbb49d3766722eff1ba0
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoFix few sonar issues 71/12471/2
ramu.n [Thu, 14 Sep 2017 15:35:22 +0000 (21:05 +0530)]
Fix few sonar issues

Fix few sonar issues in CCSDK SLI Core module

Change-Id: I0e2454f7e23e73087ac42880c5e0b1e4c089dde8
Issue-Id: CCSDK-67
Signed-off-by: Ramu N <ramu.n@huawei.com>
6 years agoFix Blocker/Critical sonar issues 67/11667/4
shashikanth [Mon, 11 Sep 2017 12:51:17 +0000 (18:21 +0530)]
Fix Blocker/Critical sonar issues

Fix Blocker/Critical sonar issues in vnfapi module
https://sonar.onap.org/component_issues?id=org.openecomp.sdnc.core%3Asdnc-core#resolved=false|severities=BLOCKER

Issue-Id: CCSDK-67
Change-Id: Ie2ace1bc30bbb50d2b6f25a56e716c7a952e7ea0
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoFix critical issues 65/12365/2
surya-huawei [Thu, 14 Sep 2017 06:08:05 +0000 (11:38 +0530)]
Fix critical issues

few critical/major issues in core/sli module

Issue-Id: CCSDK-87
Change-Id: Ib7ef026ecb7fcf658ea8fc66ad5d9b739f02c55b
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoMerge "Fix Blocker/Critical sonar issues"
Dan Timoney [Wed, 13 Sep 2017 21:18:25 +0000 (21:18 +0000)]
Merge "Fix Blocker/Critical sonar issues"

6 years agoClean up BaseDBConfiguration class 89/12289/2
Ryan Goulding [Wed, 13 Sep 2017 20:58:19 +0000 (16:58 -0400)]
Clean up BaseDBConfiguration class

This change isn't too big;  it mainly just attempts to clean up the
BaseDBConfiguration class using best practices.  For example:

* documentation is added surrounding public methods, public constants,
  protected variables, and class headers.
* code logic for parsing "optional" integer properties is abstracted
  into a separate private static function, which returns a default
  value if the given input property cannot be parsed or is not present.
* public functions where the NumberFormatException RuntimeException
  might be thrown have the appriorate "throws" modifier added to their
  function signatures to indicate that the consumer is responsible for
  exception handling.
* constants are extracted in place of "magic numbers"

This is really just code sanitation work.

Change-Id: Ifaf092e10b17f54c7cce0a888aa49bfe8377cdd3
Issue-Id: SDNC-79
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoMerge "Fix Blocker/Critical sonar issues"
Dan Timoney [Wed, 13 Sep 2017 20:50:22 +0000 (20:50 +0000)]
Merge "Fix Blocker/Critical sonar issues"

6 years agoUse oparent-odlparent in sli/core 83/12283/1
Dan Timoney [Wed, 13 Sep 2017 20:32:45 +0000 (16:32 -0400)]
Use oparent-odlparent in sli/core

Update sli/core to use oparent-odlparent.  To prevent verify builds from
failing due to unit test errors, also changed unit tests that require
database access to use MariaDB4j to start up a local MariaDB database.

Change-Id: I928b7e1e83bdb328ca9e0785c8b81f67f982eeda
Issue-ID: CCSDK-43
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Fix Sonar Issues"
Dan Timoney [Wed, 13 Sep 2017 20:27:07 +0000 (20:27 +0000)]
Merge "Fix Sonar Issues"

6 years agoMerge "Fix Sonar Issues"
Dan Timoney [Wed, 13 Sep 2017 20:26:57 +0000 (20:26 +0000)]
Merge "Fix Sonar Issues"

6 years agoMerge "Fix sonar issues"
Dan Timoney [Wed, 13 Sep 2017 20:25:24 +0000 (20:25 +0000)]
Merge "Fix sonar issues"

6 years agoMerge "Fix Sonar Issues"
Dan Timoney [Wed, 13 Sep 2017 20:20:21 +0000 (20:20 +0000)]
Merge "Fix Sonar Issues"

6 years agoMerge "Fix Sonar Issues"
Dan Timoney [Wed, 13 Sep 2017 20:20:04 +0000 (20:20 +0000)]
Merge "Fix Sonar Issues"

6 years agoRemove unused imports in java files 31/12031/2
Ryan Goulding [Tue, 12 Sep 2017 19:13:44 +0000 (15:13 -0400)]
Remove unused imports in java files

Code sanitation-- remove unused imports.

Issue-Id: SDNC-79
Change-Id: I5306a9b90f302086459fcac98d04f541ba7c79a4
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoFix Sonar Issues 17/11917/2
surya-huawei [Tue, 12 Sep 2017 09:59:44 +0000 (15:29 +0530)]
Fix Sonar Issues

few major issues in sli/core/dblib module

Issue-id: CCSDK-87
Change-Id: Ie3b13468d23c1e7dc2228bb7a0cd1bde5cc632e8
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFix Sonar Issues 59/11859/2
surya-huawei [Tue, 12 Sep 2017 06:22:59 +0000 (11:52 +0530)]
Fix Sonar Issues

few major issues in sli/core/filters module

Issue-Id- CCSDK-87
Change-Id: Idbf2b12b866d48161f089271a2403aaee6b8d04f
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFix sonar issues 21/11921/2
surya-huawei [Tue, 12 Sep 2017 10:20:07 +0000 (15:50 +0530)]
Fix sonar issues

few major issues in dblib module

Issue-Id: CCSDK-87
Change-Id: I6bc1fe2cf04cec0a5ad3bfb65bc3a10e5f488eea
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFix Sonar Issues 53/11853/2
surya-huawei [Tue, 12 Sep 2017 05:37:35 +0000 (11:07 +0530)]
Fix Sonar Issues

few major issues in sli/core module

Issue-Id: CCSDK-87
Change-Id: I1fb86f084d270906dcf61d33701da54a82f2c3a4
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFix Sonar Issues 29/11829/2
surya-huawei [Tue, 12 Sep 2017 04:17:40 +0000 (09:47 +0530)]
Fix Sonar Issues

few major issues in sli/core module

Issue-Id: CCSDK-87
Change-Id: Id563cd2fb31f477f96e14b180501feeb37fb24a7
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoFix Sonar issues 47/11647/3
surya-huawei [Mon, 11 Sep 2017 11:06:49 +0000 (16:36 +0530)]
Fix Sonar issues

Few major issues in sli/core module

Issue-id: CCSDK-67
Change-Id: Iad65b30a6b27814c1984d8db42d36f8569c5cb3f
Signed-off-by: surya-huawei <a.u.surya@huawei.com>
6 years agoMerge "Fix Blocker/Critical sonar issues"
Dan Timoney [Mon, 11 Sep 2017 20:25:48 +0000 (20:25 +0000)]
Merge "Fix Blocker/Critical sonar issues"

6 years agoRemove cast to DBResourceManager 99/11699/2
Dan Timoney [Mon, 11 Sep 2017 15:19:51 +0000 (11:19 -0400)]
Remove cast to DBResourceManager

Remove cast to DBResourceManager, which no longer works after
DbLibService is advertised via Aries Blueprint and which is no
longer needed after DbLibService interface exposes getConnection()
method.
Updated version number - seems like an older 0.1.1-SNAPSHOT without
DbLibService change is being used, so trying to see if bumping version will
help.

Change-Id: Ia411d1514bca396cc052f4f16eda6c79e0d13648
Issue-ID: CCSDK-86
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Expose getConnection from DblibSeervice"
Dan Timoney [Mon, 11 Sep 2017 15:15:31 +0000 (15:15 +0000)]
Merge "Expose getConnection from DblibSeervice"

6 years agoExpose getConnection from DblibSeervice 53/11453/2
Dan Timoney [Fri, 8 Sep 2017 22:52:46 +0000 (18:52 -0400)]
Expose getConnection from DblibSeervice

Exposed getConnection from DbLibService class so that it can be accessed
from OSGi client.  Prior to blueprint refactoring, this was accessible
by casting DbLibService as DBResourceManager, but that cast no longer
works if OSGi service is advertised by blueprint.  It's cleaner to expose
that method in the interface anyway.

Change-Id: I36ed7fe82b0393a952d307a1c79d1d8c0ba11dd4
Issue-ID: CCSDK-86
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoFix Blocker/Critical sonar issues 75/11675/1
shashikanth [Mon, 11 Sep 2017 13:22:19 +0000 (18:52 +0530)]
Fix Blocker/Critical sonar issues

Fix Blocker/Critical sonar issues in ccsdk/core module
https://sonar.onap.org/component_issues?id=org.openecomp.sdnc.core%3Asdnc-core#resolved=false|severities=BLOCKER

Issue-Id: CCSDK-67
Change-Id: Iec86b90f7085f4b96d4f92adf4064b70640fcf22
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoCleanup project's name in Sonar 91/11391/1
Jessica Wagantall [Fri, 8 Sep 2017 21:49:09 +0000 (14:49 -0700)]
Cleanup project's name in Sonar

The name parameter in the root pom.xml should
match the project name in gerrit to reflect consistency
in Sonar.

Change-Id: I73a561752044b0d1b03a1b52f4b432f4c3329269
Issue-id: CIMAN-65
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoMerge "Fix Sonar issues within SliPluginUtils module"
Dan Timoney [Fri, 8 Sep 2017 14:05:15 +0000 (14:05 +0000)]
Merge "Fix Sonar issues within SliPluginUtils module"

6 years agoFix Blocker/Critical sonar issues 13/10813/5
shashikanth [Thu, 7 Sep 2017 12:45:52 +0000 (18:15 +0530)]
Fix Blocker/Critical sonar issues

Fix Blocker/Critical sonar issues in vnfapi module
https://sonar.onap.org/component_issues?id=org.onap.ccsdk.sli.core%3Accsdk-sli-core#severities=BLOCKER

Issue-Id: CCSDK-67
Change-Id: I9f1a7dc8144a2a3a777a2a4f24793bbf9317de33
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoFix Blocker/Critical sonar issues 47/11047/1
shashikanth [Fri, 8 Sep 2017 08:54:06 +0000 (14:24 +0530)]
Fix Blocker/Critical sonar issues

Fix Blocker/Critical sonar issues in vnfapi module
https://sonar.onap.org/component_issues?id=org.onap.ccsdk.sli.core%3Accsdk-sli-core#severities=BLOCKER

Issue-Id: CCSDK-67
Change-Id: I0b779cb0db33f0742776062bd7fa7173f08d5e62
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
6 years agoFix Sonar issues within SliPluginUtils module 97/10897/2
Arun S. Yerra [Thu, 7 Sep 2017 18:09:06 +0000 (11:09 -0700)]
Fix Sonar issues within SliPluginUtils module

Sonarqube report for SliPluginUtils identified some critical bugs. This fix will address these bugs.

Issue-Id: CCSDK-81

Change-Id: I9a1738c02f1364b17a0895b94f26c373e4a19f1f
Signed-off-by: Arun S. Yerra <arun.yerra@huawei.com>
6 years agoFix sonar blocker issues in ccsdk/core module 53/10953/1
Arun S. Yerra [Thu, 7 Sep 2017 23:21:23 +0000 (16:21 -0700)]
Fix sonar blocker issues in ccsdk/core module

Sonarqube report for CCSDK core identfied some blcoker issues. This fix addresses those bugs.

Issue-Id: CCSDK-84

Change-Id: Ie6ff19b7b0815a129f9809243e8e3eb0a64144ab
Signed-off-by: Arun S. Yerra <arun.yerra@huawei.com>
6 years agoMerge "Update dblib service name"
Dan Timoney [Thu, 7 Sep 2017 19:21:32 +0000 (19:21 +0000)]
Merge "Update dblib service name"

6 years agoUpdate dblib service name 03/10903/1
Dan Timoney [Thu, 7 Sep 2017 18:55:19 +0000 (14:55 -0400)]
Update dblib service name

Update name of dblib service to match the DbLibService interface name
rather than implemtation class (previous advertised name).

Change-Id: I999298c089e75fe3bd467241a473abcc04138852
Issue-ID: CCSDK-83
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Fix SDNC service registration"
Dan Timoney [Thu, 7 Sep 2017 18:19:07 +0000 (18:19 +0000)]
Merge "Fix SDNC service registration"

6 years agoFix SDNC service registration 55/10855/1
Ryan Goulding [Thu, 7 Sep 2017 14:38:44 +0000 (10:38 -0400)]
Fix SDNC service registration

Fix the aaaUserName constant.

Change-Id: I4d9272e476874f6a7747970bc67f8f88ff803f21
Issue-Id: SDNC-54
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoMerge "Fix service registration for SDNC"
Dan Timoney [Wed, 6 Sep 2017 23:16:05 +0000 (23:16 +0000)]
Merge "Fix service registration for SDNC"

6 years agoMerge "Enable surefire unit testing"
Dan Timoney [Wed, 6 Sep 2017 23:15:35 +0000 (23:15 +0000)]
Merge "Enable surefire unit testing"

6 years agoEnable surefire unit testing 27/10027/2
Marcus G K Williams [Fri, 1 Sep 2017 22:44:56 +0000 (15:44 -0700)]
Enable surefire unit testing

Issue-Id: CCSDK-67
Change-Id: I3d03ff1a3e312edd4af7ab69508760d2fe49be78
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
6 years agoFix SDNC service registration 99/10599/1
Ryan Goulding [Wed, 6 Sep 2017 16:03:51 +0000 (12:03 -0400)]
Fix SDNC service registration

Convert the BundleActivator to a POJO provider, and do the service registration
through blueprint instead.

Issue-Id: SDNC-54
Change-Id: Ia5618ef443967803b31da1ac9e020d1092c3ab8d
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoFix service registration for SDNC 97/10597/1
Ryan Goulding [Wed, 6 Sep 2017 15:47:00 +0000 (11:47 -0400)]
Fix service registration for SDNC

sliPluginUtils was using a BundleActivator for Service Instantiation, which
is prone to heisenbugs due to indeterminate service instantiation logic.  This
removes the BundleActivator and instantiates services using blueprint.

Since dme2.properties are parsed using Properties instead of using a
ManagedService, the decision was to just keep them immutable.

Future work may involve making instance variables private in DME2, since
currently Dme2Test performs direct member access on DME2 instance variables
which is considered bad practices (violates encapsulation).

Issue-Id: SDNC-54
Change-Id: Ib1155565e04e9a95d222bc4028a0845d9d81bd82
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoFix service registration for SDNC 31/7931/8
Ryan Goulding [Thu, 17 Aug 2017 20:15:39 +0000 (16:15 -0400)]
Fix service registration for SDNC

Addresses the inherit race conditions associated with the
BundleActivator abstraction.  From lessons learned in OpenDaylight
project, dependency injection and service injection via Aries Blueprint
is faster, more deterministic, and has better error messaging than
using BundleActivator(s).

This change addresses several aspects:
1) DBLIBResourceActivator is changed to DBLIBResourceProvider.
   This was done in order to imply that this is no longer an
   Activator or subclass of an Activator.  The class is a POJO.
2) DBLIBResourceProvider is split from a single monolithic method
   into several more manageable and better documented methods.
3) Documentation surrounding the resolution of the DB properties
   is added so that a developer can more easily identify the
   strategy (priority) used for resolving properties.
4) dblib-blueprint.xml is added.  This is used to register the
   configuration bean (DBLIBResourceProvider), and pass it as
   an argument to the actual Service (DBLIBResourceManager).
5) Tests are added to test the functionality and resolution of
   the properties file loading.

Issue-Id: SDNC-54
Change-Id: Ie9d5fb423ae7a67e9aec026c78321537399cc308
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoMerge "Update mvn name in POM to CCSDK"
Dan Timoney [Fri, 1 Sep 2017 23:23:41 +0000 (23:23 +0000)]
Merge "Update mvn name in POM to CCSDK"

6 years agoUpdate mvn name in POM to CCSDK 11/10011/1
Marcus G K Williams [Fri, 1 Sep 2017 21:56:46 +0000 (14:56 -0700)]
Update mvn name in POM to CCSDK

Issue-Id: CCSDK-67
Change-Id: Ie0413cd3099cdebac81b0586789354a1c98d0a31
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
6 years agoAdd missing implementation code 47/9747/1
Dan Timoney [Thu, 31 Aug 2017 19:28:01 +0000 (15:28 -0400)]
Add missing implementation code

Due to an error in .gitignore, code that is initially generated from
provider yang, but then customized was not submitted to gerrit.  This
in turn is causing the UnsupportedOperationException seen when sliapi
installs in odlsli container.

Change-Id: Iceec13b59e5e2bd6f0b868b548d300b76c7f7a38
Issue-ID: CCSDK-69
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoRoll version to rule out staging issue 21/9521/2
Dan Timoney [Wed, 30 Aug 2017 20:22:00 +0000 (16:22 -0400)]
Roll version to rule out staging issue

Behavior observed in the odlsli docker container suggests that it might
be picking up an old build of 0.1.0-SNAPSHOT version of sli/core.  We
have observed this problem before due to issues with the Nexus staging
plugin.  This change bumps the version of sli/core to 0.1.1-SNAPSHOT and
comments out the staging plugin from the sli/core pom.xml to make sure
that the current build is picked up.  There will be a corresponding
change in ccsdk/distribution to change which version of sli/core is used
in the odlsli container

Change-Id: Ie3c2b4ff66191748df14240a69a7d461fc0d4639
Issue-ID: CCSDK-69
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoMerge "Change 2 sli/core unit tests to int. tests"
Dan Timoney [Tue, 29 Aug 2017 19:43:45 +0000 (19:43 +0000)]
Merge "Change 2 sli/core unit tests to int. tests"

6 years agoCleanup artifactId for ccsdk/sli/core 99/9099/2
Dan Timoney [Tue, 29 Aug 2017 12:41:38 +0000 (08:41 -0400)]
Cleanup artifactId for ccsdk/sli/core

ArtifactId for ccsdk/sli/core pom.xml should not be identical to that for
sdnc/core, otherwise import to Eclipse of both will be confusing.
Update parent tag in each module pom under ccsdk/sli/core to new
artifactId

Change-Id: Ia78a11dc4f82dfda8fd863167daa8e8f4951b6f5
Issue-ID: CCSDK-70
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoChange 2 sli/core unit tests to int. tests 77/8977/2
Marcus G K Williams [Mon, 28 Aug 2017 20:48:06 +0000 (13:48 -0700)]
Change 2 sli/core unit tests to int. tests

Change SvcLogicGraphExecutorTest and
SvcLogicParserTest to IT Tests because
they require outside dependencies (sql database).
This change enables running jobs without
skipping tests and futher enables SONAR scans
of unit tests.

Issue-Id: CCSDK-67
Change-Id: I74184b2f2d8cb5fcc7b065c3e2e859b85dd1630b
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
6 years agoRemove license plugin 53/7653/1
Dan Timoney [Tue, 15 Aug 2017 20:21:10 +0000 (16:21 -0400)]
Remove license plugin

Remove license plugin from parent POMs.

Change-Id: Ia626a424dbb04511d5e31483134384efbe259fe7
Issue-ID: CCSDK-31
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoFix license headers 05/7605/1
Dan Timoney [Tue, 15 Aug 2017 13:55:50 +0000 (09:55 -0400)]
Fix license headers

Licence headers were accidentally updated incorrectly by previous update.
This commit restores the license headers for seed code to the wording from
the original seed code

Change-Id: Ie73bc836079be7eb1b310c472ee39b58ffeaa01c
Issue-ID: CCSDK-31
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoCompile against Carbon 17/7417/1
Dan Timoney [Sat, 12 Aug 2017 00:12:41 +0000 (20:12 -0400)]
Compile against Carbon

Update sli/core to compile against OpenDaylight Carbon SR1

Change-Id: Ibb4a3a4cfa64f0539b520f56f11d7bf1fce62357
Issue-ID: CCSDK-23
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoRemove remaining references to openecomp 99/7399/1
Dan Timoney [Fri, 11 Aug 2017 19:57:21 +0000 (15:57 -0400)]
Remove remaining references to openecomp

Remove remaining references to openecomp from properties and sample files

Change-Id: I985bae5e80ae130ffb512c9574f13172252bf6f8
Issue-ID: CCSDK-11
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoRemove openecomp documentation references 63/7363/1
Dan Timoney [Fri, 11 Aug 2017 15:26:18 +0000 (11:26 -0400)]
Remove openecomp documentation references

Removed openecomp references from site documentation.
Also, removed sample settings.xml files.  Latest direction from Linux
Foundation is that the settings.xml configs they provided on their Jenkins
will have no parameter settings - only server credentials.  So, our sample
settings.xml files are only misleading and hence should be removed.

Change-Id: I4f663973ac07b6d78dffb93aef478a81d2a4450c
Issue-ID: CCSDK-11
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoRefactor sliPluginUtils package names 67/6867/1
Dan Timoney [Mon, 7 Aug 2017 19:02:16 +0000 (15:02 -0400)]
Refactor sliPluginUtils package names

Update Java package names from org.openecomp to org.onap

Issue: CCSDK-11
Change-Id: I7e318565197b5806f6a7d7131bd3118fbe9cf8e0
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoChange sliapi package names 79/6679/2
Dan Timoney [Thu, 3 Aug 2017 20:19:36 +0000 (16:19 -0400)]
Change sliapi package names

Change package names on ccsdk/sli/core/sliapi from org.openecomp.sdnc.* to org.onap.ccsdk.*

Issue: CCSDK-11
Change-Id: I152a884c4b418c48e5bebc09aaa470ee86cd46e7
Signed-off-by: Dan Timoney <dtimoney@att.com>
6 years agoFix unit tests 71/6671/1
Dan Timoney [Thu, 3 Aug 2017 18:55:32 +0000 (14:55 -0400)]
Fix unit tests

Corrected typo in jUnit test cases for SLI MdsalHelper class

Issue: CCSDK-57
Change-Id: Id014ed5f8855494daafd12aee436880d76c5a1fe
Signed-off-by: Dan Timoney <dtimoney@att.com>