summaryrefslogtreecommitdiffstats
path: root/controlloop/common
AgeCommit message (Collapse)AuthorFilesLines
2018-05-24Don't build credentials if user name is emptyv1.2.32.0.0-ONAPbeijing2.0.0-ONAPJim Hahn3-1/+18
Modified code to skip building credentials if user name is empty, in addition to case where user name is null. Change-Id: I5b53d4f97263df98cfe082f44a4e6af64b1e488b Issue-ID: POLICY-868 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-05-22Merge "Update Drools Applcations to 1.2.3-SNAPSHOT"Jorge Hernandez28-28/+28
2018-05-22reduce transaction cache sizeJorge Hernandez2-3/+4
- reduce memory footprint - avoid verbose logging from cache when the object is not in the cache to invalidate it. Change-Id: I819cfbcfe32f5afdd238397c79ccd5cebd4534b8 Issue-ID: POLICY-852 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-05-21Update Drools Applcations to 1.2.3-SNAPSHOTliamfallon28-28/+28
These reviews must be merged in order because of layering. This review should be merged THIRD. Issue-ID: POLICY-844 Change-Id: I61d128f3244cd420abab15ab70c5c0e9d9afa625 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-16Fix authentication info in request to SOJim Hahn1-20/+2
The code was passing two different sets of credentials to the REST manager, and the wrong one was taking precedence. Modified the code to only pass the correct set of credentials. Updated license date. Change-Id: I13e2db93a8eebbb0cd77fdfaca80125cd28a2553 Issue-ID: POLICY-800 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-05-16Upgrade SNAPSHOT to 1.2.2liamfallon28-28/+28
These reviews must be merged in order because of layering. This review should be merged FOURTH PLD added version.properties Change-Id: If7af7b3ae37166e88af92c0d1f1c558e5b60ab8e Issue-ID: POLICY-798 Signed-off-by: liamfallon <liam.fallon@ericsson.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-05-11Remove requestId and instance appendPamela Dragosh2-22/+8
The requestId keeps creeping into this code. For the instance Id appending, we need a better strategy that conforms with robot test scripts in order to do multiple scale ups. Issue-ID: POLICY-793 Change-Id: Iab5d7608d5ee049cb6dd0508108bf77c2982db47 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-05-11Add missing service modelVersionIdPamela Dragosh1-0/+3
It seems this field is missing possibly from refactoring code. Issue-ID: POLICY-792 Change-Id: I6d13feb12a383d32dce3bbba431e32ad0b9d1e19 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-05-08allow dcae consumer group configurationv1.2.1Jorge Hernandez2-0/+2
this allows to change the dcase onset processing group behavior across pdp-ds. if installation sets DCAE_CONSUMER_GROUP, all PDP-Ds will share the same consumer group, therefore will have exclussive processing of onsets. Otherwise if installation unsets it (blank), all pdp-d's will process all onsets being placed in dcae topic on dmaap bus Change-Id: I4cc63005402ce66c09617b52dfad9a6094cbcb46 Issue-ID: POLICY-766 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-30AAI simulator fixeseikrwaq2-27/+44
AAI simulator fixes for multi onset messages in parallel Change-Id: Ia32dacf6caaded7fc45232ba4be8f49f3ccfd614 Issue-ID: POLICY-525 Signed-off-by: eikrwaq <waqas.ikram@ericsson.com>
2018-04-30Merge "Modify PolicyGuard to use new locking API"Jorge Hernandez3-84/+257
2018-04-27Modify PolicyGuard to use new locking APIJim Hahn3-84/+257
Modified PolicyGuard to use the locking API from policy-core instead of its own internal map. Initialized PolicyGuard.factory. Fixed bug in eventmanager junit test uncovered due to changes to PolicyGuard. Change-Id: I853ee5f146f3bde16b3f6e65bc188ca7c0cc4f73 Issue-ID: POLICY-577 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-27Fix failure in PIPEngineGetHistoryTestJim Hahn2-28/+43
Turns out that the getAttributesTest() method depends on testGetCountFromDb() being executed first, but junit does not guarantee this. Modified the code so that it is independent of the order in which the tests are executed. Change-Id: Ie081061e4e83895f4ac89242cf00d843b6e069d4 Issue-ID: POLICY-765 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-25Prevent AAI re-queryJim Hahn2-51/+61
Modified event manager code to not query AAI if there's already a response from a previous query. Modified code to store AAI properties in local variables instead of static to prevent any chance of a race condition in a multi-threaded situation. Updated junit tests to use a new manager for each subsequent query. Update license. Change variable name, in junit test, from onsetEvent to event, because it can be any type of event. Included fix to prevent initial AAI query if AAI data was already available in the initial onset event. Change-Id: Idf3e15ea8c5e297f22f23570c22fd837b72ba200 Issue-ID: POLICY-754 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-23Send credentials to AAIJim Hahn3-24/+37
Per this link: http://www.baeldung.com/httpclient-4-basic-authentication apache HttpClient does not send the credentials by default, but instead waits for the server to issue a challenge before sending them. Modified RESTManager to construct and send the Authorization header always instead of waiting for the challenge. Remove unused imports. Also add Authorization header for POST request. Change error message to match original error message when username is null. Preempt sonar issue. Allow null user name, which indicates that the Authorization header should not be sent. Note: this only impacts the RESTManager class; invoking classes (e.g., AaiManager) still enforce that the user name exists in the properties. Fix license dates in modified test code. Change-Id: I3cb26e76562db746939631437775727809553390 Issue-ID: POLICY-754 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-16Add missing license headersPamela Dragosh68-10/+940
I removed a couple of empty README and added licenses. Issue-ID: POLICY-741 Change-Id: I10aad3536d02b738a1dc606f7311de6b3a2777cd Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-04-13Exclude commons-collectionsPamela Dragosh1-0/+9
Since we are not using LDAP PIP we can get rid of this jar that has security issues. Issue-ID: POLICY-722 Change-Id: I93feacc8733a834866476db75933d8b2cf08c212 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-04-13Update to SNAPSHOT 1.2.1Pamela Dragosh28-28/+28
Issue-ID: POLICY-736 Change-Id: I2bc455510e925764d18a1d8e96e072bdadb251c6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-04-03Fix Event Syntaxv1.2.0Daniel Cruz3-1/+33
The "requestID" field was changed to "requestId" which brakes the use cases since this does not conform to the events DCAE will be sending. To avoid further issues with changed variable names, all onset fields now have a serialized name that will be used when serializing/deserializing with gson. Issue-ID: POLICY-681 Change-Id: I731b0c83a9b6c9bbaae0312f76382d7f4644db8c Signed-off-by: Daniel Cruz <dc443y@att.com>
2018-04-03Configure correct classnames for LCM classesJorge Hernandez2-6/+6
Change-Id: I5305e71bb0cc844dd37ff6420cd30012f98c88ed Issue-ID: POLICY-720 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-02installation enhancementsJorge Hernandez16-0/+1186
The following changes aim to have a quicker start of the drools container: 1. For both amsterdam (and the experimental beijing) controllers dependencies are pre-installed, so the loading of 3rd party dependencies are faster. 2. Further enhancements in installation. 3. Make sure that the naming of the generated control loop artifacts have a "control loop" label associated with it, so in the future, if other applications are added (non control loop related) do not conflict and is clear. Change-Id: Iecb84d186fcc34069aa5c4a175a8a4521b38499d Issue-ID: POLICY-534 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-03-28Exclude jackson-databindPamela Dragosh1-0/+10
we are not using this code yet, but let's remove jackson-databind. The inclusion of drools-pdp adds in the latest jackson-databind. Issue-ID: POLICY-504 Change-Id: I73a1939eb3827a7ef06c40e11764944b3d80685b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-03-27Removed checkstyle warningsmmis72-3021/+3350
Removed checkstyle warnings from: policy/drools-applications/controlloop/common/model-impl/appc policy/drools-applications/controlloop/common/model-impl/appclcm policy/drools-applications/controlloop/common/model-impl/events including changes to template files due to renamed methods Issue-ID: POLICY-705 Change-Id: Ieb93baf43268aa608f204eef1a610354f2adec32 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-27transaction logging through feature part 2Jorge Hernandez1-16/+115
Change-Id: I3b411ee2855a1ffe94ffc67fccfb1e475335d036 Issue-ID: POLICY-533 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-03-27Merge "Fix path to logging class"Jorge Hernandez6-6/+6
2018-03-26Fix path to logging classliamfallon6-6/+6
The package path of LoggerUtil changed as below: From: import org.onap.policy.drools.utils.LoggerUtil; To: import org.onap.policy.drools.utils.logging.LoggerUtil; Change-Id: I8187d97de5eeab92268baab155fb4de37f4df3ad Issue-ID: POLICY-448 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-27Merge "Add timeout to SO to wait for success"Jorge Hernandez7-453/+1159
2018-03-26Removed checkstyle warningsmmis109-4982/+5053
Removed checkstyle warnings from policy/drools-applications/controlloop/common/model-impl/aai including renaming classes: AAI* -> Aai* PNF* -> Pnf* and renaming some methods in those classes Issue-ID: POLICY-705 Change-Id: I2d59a668728aa58a2c9fbe78c44e924e6cfb4531 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-26Merge "Create archetype for Beijing Release"Jorge Hernandez1-0/+87
2018-03-25Add timeout to SO to wait for successliamfallon7-453/+1159
The timeout implementation assumes that a finished request is a HTTP-200 together with either a request state of COMPLETE or FAILED in the embedded request in the response in the JSON. This is the same as what is done earlier in this class and in, for example, VFC. Unit test for timeout has also been added. Change-Id: I637dbecb8d230b8060f7ced76d92d11ec482503e Issue-ID: POLICY-448 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-23transaction logging through a featureJorge Hernandez10-0/+828
This is the first of 2 code inspections. This review contains though most of the work. It keeps tracks of all in progress transactions by intercepting all notifications. From that appropriate metrics can be obtained and logged. The actual logging of the metrics and enablement of the feature at install time will come in a subsequent review. Change-Id: Ie5c8adfbdeae72758da7da8a1b4133cd4818c6fb Issue-ID: POLICY-533 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-03-23Create archetype for Beijing ReleaseDaniel Cruz1-0/+87
This new archetype is a proof of concept for removing template expansion from the BRMSGW. The idea is to have a ueb or dmaap topic that the BRMSGW uses to send params json and then the pdp-d will deserialize it into a ControlLoopParams object. The rules engine will then insert that fact in to the working memory which will be used for rules matching between onset events and corresponding policies. Issue-ID: POLICY-692 Change-Id: I4237221c2216dab16160e79a8f2fdcab6571e1eb Signed-off-by: Daniel Cruz <dc443y@att.com>
2018-03-22Removed checkstyle warningsmmis44-3467/+3936
Removed checkstyle warnings in: policy/controlloop/common/guard policy/controlloop/common/msb policy/controlloop/simulators including renaming of the following classes: MSBServiceFactory -> MsbServiceFactory MSBServiceManager -> MsbServiceManager MSBServiceException -> MsbServiceException Issue-ID: POLICY-705 Change-Id: I11d62a74fcb77e764121df119cb0bd9b844b485b Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-22Merge "Removed checkstyle warnings"Pamela Dragosh35-4798/+5151
2018-03-22Removed checkstyle warningsmmis35-4798/+5151
Removed checkstyle warnings in: policy/drools-applications/controlloop/common/actors policy/drools-applications/controlloop/common/eventmanager policy/drools-applications/controlloop/common/feature-controlloop-utils Issue-ID: POLICY-705 Change-Id: Iccf99b291bc62bc3ba2082ccdb4c1f9e12107896 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-03-22Merge "Fix Serialized Names for Legacy APPC"Pamela Dragosh7-3/+49
2018-03-21Fix Serialized Names for Legacy APPCCRUZ7-3/+49
The legacy APPC request and response messages must be upper camel case. Issue-ID: POLICY-681 Change-Id: I439fa22b76dd2cb35a054bf93260705b8cf1af51 Signed-off-by: dc443y <dc443y@att.com>
2018-03-20Merge "Fix Serialized Names of A&AI Subtag"Pamela Dragosh2-0/+6
2018-03-19Fix Serialized Names of A&AI Subtagdc443y2-0/+6
Onset events received from DCAE contain an "AAI" subtag that is capitalized. The casing of the AAI variable was changed to lower case which was making the gson serializer unable to deserialze a simulated onset event that matches the casing DCAE uses, which resulted in Policy rejecting the events because they appear to be missing "AAI". A serialized name was added to preserve the lower cased variable as sonar wants but will also allow onsets with capitalized AAI subtags to be processed by the rules engine. Issue-ID: POLICY-681 Change-Id: Ia37694f606b3fb0898d6c4dadea7c48c5372e64e Signed-off-by: dc443y <dc443y@att.com>
2018-03-15Update oparent version to 1.1.0liamfallon1-1/+1
Directive from ONAP project that all repos should be updated. Change vierified with a build with .m2 /org/onap cleared. Changed dependency org.onap.msb.java-sdki.msb-java-sdk from version 1.1.0-SNAPSHOT to version 1.1.0 Change-Id: I46abc49019cb81b726e3f71ca8fe1beed621a426 Issue-ID: POLICY-693 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-14Changed SO request to iterate extra propsMagnusen, Drew (dm741q)1-7/+36
Modified SoActorServiceProvider.constructRequest() method so that it iterates over extra properties instead of hard coding array values. Issue-ID: POLICY-443 Change-Id: I37d6be9dc595bd8d5e9f9f3f63d6890ef1b2f8b3 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2018-03-02Merge "Upgrade MSB client for security issues"Jorge Hernandez1-1/+1
2018-03-02Upgrade MSB client for security issuesPamela Dragosh1-1/+1
Via LiZi, the MSB team has made some changes to resolve their CLM security issues. We will upgrade to their release version when they have completed that work. Issue-ID: POLICY-615 Change-Id: I7ccc0e0f14d4d8ae8b6852275308b1aad62acaa3 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-03-02Merge "Reduce Technical Debt on drools-applications"Pamela Dragosh18-193/+199
2018-03-02Reduce Technical Debt on drools-applicationsliamfallon18-193/+199
This commit mops up the technical debt issues in drools-applications that are reaistic to fix witout major surgery on the code. note: warnings on non compliant Java class names that are used in yaml serializaiton and deserailization are ignored. note: warnings on complexity figures for equals() methods are ignored. Issue-ID: POLICY-455 Change-Id: I99ccda4bd9932ceb5ccbcfd2778730234b55d7a5 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-03-01Remove CLM issues with commons-collectionsPamela Dragosh2-0/+18
We know that we are not configuring an LDAP PIP in our use of the XACML open source. The LDAP implementation uses Apache Velocity, which uses a very old version of commons-collections that has security issues. So we can exclude commons-collections from the build. Issue-ID: POLICY-504 Change-Id: I6d90731e601f58c8edaca6fe02df30ee2a090c2f Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-21Support vDNS scale out for multiple timesSwapnilPathak1-1/+34
Generation of Unique values for attribute vf-module-name for every scale out operation Change-Id: I5274361c2f5a4136020a384dbe4a4009607f589a Issue-ID: POLICY-610 Signed-off-by: SwapnilPathak <SP00494485@techmahindra.com>
2018-02-19Rename maven modules to mirror directory structureliamfallon73-5275/+5316
The naming of Maven modules in drools-applications was not aligned with the directory structure in the git repository of drools-applications. Therefore it was difficult to see the strucutre of the repository in Eclipse and other IDEs. This change amends the Maven module IDs to reflect the repository directory structure. This patch reset fixes the previos patch set, where many references to maven modules internally in drools-applciations were missed. See also changes in engine and docker repos. Updated to reflect repo directory structure in maven artifact groups. Issue-ID: POLICY-238 Change-Id: I8ab1a7ecdb664045222bbbfda269135e3e449109 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-02-12Merge "Fix technical debt/JUnit on policy-yaml"Jorge Hernandez31-686/+2359
2018-02-12Fix technical debt/JUnit on policy-yamlmmis31-686/+2359
Unit tests added and technical debt removed Issue-ID: POLICY-455 Change-Id: I31566f9386cb94d78e9af3d6261e31b9cad1cb53 Signed-off-by: mmis <michael.morris@ericsson.com>