aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/reception-plugins/src/test
AgeCommit message (Collapse)AuthorFilesLines
2022-08-23Fix Sdc configurationRam Krishna Verma2-1/+3
Fixing the SdcConfiguration class to accomodate the parameter for switching http vs https communication between Sdc client & server. So that distribution component is compatible with Service Mesh (Istio) initiative in OOM. For more details - https://jira.onap.org/browse/POLICY-4226 Issue-ID: POLICY-4226 Change-Id: Ia3956832d37953e1b6149303ca685d4b82c30f5d Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-05-12Security issues from sonar cloud fixesadheli.tavares6-102/+49
Issue-ID: POLICY-4168 Change-Id: Iedac6c95be452be81e8c73055193b4707735ef56 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2022-04-06Error handling when a decoder fails to parse policyadheli.tavares1-0/+40
- catch exception only if it was a parse error (still raises exception when no decoder found) - reducing of complexity on acm decoding for sonar - added some debug logging and exception messages for better tracking of issues Issue-ID: POLICY-4006 Change-Id: Ie09aaf541fc06244b84477ecbfe70fc837438a86 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2022-03-02Rename ControlLoop to AutomationCompsitionSirisha_Manchikanti7-35/+37
Issue-ID: POLICY-3938 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: I63188fa9bc5d634d3aeb7e2d7051c4d67b5a202c
2022-01-06Add ControlLoop distribution to runtimeSirisha_Manchikanti5-0/+169
This commit unpacks the csar received either from SDC or for local verification from file-system, prepares the toscaservicetemplate with needed node-types and data-types, forwards the template to controlloop runtime components for commisioning of controlloop. Issue-ID: POLICY-3808 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: Ib3600542aca7b32ae19242c2f924bdaf2ab870a8
2021-12-08Moving @NotNull annotation to field levellapentafd2-1/+46
KeyStorePassword and KeyStorePath values can be expressed as simply null instead of "null" Issue-ID: POLICY-3604 Change-Id: I839bce33df4829fcc8d604f8ed1e52e6f50ef988 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2021-08-19Add yaml support for policy & policy typesRam Krishna Verma2-0/+14
Adding support for yaml format of policy & policy types in distribution. So that users can either define them in json or yaml format. And then distribute to policy framework. Issue-ID: POLICY-3509 Change-Id: Ifba7486bbc1e6876f0e3e39b0ae5ebe043567029 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-07-07Use lombok in policy/distributionRam Krishna Verma7-149/+37
Use lombok for getter, setter, constructor & builder functions. Remove unused classes. Remove duplicate classes for testing exceptions. Issue-ID: POLICY-3393 Change-Id: I8a565bc6a5699b8716982f84e03b6a11d08ce65b Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-04-29Remove GroupValidationResultJim Hahn2-8/+11
Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Issue-ID: POLICY-2059 Change-Id: Ib5c0dc0ac3762e68307e63f5ce29efb49208e55d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-21Remove hpa decoder from policy/distributionRam Krishna Verma20-722/+3
Issue-ID: POLICY-2477 Change-Id: Iff4158e2322724265007d5a90459c3ebf62d3fc2 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-02Replace try/catch blocks with assertj - distwaynedunican5-118/+57
Replaced try/catch blocks in policy/distribution test cases with assertj assertions Issue-ID: POLICY-2451 Change-Id: Ib7ecd13e39abd471bf1424d8a3db22c72ad1e3b8 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-06-19Changes for Checkstyle 8.32 in policy-distributiona.sreekumar12-28/+12
Change-Id: I8f9324279f24cc3b9d26f265c3dacd5b61ce856b Issue-ID: POLICY-2188 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-03-26Remove unused imports and clean logsPamela Dragosh6-12/+6
Unused imports and marked an unused variable. Added m2e eclipse settings (other repos have this). Added some test logback.xml to clear out jetty debug messages. Replaced deprecated newInstance with getDeclaredConstructor. newInstance Either log or throw Exception - chose throw Added some assertions to JUnit test. Issue-ID: POLICY-2305 Change-Id: Ia4e9ce62dc7fb45aea247d470ca7245e694fc26e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-03Remove policy/engine & apex dependency from distributionRam Krishna Verma16-409/+71
Issue-ID: POLICY-2404 Change-Id: Ia3084c55ea65a3119354079d9afd3ee35689b7d4 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-01-22policy/distribution jdk11 upgradesHOCKLA3-7/+8
Issue-ID: POLICY-1585 Change-Id: I4aa879656c039d9de9c288f0309105c21f4bf285 Signed-off-by: HOCKLA <ah999m@att.com>
2019-10-30changes in decoder as per new infra APIsLiang Ding1-164/+161
Change-Id: Ie2ebfa16bc6b08dc54d60ef276f52e9ea2c91b1f Issue-ID: POLICY-1869 Signed-off-by: Liang Ding <liang.ding@intel.com>
2019-10-15changes in policy decoder per hpa OOF definitionLiang Ding1-0/+7
Change-Id: I25f956c863f93c998c681535f5ef7ec43ca88cde Issue-ID: POLICY-2029 Signed-off-by: Liang Ding <liang.ding@intel.com>
2019-10-11Remove "Restricted" info from csarsjhh2-0/+0
These are the lines removed: + Proprietary information (Restricted) + For use only by authorized individuals and not for general distribution. Change-Id: I5a51d6f6bb40e464f9f9952cb139b668a4530298 Issue-ID: POLICY-2107 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-10-04Create decoder/parameters infra for HPA policyramverma3-2/+344
Creating a new policy decoder & its related parameter classes for decoding the HPA policy as ToscaServiceTemplate which is accepted by the new Lifecycle API of Policy Framework. Added couple of changes per review comments. Issue-ID: POLICY-2122 Change-Id: I2d19b04cd24dd9c5b9fbf959757272077e6413d4 Signed-off-by: ramverma <ram.krishna.verma@est.tech> Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-19Remove proprietary license added in csar by SDCramverma2-0/+0
Issue-ID: POLICY-2107 Change-Id: Ib237140f44460cecf7b379c77c7edbd7387638a0 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-09-06Fix few unit tests in distributionramverma1-0/+0
Fixing few unit tests broken due to side effects of change in policy/models. Issue-ID: POLICY-1871 Change-Id: Ia702e54e21ddbdde114570078ad6fcf85765a660 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-09-04Bring back the old HPA decoder & modelramverma1-145/+145
Bringing back the old HPA policy decoder and its related classes and tests. The distribution framework will support both the new PAP/API and the old policy engine in El Alto release. Issue-ID: POLICY-1871 Change-Id: Iab911b793207a09b02e906ed6913c54bc252f64c Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-08-06Changing parameters to use ParameterGroupImplramverma12-137/+150
1. Changing all the decoders & handlers parameters to use ParameterGroupImpl. 2. Fixed all the test cases. Issue-ID: POLICY-1890 Change-Id: I4a124c0acc650020977ac8e2cee143c72003973a Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-07-23Update PolicyDecoderCsarPdpx to match policy/apiramverma1-13/+13
Lifecycle API's for creating policies & policy types in policy/api expects ToscaServiceTemplate as input instead of ToscaPolicy or ToscaPolicyType. Hence, changing the return type of decoder to generate & return ToscaServiceTemplate instead of ToscaPolicy. Change-Id: I4fb92738e15ee7e2868741f7ca50cf09429d8cde Issue-ID: POLICY-1888 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-07-21Changing policy decoder to support Toscaramverma4-19/+37
1) Updated PolicyDecoderFileInCsarToPolicy to parse ToscaPolicy & TocsaPolicyType from the given csar. 2) Change the parameters 3) Tests cases updated/added. Change-Id: Ic8d652ae8043d5d332f663a6862eb08e282591cf Issue-ID: POLICY-1889 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-07-19Fix proprietary licensesliboNet1-0/+0
remove the txt file from generated csar file Change-Id: Ib8074b70d955440f22ea95781a698fb7e084bfb5 Issue-ID: POLICY-1867 Signed-off-by: liboNet <libo.zhu@intel.com>
2019-07-17Changing policy/distribution to use policy/modelsramverma6-187/+174
1) Changed policy distribution framework to use entities from policy/models 2) Changed all the test cases. 3) Commented few test cases which will be fixed along with code fixes. 4) Will be removing the old policy entities once all the pieces are ready. Change-Id: I1fd7b975b2e072c0b24e429903c9ca4796173929 Issue-ID: POLICY-1888 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-05-13upgrade sdc tosca parse to v1.5.1liboNet6-5/+5
update pom.xml to use v1.5.1 for sdc-tosca parse update Extract file since the DM's change update the csar file based on new DM update Test file to reflect the new CSAR file Change-Id: I90da979ff1cedbdedadacc46386aa5ea0e7b6711 Issue-ID: POLICY-1720 Signed-off-by: liboNet <libo.zhu@intel.com>
2019-04-10Add multi-thread support in FileSystemReceptionHanderLianhao Lu3-5/+9
By adding multi-thread support in FileSystemReceptionHander, we can have a more thorough s3p test to test performance & stablity in multithread situations. Change-Id: Id263435531e26dcbadfbda6f82b26ac54a72ba1a Issue-ID: POLICY-1274 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2019-02-05Change policy/distribution logging to slf4jramverma2-16/+17
1) Changed logging from FlexLogger to SLF4J with logback 2) Fixed test cases of distribution REST endpoints having infinite while loop Change-Id: I1551873b3d348f9a7d2b4f8dfc3ae5dd6462bdb8 Issue-ID: POLICY-1346 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-01-25Fix compilation error on policy-distributionramverma1-3/+7
Change-Id: Ic190774c74c11a2d11c3b3b7e0144f69cd8770e8 Issue-ID: POLICY-1428 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-01-22Fix issues in policy-distributionramverma2-17/+18
1) Creating a new thread for watching directory path for new file. 2) Updating distribution statistics from FileSystemReceptionHandler. Change-Id: Ic539f2cad015f0756407fe910f309a2ea661a764 Issue-ID: POLICY-1437 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
2019-01-22Remove properietary license from CSARliboNet2-0/+0
Remove these license from the Artifacts/Information directory which will NOT impact the test in S3p and reception-plugins Change-Id: I6551d37b704b2191b865af8c69f01eae685d0adb Issue-ID: POLICY-1433 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-12-04Fix policy format with vCPE serviceliboNet3-30/+65
. change the capital and lower-case letter . add missing fields in ConfigBody policyName and templateVersion that are requried by OOF . add '=' into default operator once no such info in the input CSAR . based on the vCPE service, which includes several CPs, some may do NOT connect any VDU. so need deal with such case. . add new test case to cover complicated service includes 5 policies . change the resource's type from String to List as requried by OOF which needs such format to deal with all kind of policies beides hpa . improve the code style Change-Id: Id39b1a0511c362c5ae9dce409af18b032832de80 Issue-ID: POLICY-1282 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-11-13Fix unchecked cast sonar issuePamela Dragosh2-12/+10
Removed the unused variable. We are reasonably sure that the cast is ok. Fixed the JUnit tests, removed useless imports, unused variables and raw types. Issue-ID: POLICY-1256 Change-Id: Iad7dbbf02a4dd48648fc9d5c20595c9f0f8d7acb Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-11-13FileSystemReceptionHandler: Fix sonar issuesLianhao Lu1-10/+43
Fixed 6 code smell issues reported by sonar. Change-Id: I537df24f0f0624470efd8675f01ecd433aed1cb0 Issue-ID: POLICY-1256 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2018-11-12Merge "Fix virtual_binding error under VDU requirements"Liam Fallon4-4/+38
2018-11-13Fix virtual_binding error under VDU requirementsliboNet4-4/+38
virtual_binding will bind CP to a VDU but virtual_link use the node name instead of the name of node's propertiy add new test case to cover s3p the picvendorId's path has been changed based on demo repo Change-Id: I0ca400eab4d16284f14cb568fe3da5b409dd9222 Issue-ID: POLICY-1254 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-11-12Make FileSystemReceptionHandler more tolerantLianhao Lu4-0/+256
Make FileSystemReceptionHandler tolerant of exceptions thrown when parsing tosca template and be able to handle new incoming csar. Also added the unit test for FileSystemReceptionHandler. Change-Id: I0f1647f6f952576a8e61adca4d027990706d1411 Issue-ID: POLICY-837 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2018-11-01Add more logics about fields value for OOF modelliboNet1-4/+4
To align with OOF/Policy/SO, need add below: . resource should be set as name field of SDC resource. . identity should be set as a concatenation of PolicyType + "_" + Resource . value of flavorDirective's type, expected from OOF, is "flavor_directives" . policyScope should add the name of service from SDC to align with that from SO. . Update the Testcase Change-Id: I57f461ef51e0f50e6096c9c9ba84c5832cb13656 Issue-ID: POLICY-1227 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-10-10Remove properietary license from CSARliboNet4-0/+0
Remove these license in zip file from the Artifacts/Deployments directory which will NOT impact the test reduce the size of csar file by using zip -9 compression Change-Id: I234da7c13f0ce00fc2f1edbc16aac279bf90752d Issue-ID: POLICY-1185 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-10-09Remove properietary license from CSARliboNet5-0/+0
Remove these license from the Artifacts/Information directory which will NOT impact the test Change-Id: I3280ca902616248313fe357cfa0cda9bc254b178 Issue-ID: POLICY-1185 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-10-01Update the schema parse based on newer versionliboNet3-0/+0
the schema format of HPA requirement has been modified so that the parse needs update too based on the wiki: https://wiki.onap.org/display/DW/Specifying+HPA+ Capability+Requirements+using+TOSCA-based+VNF+Descriptors Change-Id: I48b39797e70d686ed0b9b2e7001b9a00068e76fd Issue-ID: POLICY-1160 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-09-21Adding retry logic for SDC Client in Distributionramverma3-36/+31
* SdcReceptionHandler in distribution tries to initialize & start the SDC Client when distribution framework comes up. If by any chance the SDC service is not up then currently the SdcReceptionHandler throws an exception to the distribution activator and the distribution framework goes down. And the health check fails. * This review fixes it by adding a retry mechanism in SdcReceptionHandler for all lifecycle methods of SdcClient (init, start, stop). After failure the same operation is retried again with some delay. The delay is passed as parameter from configuration json file. The minimum default value for the delay is kept as 30 seconds. * Adding SdcClientHandler timer task for performing the retries asynchronously. Change-Id: Ibb6d936fcf4872c82f87e2cd04a00583b81c92ff Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-09-15Fix sonar bugs in distributionramverma2-19/+93
Change-Id: I42e568cab649da74e2a179fe487c32feec9c88fa Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-09-14Aligned decoder with forwarder for opt. policiesmmis7-170/+157
Changed decoder for optimization policies to generate instance of OptimizationPolicy (instead of PdpxPolicy) as expected by the forwarder. Without this change there is a mismatch between the decoder and the forwarder. Added parameters for configuring the static elements of the optimization policies and setting of these elements. Issue-ID: POLICY-927 Change-Id: Ib91a905dc89eed13622fb88e4dd19b3cb9f62c75 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-09-15Adding more hpa feature support for PolicesliboNet4-2/+151
* Add hugePage feature parse * Add SRIOV feature parse * Add pciePassthrough feature parse * Add more test cases and resources Change-Id: Ib45515a26e3fdac742a631b3a13d739fd1784d2f Issue-ID: POLICY-927 Signed-off-by: liboNet <libo.zhu@intel.com>
2018-09-14Merge "Adding statistics endpoint to distribution"Liam Fallon1-0/+14
2018-09-13Adding statistics endpoint to distributionramverma1-0/+14
* Adding statistics endpoint in DistributionRestController * Adding DistributionStatisticsManager to hold all stats. * Adding StatisticsReport class to represent distribution stats report. * Updating stats at each step in SdcReceptionHandler. * Adding test cases for all code changes. Change-Id: I0b0f97aecc64b18314367fdff6d3ca7bee06efc7 Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-09-13Adding policy decoder to extract file from csarramverma12-1/+178
* Adding decoder configuration parameters infrastructure to support plugin based architecture. Adding a new policy decoder after this will be just creating a new decoder class and its corresponding parameter class. * Adding a new decoder which extracts policy file from given csar. It is written in a generic way to extract file for any pdp like apex, drools. * Adding configuration parameters for the new decoder. The policy file name and policy type is passed as parameter to the decoder. * Fixing few broken package declaration in pdpx decoder tests. * Adding test cases for all code changes. Change-Id: I95e68cebce0f9747ca63b090f9b9116ce8836939 Issue-ID: POLICY-1101 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>