summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-08-24rename scripts and clean up eclipse warningsJorge Hernandez5-5/+1
rename scripts to follow convention that executable scripts should not have file extensions. clean up some warnings in eclipse Issue-ID: POLICY-162 Change-Id: I82be87925c3a8264381795535d33cee04924ae92 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-23Add access.log to jetty serverjrh34-3/+58
Added a single line to the code that creates the jetty server so that it will log messages in access.log format. Also added lines to various logback.xml files to actually write the output from the jetty server to the access.log. Made some revisions per comments: - removed spaces around parameters - added "Out" suffix - changed suffix of archived files - changed size to 1MB Modified logback*.xml files to include jetty "access log" content in the already-existing network.log. Issue-Id: POLICY-161 Change-Id: I3e3769c06a22aaffea0e09abbec3387cc62f246f Signed-off-by: jrh3 <jrh3@att.com>
2017-08-22Add feature-session-persistenceKevin McKiou30-5/+4077
This commit adds the feature-session-persistence module which will persist drools session data to allow stateful transactions which can persist across node restarts and failovers. It also picks up recent changes to the master branch to avoid merge conflicts. Issue-ID: POLICY-133 Change-Id: Ifdcd8280ea6df07db79562f1b01fa90296a8b878 Signed-off-by: Kevin McKiou <km097d@att.com>
2017-08-22Adding changes to resolve pom.xmlViswanath Kumar Skand Priya1-37/+0
Issue-ID: POLICY-175 Change-Id: I3be1db6fdc1e070aff98c99fa9089a946ef7d6a3 Signed-off-by: Viswanath KSP <viswanath.kumarskandpriya@verizon.com>
2017-08-20sonar criticals and some majorsJorge Hernandez21-700/+450
Issue-ID: POLICY-114 Change-Id: I5fe12b6538379a4d018bb76173247fe53fba21d7 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-18Expand acces dependencies to ONAP repos.Jorge Hernandez2-82/+211
Make public ONAP drools-applications repos at runtime or during development testing to ensure that no dependencies are missed, nor all of them need to be published in the private nexus repository. This will be benefitial at runtime and also during control loop development as control loops archetypes could be used from anywhere. Change-Id: I787b5afaf5c525f83326e924d6b9bcf85f9a7662 Issue-ID: POLICY-159 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-17Remove MojoHaus Maven plug-in from pom fileTemoc Rodriguez1-55/+6
Remove MojoHaus License Maven plug-in from main pom.xml file. Issue-ID: POLICY-116 Change-Id: I3acfba5a998733006e04c8109ba9821c0c0c9573 Signed-off-by: Temoc Rodriguez <cr056n@att.com>
2017-08-16Merge "Fix "critical" Sonar issue"Jorge Hernandez1-1/+1
2017-08-16add hibernate JPA libraries in baseJorge Hernandez2-1/+23
To make feature development easier for DB-enabled features Change-Id: I7f69ecfbbfb9eaac92f698bdb787ce881eec39f0 Issue-ID: POLICY-96 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 Hernandez8-23/+42
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-08-15Merge "Support of DB-enabled features"Jorge Hernandez3-179/+959
2017-08-14Support of DB-enabled featuresJorge Hernandez3-179/+959
Isolation and data migration support overall and on a per feature basis. policy@drools:/opt/app/policy$ policy.sh status [drools-pdp-controllers] L []: Policy Management (no pidfile) is NOT running 1 cron jobs installed. [features] name version status ---- ------- ------ eelf 1.1.0 disabled healthcheck 1.1.0 disabled session-persistence 1.1.0 enabled [migration] session-persistence: upgrade out-of-sync: 0 -> 201702 policy@drools:/opt/app/policy$ features enable session-persistence session-persistence: upgrade out-of-sync: 0 -> 201702 name version status ---- ------- ------ eelf 1.1.0 disabled healthcheck 1.1.0 disabled session-persistence 1.1.0 enabled policy@drools:/opt/app/policy$ db-migrator -s session-persistence -o upgrade upgrade: 0 -> 201702 > upgrade 201701-blah.upgrade.sql -------------- create table blah (a varchar(15), b varchar(20)) -------------- > upgrade 201702-blah2.upgrade.sql -------------- create table blah2 (a varchar(15), b varchar(20)) -------------- session-persistence: OK: upgrade (201702) policy@drools:/opt/app/policy$ db-migrator -s ALL -o report +---------------------+---------+ | name | version | +---------------------+---------+ | session-persistence | 201702 | +---------------------+---------+ +--------------------------+-----------+---------+---------------------+ | script | operation | success | atTime | +--------------------------+-----------+---------+---------------------+ | 201701-blah.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 | | 201702-blah2.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 | +--------------------------+-----------+---------+---------------------+ policy@drools:/opt/app/policy$ features disable session-persistence name version status ---- ------- ------ eelf 1.1.0 disabled healthcheck 1.1.0 disabled session-persistence 1.1.0 disabled policy@drools:/opt/app/policy$ db-migrator -s ALL -o downgrade downgrade: 201702 -> 0 > downgrade 201702-blah2.downgrade.sql -------------- drop table if exists blah2 -------------- > downgrade 201701-blah.downgrade.sql -------------- drop table if exists blah -------------- session-persistence: OK: downgrade (0) policy@drools:/opt/app/policy$ db-migrator -s ALL -o report +---------------------+---------+ | name | version | +---------------------+---------+ | session-persistence | 0 | +---------------------+---------+ +----------------------------+-----------+---------+---------------------+ | script | operation | success | atTime | +----------------------------+-----------+---------+---------------------+ | 201701-blah.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 | | 201702-blah2.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 | | 201701-blah.downgrade.sql | downgrade | 1 | 2017-08-14 16:13:49 | | 201702-blah2.downgrade.sql | downgrade | 1 | 2017-08-14 16:13:49 | +----------------------------+-----------+---------+---------------------+ session-persistence: OK @ 0 Change-Id: Ie185f5d7a8463cb349ac452d8c2b4b05928b3e56 Issue-ID: POLICY-96 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-14Remove eclipse checkstyle warningsPamela Dragosh1-0/+24
Add this should remove Eclipse warnings: Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (execution: check-style, phase: process-sources) Issue-Id: POLICY-166 Change-Id: I609ebced831458e1fa56c57a30bceb3512c0dc7f Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-08-10Add 'install' and 'uninstall' to 'features' scriptRalph Straubs1-10/+177
Note that the 'install' option looks for a 'base.conf' script in the current directory, as well as the '${POLICY_HOME}/config' directory. The assumption is 'base.conf' is saved here when the initial DroolsPDP install is complete. Issue-ID: POLICY-163 Change-Id: I995c685ca8ff896f3d8a027324e30673075e0c1f Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-08-08Merge "placement of sql files during feature operations"Jorge Hernandez1-17/+228
2017-08-08placement of sql files during feature operationsJorge Hernandez1-17/+228
This commit only takes care of enabling disabling global visibility of sql files on a per database basis, when a feature is enabled/disabled. Performing the actual databases upgrade operations will be provided in a subsequent commit. Issue-ID: POLICY-66 Change-Id: Ia82e5ccb3a9f02e9d937ce4791fdca4204b8f9e8 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-07Merge "[POLICY-151] drools-pdp integration with oparent"Jorge Hernandez2-24/+12
2017-08-03[POLICY-151] drools-pdp integration with oparentGuo Ruijing2-24/+12
Change-Id: Id419034816ea047276484e20c5e211a3fba5ec7a Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
2017-08-02[POLICY-114] fix some sonar criticalsJorge Hernandez11-33/+67
Change-Id: Ic79b3d81ac814948ce3a956fe4c32b8a9b5c0009 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-02Merge "[POLICY-66] healtcheck feature config and db prep"Pamela Dragosh4-14/+40
2017-08-02[POLICY-66] healtcheck feature config and db prepJorge Hernandez4-14/+40
initial commit pre-intro of db support on per feature basis Change-Id: Ie790764bc58f773da381ae88b6f7476fbd2af2e5 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-01[POLICY-145] fix typo in features filesJorge Hernandez2-0/+0
Change-Id: Idb9d40e5818dbd2b3f4633888df413ffc077c89d Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-31[POLICY-72] forgot one onap-stagingPamela Dragosh1-1/+1
Change-Id: Ib5c7ce30b31b03f3dfc2f914946e934a6b201cc2 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-07-31[POLICY-72] missed onap repo idsJorge Hernandez1-3/+3
Change-Id: Id71d2d0f551fa5404920a0ab5347db077eb53767 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-31[POLICY-72] put back ecomp server ids.Jorge Hernandez1-3/+3
Change-Id: I41df0afcf9c721c6a614027eb92e84d3c2c3aab5 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-28[POLICY-72] replace openecomp for drools-pdpGuo Ruijing107-349/+349
Change-Id: I8aa8e32d3ba10f7c655b50e97aaf6865514d4777 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
2017-07-27[POLICY-52] pdp-d: PolicyEngine junitsJorge Hernandez4-2/+119
Change-Id: I8c85d75d7eddd7c959ed4cfb7167b58d9c7c9854 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-27Merge "[POLICY-119] noop endpoint and refactoring"Pamela Dragosh21-293/+818
2017-07-26[POLICY-119] noop endpoint and refactoringJorge Hernandez21-293/+818
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-26[POLICY-109] set up parent pom for sonarJorge Hernandez1-3/+21
Change-Id: I89ba6326d5f1bedcd072772945f547cb339456e9 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-25[POLICY-66] policy.sh policy-management-controllerJorge Hernandez1-9/+8
Explicit invokation of policy-management-controller in policy.sh since it loops through scripts picks up others it shouldn't when an operation is selected. Benign but not stetic. Change-Id: I140ca6b0501b3368e9eac0b3ddf947b59c74e426 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-24[POLICY-66] consolidate script naming + locationJorge Hernandez8-0/+0
consolidate scripting convention by all adopting not .sh for bash scripts. Location is under policy-management/src/main/server-gen/bin/ so they are inherited by lab installations that don't use the packages directory. Change-Id: Ibcbd4bffad38e87cb3b644deb768120b1a6b2cbb Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-21[POLICY-8] clean pdp-d from sonar blockersJorge Hernandez4-7/+10
Change-Id: I25427a0505e2fdd2b0b939f652452cb4f9f07f02 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-20[POLICY-52] enabled properties http junit testJorge Hernandez3-57/+44
will also take care of some race conditions seen in gerrit triggered jenkin jobs as it brings up / tears down http servers per junit test method. Change-Id: I0b18073ebfaab3a6f0d08efee1edacd8d5d9e3ca Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-20[POLICY-88] validation of query pre-executionJorge Hernandez3-6/+33
Change-Id: Ie02de9aca434c3d80b9e34126990e3b9995747bb Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-18[POLICY-9] Mac .DS_Store is annoyingPamela Dragosh1-0/+1
Change-Id: Id1acdd31cfabbaa24677c26fb65c79228a0a8093 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-07-18[POLICY-66] self-contained features supportJorge Hernandez13-290/+791
installation/enable/disable of self contained package features: Feature 3rd party dependencies, configuration files, and custom installation scripts do not need to be packaged within the policy core base to be used. Change-Id: I35a472e63bd0f9f7aa6cd0c112d41d2b4604a892 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-07-17[POLICY-78] Upgrade Drools and Guava VersionsRalph Straubs2-5/+5
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-30[POLICY-66] rename of policy-healthcheckJorge Hernandez10-11/+11
using "feature-" naming convention. Change-Id: I13d6b75750d369ed9e61f3c9c9408b31eac6bb2d Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-26[POLICY-30] optional loadable eelf featureJorge Hernandez18-96/+740
for backwards compatibility purposes or if desired to use EELF and common-framework (from policy-common) for logging purposes in miscellaneous environments. It supports EELF/Common Framework style logging at the same time than traditional logging. This functionality is an optional loadable module. policy-docker changes need to be made to optionally unpack to make it active (in a different submission). started marking feature projects with feature prefix in project name to give a clear picture to the community which modules are features vs. code base. Change-Id: I5076c462409f03415ce54f0c9b5f50b78abb18f9 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-23[POLICY-30] telemetry scriptJorge Hernandez1-0/+44
Change-Id: Iad43bf9c30de174527fb6a29c216dae6e3ea1a17 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-22[POLICY-30] remove problematic layersJorge Hernandez56-1455/+1079
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 Hernandez75-9213/+58
Change-Id: Ifebf67db574e1c4eadf9d50ca0f178ab7ddba033 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-02Change 'policy-core' to support app persistenceRalph Straubs4-32/+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-06-01[POLICY-9,POLICY-18] warnings + Controller hooksJorge Hernandez7-247/+364
1. clean up policy-utils warnings. drools-pdp project has no warnings now. 2. add new Policy Controller hooks for feature programmability. Change-Id: Ie991320e23e73118b235018d15ea66340a841a89 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-05-31[POLICY-6] add missing license informationJorge Hernandez22-4/+404
Change-Id: I984ec36d3022cb498f99aa3b1a23e8729b0624d8 Signed-off-by: Jorge Hernandez <jh1730@att.com>