summaryrefslogtreecommitdiffstats
path: root/policy-core
AgeCommit message (Collapse)AuthorFilesLines
2017-08-31Support Utils Libraries for CL Lab IntegrationJorge Hernandez1-2/+0
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-16Fix "critical" Sonar issueRalph Straubs1-1/+1
Change-Id: I46e59d9a017722370cff4112250bcdfa0f0d0b23 Issue-ID: POLICY-160 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-08-15add persistence libraries in the installation baseJorge Hernandez1-1/+0
to make db-enabled features to not worry about their packaging in the copy-dependencies plugin in the pom.xml Change-Id: Ie20a61978f75d4dbe82ac7aba5f6d259fb412f22 Issue-ID: POLICY-96 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-28[POLICY-72] replace openecomp for drools-pdpGuo Ruijing10-16/+16
Change-Id: I8aa8e32d3ba10f7c655b50e97aaf6865514d4777 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
2017-07-26[POLICY-119] noop endpoint and refactoringJorge Hernandez1-0/+2
noop endpoint was added to support communication between drools-applications and policy-framework using the common "PolicyEngine.deliver(topic, message)" mechanins. The endpoint type will be noop. This can be used for testing sanity of any given drools-application from the framework. An intial refactoring of the endpoints hierarchy was added too. Change-Id: I62dbe75f511dd6215406fbd7cf0dd5a88bc1efc3 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-21[POLICY-8] clean pdp-d from sonar blockersJorge Hernandez2-1/+7
Change-Id: I25427a0505e2fdd2b0b939f652452cb4f9f07f02 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-17[POLICY-78] Upgrade Drools and Guava VersionsRalph Straubs1-4/+4
Change-Id: Iaa17e84c6d9ba45ec3703a70d932da873d0b45a9 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-07-17[POLICY-75] Problems with KieScannerRalph Straubs2-3/+7
1) Change the 'PolicySession.DefaultThreadModel' thread so it continually calls 'fireUntilHalt' until it is explicitly stopped by the 'stop()' method. This allows it to restart after 'KieScanner' triggers an update. 2) Remove call to 'startScanner' in 'PolicyContainer' constructor -- we saw at least one case where 'KieScanner' would repeatedly update the Drools container every 60 seconds. Change-Id: I0d0e6c5650cef12ca00cf88f9b8cc52323bb6317 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-06-22[POLICY-30] remove problematic layersJorge Hernandez4-78/+22
add configurability through telemetry API Change-Id: I77ebde12a417d421b98646c32dc74824f4494c2e Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-14[POLICY-21] PDP-D gets stuck during shutdownRalph Straubs3-78/+217
The fix for this problem is included in the following enhancements: 1) Define a new nested interface 'PolicySession.ThreadModel', which makes it possible for features to control the thread or threads processing a 'KieSession'. The nested class 'PolicySession.DefaultThreadModel' implements the default version, which uses 'KieSession.fireUntilHalt()' instead of polling 'KieSession.fireAllRules()'. A new method 'selectThreadModel(PolicySession session)' has been added to 'PolicySessionFeatureAPI' to enable this selection. 2) Update thread names when 'KieContainer.updateToVersion(...)' is called Change-Id: Ic48089fe5660501e2e3d42b87501697211a9d0fe Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-06-05[POLICY-8] cleaned up unused codeJorge Hernandez4-248/+0
Change-Id: Ifebf67db574e1c4eadf9d50ca0f178ab7ddba033 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-02Change 'policy-core' to support app persistenceRalph Straubs3-23/+133
This includes the following: 1) A new hook method 'newPolicySession(PolicySession)' that is called after the session has been created and initialized 2) Support for "adjunct" objects in 'PolicySession' 3) Added 'try/catch' blocks around feature method invocations 4) Added 'default' methods to interface 'PolicySessionFeatureAPI' 5) Removed 'PolicySessionFeatureAPI.isPersistenceEnabled()' Conflicts: policy-core/src/main/java/org/openecomp/policy/drools/core/PolicySessionFeatureAPI.java Change-Id: Ibc6d9eeacb6118d617e6c5ac53f6cef4c6ee1417 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-05-25[POLICY-16] generic introduction of swaggerJorge Hernandez1-0/+1
On a per-server basis append /swagger.json or /swagger.yaml ie: HTTP GET :6969/swagger.json HTTP GET :9696/swagger.json Resulting specification can be used by swagger clients. Change-Id: I4b1a8b53d50b1528664150934b04e92447e4d4d7 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-05-09Batch submitRalph Straubs1-0/+14
[US866186 1710] Add the state_audit_interval_ms to the IntegrityMonitor.properties [US866186 1710] Added comments to the state audit property (state_audit_interval_ms) which clarify how to turn it off. [ECOMPD2TD-000] Update version.properties and pom.xml for iter 41 [ECOMPD2TD-000] Update version.properties and pom.xml for iter 41 Revert "[ECOMPD2TD-000] Update version.properties and pom.xml for iter 41" This reverts commit 61367d4c87fa6b153f707361537d9f802fb95a6e. [US250837 1710] Completed first cut of logic changes to PMStandbyStateChangeNotifier so that each segment of logic is only executed if a state change actually occurred. [US250837 1710] First cut on the JUnit for PMStandbyStateChangeNotifier. At this point I am simply checking the operation by inspecting the logs. [US250837 1710] Fixed the JUnit so it is not failing and added a note on how to run the JUnit. [US250837 1710] Added a method to get previousStandbyStatus from PMStandbyStateChangeHandler and began using it in JUnit tests. [US250837 1710] Finished the StandbyStateManagementTest. This uses the previousStandbyStatus value to test the function. [US250837 1710] Clean up of PMStandbyStateChangeNotifier and JUnit test to make static string values that are used throughout. [US250837 1710] Found a couple strings that I missed when converting to static variables. [US250837 1710] Updated PMStandbyStateChangeNotifier and StandbyStateManagementTest [US250837 1710] Added a dedicated db audit persistence unit auditDroolsPU to taylor the classes which will be audited. [ECOMPD2TD-1309] Clean up old persistence data This is an addition to 'policy-persistence' that cleans up 'sessioninfo' records with a 'lastmodificationdate' that is older than a specified time (default = 900 seconds = 15 minutes). [ECOMPD2TD-000] Correction to pom.xml versions Conflicts: version.properties Change-Id: I810d358c07e05fd36fa435a6fbb9e538e78b5011 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-04-21Batch submit -- force rebuildRalph Straubs5-221/+131
[ECOMPD2TD-1126 1707] Delay the start of the election handler by one more update interval to allow updatedDate to be set and recoginized by other nodes. [ECOMPD2TD-1073 1707] Remove pessimistic locks from DB access to prevent DB deadlock [US867397-policy-management-feature-api] Split original FeatureAPI into three service interfaces. These are: - the original FeatureAPI for core - PolicyControllerFeatureAPI (additional interface methods yet to come ..) - PolicyEngineFeatureAPI (additional interface methods yet to come ..) Additional extensions will be done in the future. This is to have equivalent functionality with what it is already there. [US867397-policy-management-feature-api] Split original FeatureAPI into three service interfaces. These are: - the original FeatureAPI for core - PolicyControllerFeatureAPI (additional interface methods yet to come ..) - PolicyEngineFeatureAPI (additional interface methods yet to come ..) Additional extensions will be done in the future. This is to have equivalent functionality with what it is already there. [ECOMPD2TD-1167] Avoid redundant dependencies and remove obsolete sql scripts [ECOMPD2TD-848] Fix copied from ATT droolspdp repo -- add timestamp to metric and audit logs [ECOMPD2TD-1167] update jetty version to 9.3.14 [ECOMPD2TD-1167] pull in policy-core jar as a dependency of policy-management, instead of zip file [ECOMPD2TD-1159] Add property to ignore repository audit errors The property is called 'repository.audit.ignore.errors' -- it resides in 'IntegrityMonitor.properties', and it defaults to 'true'. When true, any errors that occur in the repository audit are logged, but not reported to integrity monitor. [US867397] additional hooks for policy engine, and support operation take over by feature bypassing further feature processing [US867397] additional hooks for policy engine, and support operation take over by feature bypassing further feature processing [US867397] fix reverse return javadoc comment [ECOMPD2TD-1192] Select correct persistent session information This is a modification to 'DroolsPdpsElectionHandler.DesignatedWaiter'. When going active, the list of persistent sessions needs to come from the most recent active DroolsPDP. The most recent active DroolsPDP is tracked in a local variable 'mostRecentPrimary', and the associated list of sessions needs to be extracted just prior to going active. The problem was that the list of sessions was extracted after the current DroolsPDP was set to 'mostRecentPrimary'. [ECOMPD2TD-1073 1707] Remove pessimistic locks from DB access to prevent DB deadlock [US860546] Add workaround for missing logger in message router [US860546] add DME2 properties to PolicyProperties [US860546] add DME2 support, pending unit testing [US860546] updated unit tests for dmaap/DME2 [US860546] removed System.out.println lines from BusConsumer and BusPublisher [US860546] modifications and additions to TopicEndpoint tests [US860546] remove block to append /events to serviceName in BusConsumer, BusPublisher [US860546] removing dmaap unit tests with ATT references [ECOMPD2TD-1167] Audit release repository by default [ECOMPD2TD-000] Cherry-pick versioning fixes from 1707.39.1 release branch [ECOMPD2TD-000] Fix policy-endpoints cambriaClient version [US865296] ECOMP Policy Logging Compliance, remove redundant timestamp from metric and audit log for logging compliance [US865296] ECOMP Policy Logging Compliance, remove TargetVirtualEntity from audit log, provide name to un-used column [US865296] ECOMP Policy Logging Compliance, remove Unused from AuditLogPattern, leave the column blank means un-used. [US000000] Cleanup and performance improvements 1) Changed 'OrderedServiceImpl' to ensure that the same service instance is used in every queue. This gets around the 'ServiceLoader' behavior that generates a new instance for each interface the service implements. 2) In 'PolicySession': add adaptive poll times within Drools sessions. Instead of always polling every 5 seconds, poll frequency increases when rules fire, and decreases when they don't. At present, the poll delay ranges from 100 milliseconds to 5 seconds, but at some point, it would be nice to make this configurable. 3) In 'PolicySession': add tests for 'logger.isDebugEnabled()' in session listener methods -- this results in a significant amount of real-time savings under load. [ECOMPD2TD-1126 1707] Changes to the election handler to deal with situations (race conditions) which can affect the site choice [ECOMPD2TD-1126 1707] Clean up of site afinity logic. Minor changes and a fix of the case where all pdpd are designated or all are hot standby. [ECOMPD2TD-1126 1707] Fixed issue with election handler and got all StandbyStateManagmentTest JUnits working. [ECOMPD2TD-1126 1707] Hopefully final changes to DroolsPdpsElectionHandler and StateManagementTest. Also removed the ResiliencyTestCases since they were redundant. [ECOMPD2TD-1126 1707] Found a minor bug in the computeMostRecentPrimary algorithm which I corrected and added a JUnit to confirm. [ECOMPD2TD-1126 1707] Removed code that was commented out of election handler to improve reability. Added an explanatory note to StandbyStateManagementTest. [US869183] Convert integrity monitor test endpoint to use HttpServletServer [US869183] add swagger-maven-plugin, update swagger annotation for IM test interface [US860371] Modified existing Dmaap and Ueb code to allow for https connectivity. HTTP/HTTPS is configurable via controller.properties file [US860520] Removed extra useHttps() method call from BusConsumer class where the consumer should be using http. Also, restored pom.xml to version at time feature branch was created. [US860520] Removed TopicEndpointTest.java. Added the ability to configure use of self-signed certificates for consumer topics. Functionality cannot be added for publisher at this time. Removed useHttps parameter field from multiple .builder methods to allow for greater ability to build source/sink objects without specifying http vs https connectivity. Other code cleanup and comments [US860520] -Deleted sys.out statements used in testing from BusConsumer/BusPublisher -Moved setProps method outside of if/else stub in BusConsumer -Could not add useHttps or selfSignedCerts to toString methods in BusConsumer -Move setProperty(contenttype, app/json) call outside of if/else branch in BusPublisher -Renamed doesAllowSelfSignedCerts method to is isAllowSelfSignedCerts and moved to BusTopicBase -Moved allowSelfSignedCerts member variable to BusTopicBase class. BusTopicBase is ancestor of SingleThreadedDmapp*/SingleThreadedUeb*/SingleThreadedBus* classes therefore, it will be inherited. -This changed resulted in cascading changes to the subclasses of BusTopicbase -Default is now set to disallow self-signed certs -Added several javadoc param annotations [US869183 1707] Changes to satisfy dependencies and correct pom syntax [ECOMPD2TD-1280] move DroolsPDPIntegrityMonitor.RestManager to its own class [ECOMPD2TD-1278] Resolve duplicate dependency issues (cherry-pick from 1707.40.1) [ECOMPD2TD-1278] revert cambriaClient back to 0.0.1 [ECOMPD2TD-1278] put dmaap version back to 0.2.12 [ECOMPD2TD-1280 1707] Fix Commons-lang3 version and common-modules version Conflicts: policy-endpoints/pom.xml policy-healthcheck/pom.xml policy-persistence/pom.xml pom.xml Change-Id: I803554bc64c55d2e82a3d6ad9120757f287144fb Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-03-101.1.0-SNAPSHOTPamela Dragosh1-2/+2
Change-Id: I2289242f6542657c7d69cfe57b20f2e10178caf6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-03-10upgrade to release-1.0.0Pamela Dragosh1-2/+2
Change-Id: I3fda7cab8bf56d5359dab353e0834874cfed4c94 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-02-23fix pom remove duplicate groupIdPamela Dragosh1-1/+0
Change-Id: I4dc9cda11650f62e3cbd3017205d8d09f5523b7a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-02-14Initial OpenECOMP policy/drools-pdp commitPamela Dragosh13-0/+2085
Change-Id: I0072ccab6f40ed32da39667f9f8523b6d6dad2e2 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>