summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-09-22Added @Override methodrama-huawei3-17/+24
Added diamond symbol on RHS Removed useless parentheses Issue-ID: POLICY-239 Change-Id: I1c3360a9c7242ff0ee23ab5599352d36bdf8ad9c Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-22Added more junit coverage for RestManager classMagnusen, Drew (dm741q)1-2/+238
More logic to GETTest which provides coverage for all GET methods in RestManager class. Issue-ID: POLICY-109 Change-Id: Ic5840b8baab73b1e3b440ca6f0b9909dd273c9fa Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-09-22Merge "Sonar Major"Pamela Dragosh0-0/+0
2017-09-22Merge "Removed useless parentheses"Pamela Dragosh4-43/+49
2017-09-22Merge "Added @Override method"Pamela Dragosh5-36/+38
2017-09-22Merge "Added diamond symbol on RHS"Pamela Dragosh5-16/+19
2017-09-22Merge "Removed useless parentheses"Pamela Dragosh4-14/+15
2017-09-22Merge "Removed useless parentheses"Pamela Dragosh3-8/+16
2017-09-22Merge "Removed useless parentheses"Pamela Dragosh3-60/+66
2017-09-22Merge "Added junits to cover configuration classes"Jorge Hernandez2-0/+207
2017-09-22Merge "Addition of Active-Standby Feature"Jorge Hernandez29-13/+5014
2017-09-22Merge "Added junit for policy-management"Jorge Hernandez3-2/+407
2017-09-21Added junit for policy-managementMagnusen, Drew (dm741q)3-2/+407
Junits were added to cover the FileSystemPersistence and RestManager classes Patch 2: Merged some test functionality from FileSystemPersistenceTest class into SystemPersistenceTest class. Deleted FileSystemPersistenceTest class. Issue-ID: POLICY-109 Change-Id: Ifd058b9988db30f6b5bc49ae54e5060c67f4ad5e Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-09-21Addition of Active-Standby FeatureKevin McKiou29-13/+5014
Patch 1: Adds the active-standby feature to drools-pdp. This feature provides the state control of the drools-pdp nodes controlling failover with a site and across sites. Patch 2: Resolve merge conflict in packages/install/pom.xml and pom.xml. Patch 3: Resolved comments from Pamela Dragosh and Jorge Hernandez. Issue-ID: POLICY-156 Change-Id: I922b3d5d8a464006e9675924bcbc7409d68c08d5 Signed-off-by: Kevin McKiou <km097d@att.com>
2017-09-21Added junits to cover configuration classesMagnusen, Drew (dm741q)2-0/+207
Added junits to cover DroolsConfiguration and ControllerConfiguration classes. Issue-Id: POLICY-262 Change-Id: Ie6cf4b15f8b08220a93b4469cc6fd4eda9299138 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-09-21Log exceptionPamela Dragosh1-0/+1
Logging as trace since it is an acceptable exception. Change-Id: Ie93e60aeb95ece9b142c87f20eeb21ef56507dc4 Issue-ID: POLICY-261 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-21Removed useless parenthesesrama-huawei4-43/+49
Added diamond symbol on RHS Issue-ID: POLICY-239 Change-Id: I24c138703047308c2e28fef2180a0bb64400c1c9 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Added @Override methodrama-huawei5-36/+38
Added diamond symbol on RHS Removed useless parentheses Issue-ID: POLICY-239 Change-Id: Ie20319a5a7298c70a18cc3773ec47f235dbdae41 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Added diamond symbol on RHSrama-huawei5-16/+19
Removed useless parentheses Issue-ID: POLICY-239 Change-Id: Icad445f49cc619d71f71ef913f2592d5c7ebf29c Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Removed useless parenthesesrama-huawei4-14/+15
Added the diamond symbol on RHS side Issue-ID: POLICY-239 Change-Id: I6f8516d4beedd94f4ff8801d51d368f436fe570c Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Removed useless parenthesesrama-huawei3-8/+16
Added the diamond symbol on RHS side Issue-ID: POLICY-239 Change-Id: Ie49d64124a3d314f0747f35e3627ec329338f0ff Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Removed useless parenthesesrama-huawei3-60/+66
Added the "@Override" annotation Issue-ID: POLICY-239 Change-Id: I9896f3130b5f8ecaa557d5386c0118e9a09008d2 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-21Sonar Majoramshegokar1-1/+1
Removed Useless parenthesis Change-Id: I366f85922c4d4d290b320e0b88678c805de59873 Issue-ID: POLICY-250 Signed-off-by: amshegokar <AS00500801@techmahindra.com>
2017-09-20load config files in ascending order by nameJorge Hernandez1-2/+12
adding predictibility for environment and controller files loading Change-Id: Id02ddca75dd0dc8da658b64b84e77bef9e82b37c Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-19Adding JUnits for Configuration ClassesPamela Dragosh4-19/+272
Also fixed some Sonar Major issues to help clean that up. Issue-ID: POLICY-109 Change-Id: Ic8a0b8d97f2be1cc1f8e8e4e8b319c6117b231a4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-18feature-state-management failing junitsJorge Hernandez1-0/+5
because junit library is not part of the pom. Change-Id: I4e8c12edfe2e91dcdb90200b8d4f37e35109f448 Issue-ID: POLICY-155 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-18Merge "Fix sonar blocker/critical"Jorge Hernandez10-114/+90
2017-09-18Add Junit tests to 'policy-core'Ralph Straubs10-1/+685
These tests focus on the following classes: - PolicyContainer - PolicySession - PolicySessionFeatureAPI 'maven-invoker-plugin' was used to compile and install artifacts for testing during the 'test-compile' phase. These aren't part of the Maven project hierarchy, so they aren't visible to Sonar and SonarQube, and they aren't deployed. Change-Id: I67c122debbe5280f0153e7330248dc5d13c5b2c0 Issue-ID: POLICY-236 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-09-18Fix sonar blocker/criticalPamela Dragosh10-114/+90
Also add back .gitignore Sonar blocker for change condition always true. Easier to re-write this using try-with-resources. Use synchronized static method to set a static variable. Don't use e.printStackTrace it causes sonar critical to log exception Log the bytes read. Ideally I would re-write this using Java 8 NIO Issue-ID: POLICY-195 Change-Id: I080d1ad4c8bea91f87c3eca109325700e1589558 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-15Merge "Added junit for feature-healthcheck"Jorge Hernandez3-21/+265
2017-09-15Added junit for feature-healthcheckMagnusen, Drew (dm741q)3-21/+265
Added a junit test increase coverage of the healthcheck feature. Issue-ID: POLICY-227 Change-Id: I3f37e7fab15f2f3072b442b43b79b8241c61e306 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-09-15Merge "Addition of State Management Feature"Pamela Dragosh24-22/+2647
2017-09-15Fix sonar related to persistence-featurePamela Dragosh3-7/+8
Sonar blocker for catchable: I am not sure why this is wrapped with an exception. Changing try-catch to use Exception | LinkageError per Jorge/Ralph. Sonar critical for logging exceptions. Sonar critical for casting to Long and reinterrupting thread. Change-Id: I44d46f005d9aa30c434c22e479034107055277ce Issue-ID: POLICY-195 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-09-15Sonar MajorSwapnilPathak1-1/+1
Move the string literal on the left side of this string comparison. Change-Id: I8086a6fc1dc24719c3ffd3785a12c086ab453ae7 Issue-ID: POLICY-230 Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
2017-09-14Addition of State Management FeatureMagnusen, Drew (dm741q)24-22/+2647
Patch 1:This commit adds the feature to provide node state management. There are also a couple of very minor cleanup items in feature-session-persistence which came up during review and testing. Patch 2: Cleaned up some logging statements and exceptions per comments by Pam Dragosh. Patch 3: Clean up per comments from Jorge Hernandez. Patch4: Added a default to ignoreErrors in RepositoryAudit. Patch 5: Rebase. Patch 6: Removed api-state-management/.gitignore Issue-ID: POLICY-155 Change-Id: I4fbfa33314d488ff46764931ca965f802b6a26d5 Signed-off-by: Kevin McKiou <km097d@att.com>
2017-09-14Merge "Eliminate hanging when updating Drools containers"Jorge Hernandez1-1/+10
2017-09-14Eliminate hanging when updating Drools containersRalph Straubs1-1/+10
'PolicyContainer.updateToVersion(...)' now hangs unless the Drools session threads are stopped prior to the update. This wasn't an issue in the past, and it isn't clear what causes it to happen now. It also happened in the Junit tests I am currently working on. In any case, the 'updateToVersion' method has now been changed to stop the threads prior to an update attempt, do the update, and then restart the threads. Change-Id: I577a67c6e99a68bcbe3c2f476f93c0a72b93451a Issue-ID: POLICY-234 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-09-14added "fetch timeout" backoff for UEB endpointsJorge Hernandez4-417/+453
this prevents high frequency fruitless attempts to connect to an unreachable (perhaps temporarily) UEB server. added additional management apis for noop endpoints. bump versions of jackson parsers so through snakeyaml library throughtransitive dependencies is bump up from 1.15 as it is resolved in the classpath at runtime to > 1.17 otherwise causes incompatibilities with the one used in controlloops under their own classloaders, as they expect 1.17. Change-Id: I936348c4b93a2c409c22568868c44ed330dc18f7 Issue-ID: POLICY-119 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-13wait until port is open in HttpClient junit testsJorge Hernandez2-186/+206
As a note, HttpServer tests have retries at the http level. Hopefully this will resolve some timing issues and intermittent junits failures in LF jenkins environment. Issue-ID: POLICY-109 Change-Id: I44628b60d4912be5fc4639e0048791f5655bbd01 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-12Merge "missing check for noop sinks"Jorge Hernandez2-776/+796
2017-09-12Merge "Added junits for policy-util classes"Jorge Hernandez2-0/+127
2017-09-12Added junits for policy-util classesMagnusen, Drew (dm741q)2-0/+127
Added junits to increase coverage of the policy-util module. Patch 1: Moved Parent and Child class to within ReflectionUtilTest class. Issue-ID: POLICY-214 Change-Id: Ic5882c02a65ba1c924ec1381901a2a971fe72911 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-09-12missing check for noop sinksJorge Hernandez2-776/+796
Change-Id: If7167415c361fad2478809ac6c41981beaadacd6 Issue-ID: POLICY-119 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-08Cleanup project's name in SonarJessica Wagantall1-1/+1
The name parameter in the root pom.xml should match the project name in gerrit to reflect consistency in Sonar. Change-Id: Ic266276a2cc9537897dba90b4887b38cd0efed4d Issue-id: CIMAN-65 Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
2017-09-07Small change to please sonarMagnusen, Drew (dm741q)1-2/+3
Added a 'Thread.currentThread().interrupt()' in a catch of the run method of TTControllerTask at the direction of sonar. Added dump of exception to logger. Issue-ID: POLICY-213 Change-Id: I2bdd74eacedb6d1950c5c730430d7f723ce494bc Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-09-07Support environment configurationsJorge Hernandez12-4488/+4532
This enables PDP-D to have knowledge of any installation property or else configured via OS environment variable or as an environment file. This allows the user to query or set via REST API of programmatically through PolicyEngine any environment variable. It also provides a means to make data globally available to all drools applications. For example: http://localhost:9696/policy/pdp/engine/environment> get HTTP/1.1 200 OK Content-Length: 749 Content-Type: application/json Date: Wed, 06 Sep 2017 23:53:57 GMT Server: Jetty(9.3.14.v20161028) { "DCAE_SERVERS": "", "DCAE_TOPIC": "", "DMAAP_SERVERS": "", "ENGINE_MANAGEMENT_HOST": "0.0.0.0", "ENGINE_MANAGEMENT_PASSWORD": "", "ENGINE_MANAGEMENT_PORT": "9696", "ENGINE_MANAGEMENT_USER": "", "HEALTHCHECK_PASSWORD": "", "HEALTHCHECK_USER": "", "JAVA_HOME": "/usr/lib/jvm/java-8-oracle", "M2_HOME": "/usr/share/maven", "PAP_HOST": "", "PAP_PASSWORD": "", "PAP_USERNAME": "", "PDPD_CONFIGURATION_API_KEY": "", "PDPD_CONFIGURATION_API_SECRET": "", "PDPD_CONFIGURATION_CONSUMER_GROUP": "", "PDPD_CONFIGURATION_CONSUMER_INSTANCE": "", "PDPD_CONFIGURATION_PARTITION_KEY": "", "PDPD_CONFIGURATION_SERVERS": "", "PDPD_CONFIGURATION_TOPIC": "PDPD-CONFIGURATION", "PDP_HOST": "", "PDP_PASSWORD": "", "PDP_USERNAME": "", "POLICY_HOME": "/home/policy/snapshot", "SQL_HOST": "", "SQL_PASSWORD": "", "SQL_USER": "" } policy@newton:~/snapshot/config$ echo -n "http://one.com/aai" | http --verbose PUT :9696/policy/pdp/engine/environment/AAI_URL Content-Type:text/plain Accept:text/plain PUT /policy/pdp/engine/environment/AAI_URL HTTP/1.1 Accept: text/plain Accept-Encoding: gzip, deflate Connection: keep-alive Content-Length: 18 Content-Type: text/plain Host: localhost:9696 User-Agent: HTTPie/0.9.2 http://one.com/aai HTTP/1.1 200 OK Content-Length: 0 Content-Type: text/plain Date: Thu, 07 Sep 2017 00:05:05 GMT Server: Jetty(9.3.14.v20161028) policy@newton:~/snapshot/config$ echo -n "http://one.com/aai2" | http --verbose PUT :9696/policy/pdp/engine/environment/AAI_URL Content-Type:text/plain Accept:text/plain PUT /policy/pdp/engine/environment/AAI_URL HTTP/1.1 Accept: text/plain Accept-Encoding: gzip, deflate Connection: keep-alive Content-Length: 19 Content-Type: text/plain Host: localhost:9696 User-Agent: HTTPie/0.9.2 http://one.com/aai2 HTTP/1.1 200 OK Content-Length: 18 Content-Type: text/plain Date: Thu, 07 Sep 2017 00:05:45 GMT Server: Jetty(9.3.14.v20161028) http://one.com/aai policy@newton:~/snapshot/config$ http :9696/policy/pdp/engine/environment/AAI_URL HTTP/1.1 200 OK Content-Length: 19 Content-Type: application/json Date: Thu, 07 Sep 2017 05:14:57 GMT Server: Jetty(9.3.14.v20161028) http://one.com/aai2 Change-Id: I1fcd610938af751977bb2db925b57b4e5b3f7ba4 Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-06Added junit for test-transaction featureMagnusen, Drew (dm741q)3-40/+191
Single junit was added for test-transaction feature. Junit does not test full functionality of the feature, but does test some of the peripheral methods. Also fixed small indentation error in assemble_zip.xml. Issue-ID: POLICY-198 Change-Id: Iad7a98be45eb8ef6701bf8381aa764d2dd1ca9c7 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-08-31Support Utils Libraries for CL Lab IntegrationJorge Hernandez6-16/+64
There is a companion review in the drools-applications repo. This also includes workarounds to the recent oparent dependency introduction that breaks runtime (with the version-check-maven-plugin). It manifested by loading control loops and failing to load some classes due to different versions (in a lab environment). The issue was that underlying drools libraries use 3.2.5 and oparent has included a had dependency with transitive dependencies for some maven libraries in 3.2.3 and lower version xml parsers. Bottomoline, the classpath at runtime was formed by the union of both, with some libraries being resolved to the oparent one, and others to the drools one. These errors are very obscured to debug. Additional clean up of dependencies versions and order of build was introduced to avoid issues loading dependencies at runtime in a lab environment (non-junit).. Change-Id: If4f4201e08f7e6e1f3619f557434c1b2e23e47a5 Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-30Added new test transaction featureMagnusen, Drew (dm741q)7-0/+534
Added test transaction feature which is used to test the health of policy controllers. Issue-ID: POLICY-177 Change-Id: I9a966be73f040c01e208bffd1dd67e8d858c1d37 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-08-28junits in policy-managementJorge Hernandez9-163/+354
- add additional junits for policy-management module - allow for no configuration pdp-d start up. - minor changes junits for policy-endpoints to avoid race conditions in jenkins environment, starting up, and shutting down servers. Issue-ID: POLICY-109 Change-Id: Ibccefeb5d7cf762da27fe3282887df18d79db5df Signed-off-by: Jorge Hernandez <jh1730@att.com>