aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/resources
AgeCommit message (Collapse)AuthorFilesLines
2020-05-20replace keystore with newer certsjhh1-0/+0
Issue-ID: POLICY-2475 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I88bc0766554aca951b025689d534185096957da7
2019-09-04Knock on of changing policy types to mapliamfallon1-161/+156
This review adapts policy-pap for the change in the structure of the toasca service template from a list of maps to a plain map. There is only a change to one test file. Issue-ID: POLICY-2047 Change-Id: Ieeeeb43d8f0300d075b3072b67f8d459def27ee7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-08-22update keystorejhh1-0/+0
Issue-ID: POLICY-1988 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I3e7d08621b6ac529f3517de8c2b910d2fa7c5151 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-07-01Remove topic.properties and incorporate into overall config filea.sreekumar7-44/+60
1) The properties in the topic.properties file is moved into overall config json file and the topic.properties file is removed. 2) Common parameters such as RestServer and Topic related parameters from policy-common is used. Change-Id: I390bbe3cda101a69e7ce614404ecdfbf98598dd2 Issue-ID: POLICY-1744 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-06-21Merge "Allow integer version when using PDP Group Deploy"Jorge Hernandez3-0/+134
2019-06-21Adding PdpGroup healthcheck REST API in PAPramverma1-0/+98
Adding PdpGroup healthcheck REST API in PAP to return the health status of all the Pdps registered with this PAP instance. The healthcheck status will be based on the regular heartbeat coming from the pdps. Change-Id: Ia0f1603b513bf62ce1df3058427dc6ccaf179cb3 Issue-ID: POLICY-1770 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-06-20Allow integer version when using PDP Group Deployjrh33-0/+134
The policies listed in a "PDP Group Deploy" request may not have fully qualified versions. Modified the code to replace the versions in the request with fully qualified versions. Also improved performance by avoiding look-ups of policies that are already in the subgroup. Change-Id: I37899c2b45228b97a80b7ef44f69694ba57e8f4a Issue-ID: POLICY-1784 Signed-off-by: jrh3 <jrh3@att.com>
2019-06-11Add PDP heart beat expiration timerjrh37-1/+48
Added heart beat interval to the PDP-UPDATE message sent in response to a heart beat message received from a PDP. Added timers to detect missing heart beats and remove the PDP from the DB - PdpTracker. Modified current heart beat listener to update PdpTracker when a heart beat is received. Allow 3 missed heart beats instead of 2. Change-Id: I81621fefbe494e0c4d6f0b9767b00b2a9dd398d8 Issue-ID: POLICY-1795 Signed-off-by: jrh3 <jrh3@att.com>
2019-06-05Reject policy deployment with version mismatchJim Hahn1-0/+72
PAP should not allow multiple versions of a policy to be deployed to the same PDP. Modified the code to reject deployment requests where a different version of the policy is already deployed. This impacts both the PDP-Group-Deploy and the Simple-Deploy REST APIs. Change-Id: I586b764951c20228d0d80ec8326869215e970fdf Issue-ID: POLICY-1785 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-04Undeploy policies when subgroup is deletedJim Hahn1-0/+64
When a subgroup is deleted via the PDP Group create/update API, any PDPs in the subgroup should have all of its policies undeployed. In the process, refactored addOrUpdateSubGroups() out of updateGroup(). Change-Id: I0750802bfb133a655e38493a868744b512ca3fb4 Issue-ID: POLICY-1803 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-24Validate supported types3.0.2-ONAPJim Hahn2-1/+5
When a group is created, PAP should verify that the "supported types" exist in the DB. Address potential sonar issue. Address potential sonar issue in similar block of code. Change-Id: Ib830550bc37d4ebe42c8782f3f874e463f3f51c2 Issue-ID: POLICY-1688 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-19Add end-to-end junits for PAP REST APIJim Hahn13-0/+810
Added test that checks sunny day scenarios for the PAP REST API. Uses real PAP components for everything except DMaaP. PDPs are simulated. Change-Id: If2adc3b1523b477c3efd3eb83fb7a7b04f40fa24 Issue-ID: POLICY-1670 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-17Add DMaaP sim configuration filesliamfallon4-1/+72
Add configurtion files that work with the DMaaP simulator. Issue-ID: POLICY-1643 Change-Id: I8e387163ab190b9610669029720ccf7b9989cfdf Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-15Fix sonar issues in PAPJim Hahn7-7/+7
Moved methods into nested class of PdpModifyRequestMap. Note: they will have to be moved back out when the broadcast capability is added. Removed extra "continue" from Publisher. Rather than remove unused parameters and cause significant clutter to the code, chose to use the parameters in a logger call for RequestImpl. Removed unnecessary cast from UpdateReq. Use version constant in PapRestControllerV1. Log exception in PdpGroupQueryControllerV1. Log exception in PdpGroupStateChangeControllerV1. Shortened functional in PdpGroupDeleteProvider. Removed unnecessary type parameters from PdpGroupDeployProvider. Removed unneeded parameter and exception from ProviderBase. Extracted common string from Main. Shorted functionals in PapActivator. Changed uses of getCanonicalName() to getName(); the former only has limited use, while the latter is typically what is wanted and is actually required whenever forClass(name) is used. Fix junit tests broken by rename of ToscaPolicy version from "typeVersion" to "type_version". Change-Id: Ia00e1b3541c9e25b196a951e45681f67aa7f1bfe Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-15Support integer policy-versionJim Hahn1-7/+0
The deploy/undeploy APIs used by CLAMP only pass the major number when specifying a policy-version. Modified the code to handle policy-versions of the form, major or major.minor. Change-Id: I3251df162984f287bd1430b8e46da675b4c265ee Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-13Support group-oriented REST APIJim Hahn9-0/+149
Added code to support PDP group create/update & delete REST API calls. The create/update request can also be used to deploy/undeploy policies. It is assumed that the create/update request specifies a valid list of supported policy types for each subgroup (i.e., PDP type). Updated due to elimination of "version" from group in policy/models. Added/updated junits. Change-Id: I1916d9b17dfd5f12129c6f6a2fcf54e706662c10 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-11Adding code for db config & initial group creationramverma4-40/+4
1) Adding code for initial PdpGroup/Subgroup creation. 2) Adding db configuration 3) Updated code as per change in policy/models Change-Id: If37870925001b333e0537e364eecb266c351cf5a Issue-ID: POLICY-1635 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-04-11Don't change group version numberJim Hahn1-60/+1
Modified code to update a PdpGroup, adding or removing policies, without changing the version number. Change-Id: I10031dff5f6d9c7e568605a8d73af6fe3c740901 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-11Fix junits broken with policy-id changeJim Hahn4-13/+13
Several junit tests were broken when the json-encoded names were changed for the fields within ToscaPolicyIdentifierOptVersion. This review fixes those junit tests. Change-Id: I963190b7792a2ebc3165ef04c74f4671c41c37da Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-10Add junit tests for PdpGroupDeleteProviderJim Hahn2-0/+65
Change-Id: Id744a7d49b9fb608ba3379dd43bcbd6a0297891f Issue-ID: POLICY-1541 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-09Adding PdpGroup query & statechange providersramverma1-0/+81
1) Adding implementation of PdpGroup Query & State change providers for PAP REST API. 2) Adding support for unregistering Pdp after recieving TERMINATED state in PdpStatus message. 3) Updating PdpStatusMessageHandler with new filter changes in models. 4) Removing updatePdpStatistics method as we will implement db provider and REST provider in next release. 5) Fixing few bugs found during Pdp registration testing. 6) Updating the existing test cases to work. 7) Will be adding more exhaustive test cases in another review. Change-Id: I7aa20bf422671fdc1e06dab5e90aef4ee19a6a02 Issue-ID: POLICY-1541 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-04-05Delay DB updates until all policies processedJim Hahn1-1/+1
If an exception is thrown in the middle of processing policies, it's possible for the DB to reflect a partial deployment. This change queues the DB changes so that they're all made at once, after all policies have been processed. Extracted sort() into a common place. Corrected some comments. Simplified the list retrieval in the junits since all DB creates and updates are now batched together into one operation each. Change-Id: I835175fc16d4042c741d36ec69caa8f603d46d5a Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-05Flesh out policy deployment REST APIJim Hahn19-0/+385
Also moved the controller, the provider, and supporting classes to their own dep_undep package. Change-Id: Ifea1c4dd2ecbf93a8f4d45e130830cf9271103d3 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-27Adding db provider parameters to pap config fileramverma3-0/+24
Change-Id: I573a345bcf69eb40782277f211fff2b7c69c4f55 Issue-ID: POLICY-1443 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-03-25Changes to PAP infrastructure to support PDPJim Hahn3-7/+37
Modified PapActivator to implement the Startable interface and used that to manage it instead of the original method names. Replaced pdp-common enums with models-pdp enums. Added the use of the Registry. Added parameters to be used for PDP interaction. Added DAO interface classes. Modified HTTP client, in junit tests, to use GSON instead of Jackson. Removed DAO code, as the interfaces are not merged into policy/common yet. Added pdpParameters to default json config file. Changed tabs to spaces in json files. Removed "internal" classes that were moved to models-pdp. Change-Id: I969a7747e926680ad403557b44a0a52d289fb6d9 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-13Add PDP Group Deploy and Delete REST API stubsJim Hahn1-0/+22
Note: this will not build until the models-pap code has been added. Added PDP group Delete methods, with and without version. Added checks for OK status codes. Added topic configuration. Still does not have the "simplified" PDP Group deploy/undeploy. Still won't build without "Move PDP Group classes to concepts subdirectory". Will add junit tests for code changes in another review. Updated comments about unlocking after updates. Made ServiceManager final. Included topic start/stop actions. Fixed parameter comment. Removed unneeded parameters from json files. Fixed argument test in shell script. Updated licenses. Change-Id: I6176d51918ae758e04fb68562dc9ca70534137d4 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-07Refactor REST server testsJim Hahn2-11/+2
Refactored the REST server tests so that each controller has its own test class. Also ensure things are shutdown by various tests. Added comments. Removed unneeded constant. Updated license. Modified code that restarts the REST server during tests. Modified code to just change the activator's "alive" state to false, leaving the REST server running. Fixed comment. Allocated server port. Removed file that should not have been included. Changed code to throw exceptions if activator methods are called while in the wrong state. Change-Id: I04a3a6654150797c23b3c86a6a39ecf8bb7f5a78 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-07Adding statistics endpoint to policy/papramverma2-0/+10
1) Adding statistics endpoint to policy pap component. 2) Introducing lombok libraray. 3) Adding configurable support for aaf authentication. 4) Adding configurable support for https communication. 5) Adding related test cases. Change-Id: Ib3131810c42fbd23878b97302da8d54f095da373 Issue-ID: POLICY-1482 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-02-05Adding healthcheck endpoint to policy/papramverma3-3/+21
1) Adding healthcheck REST endpoint to policy/pap using the policy-endpoints module in policy/common. 2) Added the related unit test cases. Change-Id: I6a215cceccc9cd42494aef1dfcdd46f0f3fd7d13 Issue-ID: POLICY-1477 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-01-31Create basic structure of pap componentramverma6-0/+14
1) Creating the basic code structure of pap component which includes main sub-module having Main, PapActivator, PapCommandLineArguments, PapParameterGroup & PapParameterHandler. Along with few exception classes. Basicalliy the structure follows the pattern developed in policy/distribution component. 2) Created the related unit test cases and required test resources. Change-Id: I67c82f9d072e6c8a306cb983accb693da70e58a2 Issue-ID: POLICY-1476 Signed-off-by: ramverma <ram.krishna.verma@est.tech>