Jim Hahn [Fri, 8 Feb 2019 18:38:53 +0000 (13:38 -0500)]
Replace PolicyAssert with assertj
Removed PolicyAssert from utils-test, as its functionality is
superseded by assertj.
Change-Id: Ie7620fea98cd368a8ce4f8511e8e88f291013cff
Issue-ID: POLICY-1392
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Wed, 6 Feb 2019 17:55:09 +0000 (17:55 +0000)]
Merge "Skip all fields in gson by default"
Jim Hahn [Mon, 4 Feb 2019 23:19:15 +0000 (18:19 -0500)]
Skip all fields in gson by default
Created an exclusion strategy that will prevent gson from serializing
any fields within a class. The strategy must be registered to take
effect.
Uses lists to identify classes to be excluded when using gson with
the jackson default behavior.
Change-Id: I747fb1159846ad3000f69603f9b5d3f03bc8764f
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
Krzysztof Opasiak [Wed, 30 Jan 2019 13:10:35 +0000 (14:10 +0100)]
Fix potential race condition
init() is currently called outside of synhronized block.
This is may lead to race condition as init() creates new bus consumer
(this.consumer) which is the copied and nulled in stop() synchronized
block. This may lead to race condition if:
Thread #1 Thread #2
this.alive = true;
this.alive = false
consumerCopy = this.consumer;
this.consumer = new Consumer();
// false
if(consumerCopy != null) {
consumerCopy.close();
} else {
log.warn();
}
As a result, new BusConsumers are being created but they are never
close().
Issue-ID: POLICY-1387
Change-Id: I2eadb12ef1c4b07b9e47dc6ebc096acc713299a0
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 29 Jan 2019 22:18:57 +0000 (23:18 +0100)]
Exteract common params
Most of parameters used to initialize consumers are repeated in
every branch. Instead of having 3 copies of the same code let's
extract all common values and then add only those which are
specific to given consumer type.
Change-Id: I5884f6dd77a7e2f1a7f7614c909c1cad4826d4f1
Issue-ID: POLICY-1387
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 29 Jan 2019 22:12:46 +0000 (23:12 +0100)]
Don't reinit allowSelfSignedCerts
allowselfsignedcerts field is defined and initialized in BusTopicBase
so there is need to overwrite it once agin with the same value.
Change-Id: Id0a389921954606392eb2cb3c23cd0d8ee3dc4ae
Issue-ID: POLICY-1387
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 28 Jan 2019 20:11:38 +0000 (21:11 +0100)]
Remove constant from Topic interface
Fix sonar issue:
Move constants to a class or enum
Issue-ID: POLICY-1486
Depends-On: I453a14c3dda337f2a4d08914ead32b37adc17353
Change-Id: I6baac1fe6e692074bca971f3c35bb2a29cb49205
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 28 Jan 2019 20:07:52 +0000 (21:07 +0100)]
Use helper class to retrieve network logger
Instead of abusing constant from Topic interface use new dedicated
helper class to retrive network logger.
Issue-ID: POLICY-1486
Change-Id: Ia715aafb578aeb2842566de2623e8d22e42652fc
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 28 Jan 2019 19:34:09 +0000 (20:34 +0100)]
Add helper class to retrive network logger
Instead of defining static string variable inside Topic class let's
create helper class for getting specific loggers.
Issue-ID: POLICY-1486
Change-Id: Ic1f07466e1ab6abcc00098e617f0e82da19e852d
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Liam Fallon [Thu, 24 Jan 2019 16:30:15 +0000 (16:30 +0000)]
Merge "Add gson support to policy-endpoints"
Jim Hahn [Mon, 21 Jan 2019 17:42:10 +0000 (12:42 -0500)]
Add gson support to policy-endpoints
Added "provider" property to both http client and server builders.
The provider defaults to jackson, to maintain backward compatibility
until other policy code has been converted to gson.
Removed commented item from pom.
Added some comments and re-arranged a few pieces of code.
Fixed a few typos and removed spacing at the end of some lines.
Reordered imports.
Added comments about limitations when using jersey-media-json-jackson.
Address ridiculous checkstyle complaint.
Support comma-separated list of serialization providers in jersey client.
Disabled metainf discovery from jersey client and server so that the
media-json dependencies could be re-instated in the pom.
Address another ridiculous checkstyle complaint.
Change-Id: Ic5a93b475d0ee9b435352b3516de6b865b00a86a
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 23 Jan 2019 19:25:12 +0000 (14:25 -0500)]
Add gson to utils pom
Added gson dependency to utils pom in anticipation of future
reviews.
Change-Id: I1d0e4130083a73d250fe01f0e1a0154c608c6ce6
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
Jorge Hernandez [Tue, 15 Jan 2019 19:28:16 +0000 (13:28 -0600)]
Add post and delete http client methods
Additional clean up for sonars have also been added for the
classes that have been modified
Issue-ID: POLICY-1367
Change-Id: Ie97d9057273e89850420a7c1b5b2d275709bdfd0
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Jim Hahn [Tue, 15 Jan 2019 14:43:13 +0000 (09:43 -0500)]
Remove policy-endpoints checkstyle suppressions
Split class files so each file only contains one class.
Change-Id: Iaf94c4c079380dc7db3aff2affbe48f50e3cc0a2
Issue-ID: POLICY-1134
Signed-off-by: Jim Hahn <jrh3@att.com>
Jorge Hernandez [Thu, 10 Jan 2019 23:24:53 +0000 (17:24 -0600)]
Adding NOOP sources support
In addition, Noop* classes have been refactored to
increase code reuse and clean some checkstyle issues.
Additional Junits have been added for existing functionality.
Change-Id: I072f9ff2f415630ac82eca949a8360249f73da86
Issue-ID: POLICY-1397
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Jim Hahn [Wed, 9 Jan 2019 20:39:46 +0000 (15:39 -0500)]
Remove policy/common integrity-audit suppressions
Changed "DbDAO" to "DbDao".
Change-Id: I51a6706cceef6857404ae7c12ce43e553ea0da29
Issue-ID: POLICY-1133
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 8 Jan 2019 22:15:07 +0000 (17:15 -0500)]
Replace expectException with AssertJ
Change-Id: I73c186f181960ac7ac8cd985e55db1831963910f
Issue-ID: POLICY-1392
Signed-off-by: Jim Hahn <jrh3@att.com>
liamfallon [Wed, 19 Dec 2018 19:14:35 +0000 (19:14 +0000)]
Add support for parameter inheritance
Common parameter support does not allow for inheritance of parameters
from a super class. This change allows inheritance of public and protected
members from a parameter superclass to a parameter subclass.
Issue-ID: POLICY-1222
Change-Id: Ia4f452abab80953b41784c44e4202e8d5405a197
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Fri, 30 Nov 2018 14:28:09 +0000 (09:28 -0500)]
Update eclipselink version in policy common
Use eclipselink from policy parent.
Change-Id: I472900a82a5c8b69e1a4a1efc4b3bcb86f3965a8
Issue-ID: POLICY-1359
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 27 Nov 2018 20:15:57 +0000 (15:15 -0500)]
Remove Factory from IntegrityMonitor
Also removed unneeded method override in junit test.
Change-Id: I7186e9f75443f7b8ba8376aa0e00a5cf4c573696
Issue-ID: POLICY-1287
Signed-off-by: Jim Hahn <jrh3@att.com>
Jorge Hernandez [Tue, 27 Nov 2018 16:28:40 +0000 (16:28 +0000)]
Merge "Fix checkstyle issue in policy common"
Krishnakumar Jinka [Sun, 25 Nov 2018 03:27:05 +0000 (12:27 +0900)]
Fix checkstyle issue in policy common
Move method into class it is being called. Fix minor checkstyle
formatting in the class. The changes have side effects hence
revert some changes. Modify the javadoc tags
Issue-ID: POLICY-1251
Change-Id: Iecb513dafe3f60628664f3e60d6c49d3e4ce3148
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
Parshad Patel [Fri, 23 Nov 2018 06:41:03 +0000 (15:41 +0900)]
Rename test classes in policy/common
Make test classes name consistence
Issue-ID: POLICY-1281
Change-Id: I2d70eda0a2fe7dc60e020dd91c743c1708d1f11a
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Pamela Dragosh [Tue, 6 Nov 2018 18:00:56 +0000 (13:00 -0500)]
Update dmaap code for 1.1.9
The new version has changed class names.
Issue-ID: POLICY-1229
Change-Id: Id268b1a57667ffa3b5950dba7c10db2181586245
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
liamfallon [Wed, 31 Oct 2018 15:23:33 +0000 (15:23 +0000)]
Set new master version for Dublin
Issue-ID: POLICY-1232
Change-Id: Icb6179ace3f320bdda3da2160afd2d058762ae5e
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Jim Hahn [Tue, 30 Oct 2018 13:48:25 +0000 (09:48 -0400)]
Remove openecomp repo from common pom
Change-Id: I7c654ef350fb1d83a4fd43c57b6b2fb960acf42e
Issue-ID: POLICY-1231
Signed-off-by: Jim Hahn <jrh3@att.com>
Jorge Hernandez [Fri, 26 Oct 2018 13:46:00 +0000 (08:46 -0500)]
Detection of AAF enablement
Change-Id: I049e88bec2c83f6224ba1d1f24b93e0fb1aa807e
Issue-ID: POLICY-1216
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
ramverma [Wed, 24 Oct 2018 13:50:13 +0000 (14:50 +0100)]
Fix refering to snapshot in policy/common
Issue-ID: POLICY-1213
Change-Id: Id34f28a3f41687993009128940e9ddec69d5b88f
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Jorge Hernandez [Fri, 5 Oct 2018 18:12:44 +0000 (18:12 +0000)]
Merge "Remove constraints"
Pamela Dragosh [Fri, 5 Oct 2018 16:22:43 +0000 (12:22 -0400)]
Remove constraints
Sonar is flagging the null checks.
Issue-ID: POLICY-1130
Change-Id: I4ab94b3db79d4089f20afaf3f80f3c925541084a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Wed, 3 Oct 2018 16:09:28 +0000 (12:09 -0400)]
Support Throwables in expectException()
Also fixed some bugs in the junit tests.
Renamed expectException() to assertThrows().
Added test cases.
Change-Id: I13dff0007e35c2d2521a4ca40bb65e6820416ed1
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 2 Oct 2018 21:46:04 +0000 (17:46 -0400)]
Add expectException to policy-common
Also fixed new checkstyle error.
Change-Id: I2d2c2518f3f7da1a0ace8c32e10b4151d941bb6f
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Mon, 1 Oct 2018 18:44:26 +0000 (14:44 -0400)]
Fix minor sonar
These are mainly duplicate strings. But also combined
if statements and fixing some debug messages missing
arguments or format specifiers. Some duplicates I left
alone as it seemed unreadable to change them. Also
moving variables to their correct place (before constructors).
Issue-ID: POLICY-1130
Change-Id: I8018c676b22fe8fec635f129fa37921ad1004569
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Sat, 29 Sep 2018 14:06:26 +0000 (10:06 -0400)]
Fix RestManager test issue
Apparently drools-pdp code depends on Dmaap topic factories throwing
IllegalArgumentException instead of IllegalStateException (which is what
the other topic factories throw) when an unknown topic name is requested.
Therefore, the change to make them consistent has been backed out.
Change-Id: Ia3d7e26a61027977eb626c9ddad6369982eae002
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 28 Sep 2018 13:53:14 +0000 (09:53 -0400)]
Add junit coverage to rest of policy-endpoint bus
Also extracted out common code from tests.
Fix checkstyle issues.
Be consistent in returning IllegalStateException when topic is not
found by any Topic Factory.
Added/updated some comments.
Use better name for "validate" argument.
Renamed test() to testDestroy().
Added NoopTopicPropertyBuilder.
Renamed BusTopicTestBase to TopicTestBase.
Change-Id: Id4c7ab9f2b5572dc5195b0da116e285c5e9b6f06
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Jorge Hernandez [Fri, 28 Sep 2018 02:58:51 +0000 (02:58 +0000)]
Merge "Add coverage for policy-endpoints bus"
Jim Hahn [Thu, 27 Sep 2018 13:09:40 +0000 (09:09 -0400)]
Add coverage for policy-endpoints bus
Added license.
Fix checkstyle warnings.
Change-Id: I2279b8b80b3dc175583353ced3d71c3a5cc4f975
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Thu, 27 Sep 2018 16:19:48 +0000 (16:19 +0000)]
Merge "Added more coverage to policy-endpoints internal"
Jim Hahn [Wed, 26 Sep 2018 19:10:52 +0000 (15:10 -0400)]
Added more coverage to policy-endpoints internal
Fixed checkstyle error.
Change-Id: Ie6a85633bab098a30ccb2c1c309e1640aa1c8131
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Thu, 27 Sep 2018 11:43:14 +0000 (11:43 +0000)]
Merge "Use powermock version from parent pom"
Jim Hahn [Tue, 25 Sep 2018 15:29:16 +0000 (11:29 -0400)]
Add junit coverage to policy-common
Added coverage tests for policy-endpoints.
Fixed new checkstyle warnings.
Use powermock version from parent pom.
Replaced literals with constants in new tests.
Moved test superclass higher up the class hierarchy so it can be re-used.
Removed powermock version.
Change-Id: I7d3d45132cd0973f4d02d3af320a1d53a1234e4d
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 26 Sep 2018 13:58:59 +0000 (09:58 -0400)]
Use powermock version from parent pom
Change-Id: I84fd562e7050508a75b4192ba162a09acd938986
Issue-ID: POLICY-1148
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Fri, 21 Sep 2018 16:48:29 +0000 (12:48 -0400)]
Fix policy/common checkstyle issues
The root pom.xml had a syntax error in a declaration. The suppressions
xml was not being found by the sub-modules. It was better to create a
copy in each of the sub-modules where we will not be fixing
abbreviations or the interface declarations in own java file.
Added specific checkstyle files for each submodule.
One interesting note for the InheritDoc tag. It seems that the mvn
compile has a bug that interprets these as missing a period after
the tag. Even though the parent interface has it correctly. It was
easier to just remove it than duplicate.
There are new JIRA's for that work to be done in Dublin.
Fixed some spacing in pom's.
Issue-ID: POLICY-1131
Change-Id: I5f845958ccefd50a3b7290662da43c994870f1f7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Fri, 21 Sep 2018 14:37:29 +0000 (10:37 -0400)]
new sonar issues in policy/common
Only throw one type of exception in Serializer.
Try to increase test coverage in Serializer.
Change-Id: I170de0ab727041aa42731c08d6cc454731d29a20
Issue-ID: POLICY-1130
Signed-off-by: Jim Hahn <jrh3@att.com>
Jorge Hernandez [Wed, 19 Sep 2018 19:22:28 +0000 (14:22 -0500)]
tweaks from testing in auth classes
Change-Id: Idb1346ca645ffcc55808e25c8957e01d27a48a75
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1043
Jorge Hernandez [Wed, 19 Sep 2018 14:38:46 +0000 (09:38 -0500)]
error getting aaf configuration flag
Change-Id: I98c3a3f4abef0f46a4cccf8e79ed58f65f328b2c
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1043
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Jorge Hernandez [Wed, 19 Sep 2018 12:41:45 +0000 (12:41 +0000)]
Merge "Fixes for oparent upgrade"
Pamela Dragosh [Tue, 18 Sep 2018 23:17:24 +0000 (19:17 -0400)]
Fixes for oparent upgrade
Small code fix to support jetty upgrade within oparent 1.2.1
from 9.3.* to 9.4.*
Issue-ID: POLICY-1126
Change-Id: Id2df5579d05acc738d5edfd055f42628b545dd5a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jorge Hernandez [Tue, 18 Sep 2018 19:31:07 +0000 (14:31 -0500)]
Add comments and removed redundant code in Filters
Change-Id: I57db9a90550e89ccf23f23de608eedb5d0b7f4ff
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1043
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Jorge Hernandez [Tue, 18 Sep 2018 18:28:50 +0000 (13:28 -0500)]
Support for Authorization Generic Filters
These will aid applications using there own authorization
system at their desired granularity.
Change-Id: Iba7fca8742127bcec177b93452f111d28c7f8ec7
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1043
Pamela Dragosh [Tue, 18 Sep 2018 13:41:14 +0000 (09:41 -0400)]
Remove override of parent aaf version
Policy/parent now declare the aaf dependency. This change will
use that change.
Issue-ID: POLICY-1119
Change-Id: I41d4b6406c76c6f016eeae4871b66acfcba7329e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jorge Hernandez [Mon, 17 Sep 2018 15:12:23 +0000 (10:12 -0500)]
temporarily set aaf version to snapshot
With the latest released version of AAF, encountered
problems when testing AAF. This seems to be resolved
when migrating to the not-released yet, 2.1.2-SNAPSHOT.
Checking further into AAF jira's it seems that some
necessary fixes have gone into 2.1.2-SNAPSHOT (see for example
AAF-460).
The assumption is that 2.1.2-SNAPSHOT will be soon
released by AAF team, and then we should appropriately change
this version.
In addition, there has been enhancements to allow policy
apps to configure additional filters. These will be used
initially by specific "rest" servers to provide additional
authorization capabilities.
Change-Id: I48e279738de20bd68e3f05323ad9b6cffdafc83e
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Issue-ID: POLICY-1044
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Jim Hahn [Thu, 13 Sep 2018 16:40:37 +0000 (12:40 -0400)]
add more junit coverage to new Serializer class
Removed calls to superclass methods so that appropriate
exceptions are thrown.
Better comments for new tests.
Removed @Ignore from tests.
Removed tabs from pom.
Change-Id: I97fa63951eed4c2ac5ce0a267d8da5134a2a1c71
Issue-ID: POLICY-1106
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 12 Sep 2018 21:47:53 +0000 (17:47 -0400)]
add utility class to test serializable classes
Closed the ByteArrayXxxStreams.
Closed byte output stream, even if exception in object stream.
Change-Id: I3f779a5c0e6df3ac3496abe60a46e0696b4e261c
Issue-ID: POLICY-1106
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Wed, 12 Sep 2018 17:55:51 +0000 (13:55 -0400)]
Upgrade dmaap from policy/parent
Need the following gerrit review to come in first:
https://gerrit.onap.org/r/#/c/66183/
This will now inherit from policy/parent the latest
dmaap version to be used across all policy projects.
Issue-ID: POLICY-1116
Change-Id: If76895e54d56d153621947da01ca6de2151ead25
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
liamfallon [Fri, 7 Sep 2018 12:36:41 +0000 (13:36 +0100)]
Remove changing of access on par fields
Parameter handling refactored to remove changing of
access on fields in parameters, new implementation requires
getters to be defined for all fields.
Note: This change causes a knock on into distribution
Change-Id: I172f5d9310caf92d6ea825ff93292019c00a47c3
Issue-ID: POLICY-1095
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Jorge Hernandez [Tue, 4 Sep 2018 20:11:30 +0000 (20:11 +0000)]
Merge "Remove unused property"
Pamela Dragosh [Tue, 4 Sep 2018 17:55:24 +0000 (13:55 -0400)]
Remove unused property
Now that we moved to policy/parent, this property isn't
necessary in this repo.
Found this as I was looking into mariadb security issues
for both drools-pdp and engine.
Issue-ID: POLICY-1059
Change-Id: If06e00608fe7f76314c233e806fca5d9150734ae
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
mmis [Thu, 30 Aug 2018 12:34:55 +0000 (13:34 +0100)]
Add support for http PUT
Added support for http PUT for use by the policy forwarder in
policy/distribution
Issue-ID: POLICY-926
Change-Id: Ifa5c2e8be0582797936b95b772ad236f35c10f24
Signed-off-by: mmis <michael.morris@ericsson.com>
Pamela Dragosh [Wed, 29 Aug 2018 11:54:54 +0000 (11:54 +0000)]
Merge "Improvements to Parameter Srvice"
Pamela Dragosh [Tue, 28 Aug 2018 15:22:50 +0000 (15:22 +0000)]
Merge "Adding usage of openpojo in policy common"
ramverma [Tue, 28 Aug 2018 13:09:39 +0000 (14:09 +0100)]
Adding usage of openpojo in policy common
* Changing TestHealthCheckReport to use openpojo for testing the
HealthCheckReport class.
* Adding a custom Tester implementation called ToStringTester
as a utility to test toString() method of classes using openpojo.
Change-Id: I491a23c471d50454b4d5591c6c09c6758e2c0624
Issue-ID: POLICY-1035
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
liamfallon [Tue, 28 Aug 2018 13:13:02 +0000 (14:13 +0100)]
Improvements to Parameter Srvice
Add proper handling for optional parameters
Add setName() to the parameter group interface to force definition
of that method
Add some convenience metnods to parameter service
Issue-ID: POLICY-1035
Change-Id: Iaa9226f45215b00aff9b78ab5fc120c24a0af46d
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Pamela Dragosh [Wed, 22 Aug 2018 18:02:14 +0000 (14:02 -0400)]
Make checkstyle warnings fail
For this repo, we add an suppression filter for some abbreviation names.
It is far too cumbersome to rename these checkstyle issues at this time.
We will do so post-Casablanca release.
We copy the oparent checkstyle pom settings and set to fail on any
warnings.
Change-Id: Icfbd005819a3289acd30796693be85c2ea460212
Issue-ID: POLICY-881
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
ramverma [Wed, 22 Aug 2018 11:13:33 +0000 (12:13 +0100)]
Adding common utility classes to policy/common
* Adding HealthCheckReport class to policy/common for wider use
among all policy modules.
* Adding utility class called ParameterValidationUtils for providing
common validation methods to all policy modules. For now, it has only 3
validation methods but we all can add more in future.
Change-Id: I363fe116ba74f25299fd71211be73505b3164f72
Issue-ID: POLICY-1035
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Krishnajinka [Thu, 16 Aug 2018 09:14:51 +0000 (18:14 +0900)]
Use builder for http and jersey client
Sonar issue with more than 7 params in a method. Use builder object
instead of params. Rework2 for fixing review comments.
Add modifications copyright
Issue-ID: POLICY-1017
Change-Id: Ib0fa692f8da770dcba06158d6e6cafbed2969c27
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
Pamela Dragosh [Tue, 14 Aug 2018 20:43:53 +0000 (16:43 -0400)]
Fix checkstyle comments etc.
Adding javadoc comments, renaming variables names,
fixed whitespace and 120 length. Also some variables
were made final since they were declared further from
usage. Splitting out Asserts.
Still remaining are the abbreviations.
Issue-ID: POLICY-881
Change-Id: I31ce5a9eea02578bce023c0c607a19108bb726fa
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jorge Hernandez [Tue, 14 Aug 2018 19:36:43 +0000 (19:36 +0000)]
Merge "Fixes for checkstyle issues"
Pamela Dragosh [Tue, 14 Aug 2018 13:45:44 +0000 (09:45 -0400)]
Fixes for checkstyle issues
More fixes for spacing, adding comments, adding period at the
end, and move code closer to usage.
Issue-ID: POLICY-881
Change-Id: Ife99eaf627a221e87d65d24dfd145b0ee4e06d21
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Krishnajinka [Tue, 14 Aug 2018 00:26:00 +0000 (09:26 +0900)]
Modify topic factory to use builder param
Fix sonar issue with method build using more than 7 params
Use BusTopicParams to send parameters into methods
Issue-ID: POLICY-1017
Change-Id: I194284da63cb95f91ce2e8a8c21a526a5ab9f6f3
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
Pamela Dragosh [Mon, 13 Aug 2018 18:39:43 +0000 (14:39 -0400)]
Fix checkstyle in utils
Cleared all the checkstyle in these 2 submodules.
Issue-ID: POLICY-881
Change-Id: I248e1894aebf549d5a4f8669a6466ec227d40b55
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Fri, 10 Aug 2018 18:45:45 +0000 (14:45 -0400)]
Remove simple checkstyle
Mostly concentrated on the period at the end of summary.
But I did clear a few others for longer than 120 characters
and placement of methods next to each other. Possibly a few
others.
I did not clear everything, but will submit a few more
reviews to get the others.
Issue-ID: POLICY-881
Change-Id: I692a5349d686d52fee4040757cdc2ed8b5cc221b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Fri, 10 Aug 2018 14:13:35 +0000 (14:13 +0000)]
Merge "get time from correct timer object"
Jim Hahn [Fri, 10 Aug 2018 12:56:49 +0000 (08:56 -0400)]
get time from correct timer object
Change-Id: Ie060e45d2cda368ffbb5908b41594d7795bae40b
Issue-ID: POLICY-1045
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Thu, 9 Aug 2018 16:16:22 +0000 (16:16 +0000)]
Merge "Fix bug in common-paramter validation service"
Pamela Dragosh [Thu, 9 Aug 2018 12:49:57 +0000 (12:49 +0000)]
Merge "generic jetty filter and cadi support"
ramverma [Thu, 9 Aug 2018 11:26:28 +0000 (12:26 +0100)]
Fix bug in common-paramter validation service
In GroupValidationResult & GroupMapValidationResult, the setResult
method was not setting the actual status that it has recieved from the
nested group rather it was setting its own status again. Due to which
the validation status of overall ParameterGroup was coming as CLEAN even
if a nested child has reported it as INVALID.
Changed the expected validation result texts for TestValidation accordingly.
Change-Id: I5943decce39574089ca74f9bbccbfbe66d8d542c
Issue-ID: POLICY-1035
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Jorge Hernandez [Wed, 8 Aug 2018 15:28:36 +0000 (10:28 -0500)]
generic jetty filter and cadi support
Change-Id: I363e44e85e1d89c6254218629010d5c3e1507e0a
Issue-ID: POLICY-1043
Signed-off-by: Jorge Hernandez <jh1730@att.com>
krishnajinka [Sun, 5 Aug 2018 07:52:10 +0000 (16:52 +0900)]
Apply builder pattern for topic cnsmer prdcr
Modify endpoints event bus related classes to use builder pattern
in particular apply bus topic params object instead of
using parameters as it is. Rework based on commnts
Issue-ID: POLICY-1017
Change-Id: I572a72fa525cf4f664eb70d0415be73116499bd2
Signed-off-by: krisjinka <kris.jinka@samsung.com>
Pamela Dragosh [Fri, 3 Aug 2018 22:24:28 +0000 (22:24 +0000)]
Merge "generic jetty https server support"
Liam Fallon [Fri, 3 Aug 2018 19:40:06 +0000 (19:40 +0000)]
Merge "Use builder in Bus DMaap UEB Topic constrctr"
Jorge Hernandez [Wed, 1 Aug 2018 21:18:25 +0000 (16:18 -0500)]
generic jetty https server support
jetty https support in constructor, or by using
".https" when creating an http server service.
Change-Id: I94e8e3e4b93eb6b194657028c740b6781316c7da
Issue-ID: POLICY-940
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Pamela Dragosh [Fri, 3 Aug 2018 14:27:04 +0000 (10:27 -0400)]
Upgrade jetty to clear security issue
This got missed in this repository
Issue-ID: POLICY-1030
Change-Id: Ib62fd66cc8cb74b7579f9eddbba675e4c1d16c2a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
liamfallon [Fri, 3 Aug 2018 12:33:44 +0000 (13:33 +0100)]
Fix pom and checkstyle warnings in common
Some dependency versions are now managed in the master POM
Checkstyle showed up some warnings in paramters and capabilities.
Change-Id: Ifebd8a076bdb3fda626b5b1fda9324801bf58643
Issue-ID: POLICY-716
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Krishnajinka [Fri, 3 Aug 2018 11:12:05 +0000 (20:12 +0900)]
Use builder in Bus DMaap UEB Topic constrctr
Constructors of the Bus Dmaap Ueb topic source class using many param
Refactor to use builder pattern for clean code implementation.
Issue-ID: POLICY-1017
Change-Id: Iea75b64ad232e83541a60a03a19cbb598c370cff
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
Jorge Hernandez [Wed, 1 Aug 2018 13:16:04 +0000 (13:16 +0000)]
Merge "Add resource handling utility class"
liamfallon [Mon, 30 Jul 2018 16:13:22 +0000 (17:13 +0100)]
Add resource handling utility class
Add ResourceUtils, a class that provides utility methods
for dealing with Java resources on the classpath.
Change-Id: Ie4df249315ad145aabdfb35bb827ffbf6d79e095
Issue-ID: POLICY-922
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Jorge Hernandez [Tue, 31 Jul 2018 16:57:16 +0000 (16:57 +0000)]
Merge "Improve validation, add hierarchical validation"
liamfallon [Mon, 30 Jul 2018 09:22:27 +0000 (10:22 +0100)]
Improve validation, add hierarchical validation
Parameter validaiton updated to generically support nested groups of
parameters, and nested maps of parameters.
Unit test showing JSON parameter input added.
Unit test showing YAML parameter inout added.
Test parameter group classes moved into subdirectory
This allows parameters to be unmarshaled seamlessly from JSON and YAML
files.
Change-Id: I768e11f31ee7f62299c4d5d95ab68a005d1aff16
Issue-ID: POLICY-922
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
mmis [Mon, 30 Jul 2018 16:04:50 +0000 (17:04 +0100)]
Copy policy-endpoints from drools-pdp to common
Removed changes made in commit
b40acf2d244058c162a8597968e59f2708e6abf4
that went beyond the scope of POLICY-967
Issue-ID: POLICY-967
Change-Id: Ibbf78540dec8bf8601a62dacc8c7056d43f70ba1
Signed-off-by: mmis <michael.morris@ericsson.com>
Jorge Hernandez [Sun, 29 Jul 2018 03:00:06 +0000 (22:00 -0500)]
support ueb/dmaap https related configuration
Change-Id: Ide2e3524cbbf0a8caf36ad48c003b7500482ad4a
Issue-ID: POLICY-941
Signed-off-by: Jorge Hernandez <jh1730@att.com>
Jorge Hernandez [Thu, 26 Jul 2018 18:06:35 +0000 (18:06 +0000)]
Merge "Add common parameter handling"
liamfallon [Thu, 26 Jul 2018 14:02:21 +0000 (15:02 +0100)]
Fix eclipse warnings in common logging
Minor annoying eclipse warnings due to raw Class and
deprecated log enums removed.
Change-Id: I7248b0c6fa4a4dc62104c75b07fadc5a144e8a47
Issue-ID: POLICY-716
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
liamfallon [Tue, 24 Jul 2018 11:38:24 +0000 (12:38 +0100)]
Add common parameter handling
This common module is proposed to handle all parameters and properties
for the ONAP Policy Framework in a common way.
Parameters and Properties:
- are validated once when they are loaded and need not be checked again
in classes that use them
- are available for lookup in a parameter service, they need not be passed
in constructors and method arguments
- are input using a single implementiation of input method only
(JSON/YAML/Java properties/REST)
- are defined in a schema and the schema is used for validation as much
as possible
Issue-ID: POLICY-922
Change-Id: I1fac88b9e952b6b5fcbea04319cb4294a9653327
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
mmis [Fri, 20 Jul 2018 14:28:25 +0000 (15:28 +0100)]
Copy policy-endpoints from drools-pdp to common
Issue-ID: POLICY-967
Change-Id: I374c155ee102c3e157c60d0a22d7191544abb76a
Signed-off-by: mmis <michael.morris@ericsson.com>
Kevin McKiou [Fri, 20 Jul 2018 17:14:35 +0000 (12:14 -0500)]
Remove site-manager from common-modules
Patch 1: The site-manager is specific to the AT&T environment and is
not functional in ONAP. This change removes the site-manager module
from the policy common-modules.
Patch 2: Removed the site-manager from the pom.xml file.
Issue-ID: POLICY-1001
Change-Id: Ibd8dd95915739205b0c5463c8b28706b615d9faf
Signed-off-by: Kevin McKiou <km097d@att.com>
vamshi.nemalikonda [Tue, 10 Jul 2018 14:14:02 +0000 (19:44 +0530)]
fixed Checkstyle warnings
Issue-ID: POLICY-881
Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>
Change-Id: I4057306bec83a48921c90a081fb9752f663ee3b6
vamshi.nemalikonda [Thu, 14 Jun 2018 15:05:03 +0000 (20:35 +0530)]
fixed Checkstyle warnings
Issue-ID: POLICY-881
Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>
Change-Id: Idc0c088497b4a49789c3f0aedf034d380bd3af1c
Pamela Dragosh [Mon, 25 Jun 2018 14:00:03 +0000 (14:00 +0000)]
Merge "IntegrityMonitor: remove sleep from junit tests"
Jim Hahn [Thu, 21 Jun 2018 20:23:19 +0000 (16:23 -0400)]
IntegrityAuditor: remove sleep from junit tests
Modified the code to use a CurrentTime object for its "time" operations
(e.g., sleep(), currentTimeInMillis()). Modified junit tests to replace
the CurrentTime object with TestTime objects so they don't actually
do any sleeping.
Reformat "commit" message.
Remove TODO from junit test.
Init testTime in junit setUp().
Add AuditorTime and test classes.
Change "latch" to "semaphore" in comments.
Change time units in junit test from SECONDS to MILLISECONDS.
Add sleep() method to auditor test class.
Reorder field qualifiers.
Change utils scope to "compile" in pom.
Change-Id: I8aa8b642b315156c00422192e4aa8e47b4503c2f
Issue-ID: POLICY-908
Signed-off-by: Jim Hahn <jrh3@att.com>