summaryrefslogtreecommitdiffstats
path: root/models-sim/models-sim-dmaap/src
AgeCommit message (Collapse)AuthorFilesLines
2023-09-22Java 17 Upgradeadheli.tavares10-49/+53
Issue-ID: POLICY-4669 Change-Id: I0157ae0ea7151658308c7e6d429098f16824c190 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2023-03-14Update for SNI checkingliamfallon1-7/+11
Update policy/models for SNI checking Issue-ID: POLICY-4474 Change-Id: I394069e90235859bcb9ccd95d92682f73cfa5b86 Signed-off-by: liamfallon <liam.fallon@est.tech>
2023-02-13Remove annotations in modelslapentafd1-21/+0
Removing last annotations in order to remove dependencies in parent Issue-ID: POLICY-3465 Change-Id: Id7a070120d452e33af805b08b37dd1eba1374615 Signed-off-by: lapentafd <francesco.lapenta@est.tech>
2023-01-31Upgrade and clean up dependenciesliamfallon1-2/+3
- Upgrade Hibernate - Upgrade Mockito - Upgrade Mockserver - Remove Powermock (no longer supported) and replace with spring-test ReflectionTestUtils - Upgrade Spring Framework - Add spring-security to allow authentication on unit tests using MockMVC Minor clean-up - Replace deprecated authorization configuraiton on spring boot applications with SecurityFilterChain bean - Change @LocalPort include on tests to use test include rather than runtime include - Remove unused imports - Remove unused constants and variables - Add deprecation annotations where required Issue-ID: POLICY-4482 Change-Id: Ie8d6ee1e8bcdad282bcef3cad409c5c109e907f1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-01-21Add configurable port and authentication to DMaaP simulatordc443y1-0/+12
Issue-ID: POLICY-3890 Signed-off-by: dc443y <dc443y@att.com> Change-Id: Idbeb3590a767e51aa0058a7a45d56a61e81301cb
2021-08-31Add topics end point to dmaap simRam Krishna Verma4-3/+75
Add "/topics" end point to dmaap simulator. It will be used in CSIT tests to verify consolidated health check. Issue-ID: POLICY-3605 Change-Id: I6814d6dd021e0d98bd99754d4e68f789ef405353 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-07-12Delete extra simulator docker imagesJim Hahn30-1674/+35
The policy-models-simulator docker image, built from models-sim/packages, subsumes the functionality of the other simulator images. Deleted the other images. This simulator still needs some of the code from the dmaap-sim modules, so only deleted the code from the latter that is not needed by this simulator. Also modified the simulator launch script to use sh instead of bash. Issue-ID: POLICY-3474 Change-Id: Ie7f69b327a18c3e07f154124ae38975d5e6924f0 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-28Update policy-models for checkstyle 8.43liamfallon1-2/+2
Issue-ID: POLICY-3209 Change-Id: Ic45f889ab4d0ed24f6c1fc1aaece0601636e7a10 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-06-21Use lombok for errors pap, pdp, sim-dmaap, sim-pdpJim Hahn1-13/+6
Issue-ID: POLICY-3396 Change-Id: Ib2c9bc5dc199e15ae9ca077031c0f2cfbc5b6a81 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-10Fix sonars in policy-models impls & simulatorsJim Hahn8-22/+20
Fixed: - use "var" Issue-ID: POLICY-3094 Change-Id: I65da54cae5a58966f21f981c6cea1259bfdf4239 Signed-off-by: Jim Hahn <jrh3@att.com> simulators Change-Id: I1144568485e62e0c72194caaf21ebf1ba88a6fef Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-29Remove GroupValidationResultJim Hahn2-5/+6
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: I245e4a647fcbb718faa63a7543f9f81c85da958c Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-19Refactor CommandLineArguments classesadheli.tavares4-180/+25
All CMD Args simulator classes to extend from CMD class on Common. Fix all unit tests accordingly. Issue-ID: POLICY-3129 Change-Id: If69e432679772df15b06ce7e316c7c876b69773d Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-03-19Delete keystores from modelsJim Hahn1-0/+0
The Keystores are no longer needed in the tarballs, as they are supplied externally by the CSITs and Helm charts. Deleted those files. Also modified the junits to use utils-test to generate keystores at runtime, thus deleted the junit keystore file, too. Issue-ID: POLICY-3143 Change-Id: Idd24b735a908476765d40bdcb5c741257edc7bb6 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-16Update policy-keystore with newer certificatesjhh1-0/+0
Issue-ID: POLICY-3139 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id4a882b40ef142d0414518c5d5ab90367f0bbb73 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2021-02-11Fix sonars from depeendency upgradeJim Hahn1-4/+4
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner, in most cases. Changed to openMocks() in one case and removed unnecessary stubbings. Issue-ID: POLICY-2905 Change-Id: I9aa098aa7aaebba09f6dcea4cac69ac1e5fbd4d6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-06Don't always validate restServerParametersJim Hahn1-0/+2
Restored original validation code to DmaapSimParameterGroup so it works as it originally worked (i.e., required "restServerParameters"). However, modified SimulatorParameters to validate the relevant fields directly, rather than relying on DmaapSimParameterGroup.validate(), thus eliminating all checks on "restServerParameters" when used within SimulatorParameters. Issue-ID: POLICY-2858 Change-Id: I9a09431ce3056a874bf2dba1c5bd6c418f37f69b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-05Make simulator parameters optionalJim Hahn1-3/+1
Modified the simulator to make the DMaaP and GRPC parameters optional so that a simulator can be started without them. Also added parameter validation, as that was not being performed on the DMaaP or GRPC parameters. Also modified the validation so-as not to require the rest server parameter field contained within the DMaaP parameter class. Issue-ID: POLICY-2858 Change-Id: I85dde93c7baf863eca2cb10eab37806f3e08a087 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-24update default keystoresjhh1-0/+0
Issue-ID: POLICY-2827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I7622d382aec1bd4ba62405355854d1bad510a892
2020-09-04Revert "point to 2.1.0 policy-alpine base - model-sim"Jim Hahn1-2/+6
This reverts commit e46f74d64fe69d33d5038704b64993aa9cab59fc. Reason for revert: some CSITs broken because the can't find the image Issue-ID: POLICY-2789 Change-Id: Id6355c21789281a3f25467b3bd6e2e48d22533f5 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-04point to 2.1.0 policy-alpine base - model-simTaka Cho1-6/+2
In G-rel, using 2.1.0 base. Issue-ID: POLICY-2789 Change-Id: I165debaf20267c0b1c3141bff805a29595f1eccf Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-08-27Fix random failures in dmaap-simJim Hahn1-5/+53
Modified the code to use a separate topic for the format tests, as well as a separate consumer name for each test. Issue-ID: POLICY-2749 Change-Id: Ia93f17109b761e98a4f676066024b51dd9024dc0 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-14Remove annotations from dmaap common test classJim Hahn4-82/+43
Jenkins builds are randomly failing in the junits for the dmaap simulator. From the console output, it appears that the simulator is being shut down before all of the test methods have executed. Moved the code for managing the "Main" object from the common superclass to the only subclass that needed it. Issue-ID: POLICY-2749 Change-Id: I2615bbef9b790dbb633ed7f123aeb3f880826862 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-31Allocate unique port for dmaap simulator junitsJim Hahn4-17/+28
The junits for the dmaap simulator were randomly failing, because the port was already in use. Modified the junits to allocate their own, individual ports. Issue-ID: POLICY-2749 Change-Id: I3f3858091ee8f36ed00346ad9fa002a76d0348ae Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-21Fix some sonars in policy-modelsJim Hahn1-3/+4
Fixed the following sonar issues in some of the project directories: - use assertNull, assertEquals, etc. - swap assertEquals arguments - extract a constant - don't invoke toString() in logger calls - TODOs - generic types Issue-ID: POLICY-2714 Change-Id: Id8803f9bf617ea9fc173a67b8606600709b55bdc Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-18Changes for Checkstyle 8.32liamfallon6-8/+3
Issue-ID: POLICY-2188 Change-Id: I6db16763c1d2d80ff934302081a8dfc16afa7d9a Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-06-12Remove logback.xml files bundled as part of jara.sreekumar3-56/+2
Change-Id: I4d603ea67eca5d8d75b9df004e1ff4a6be2b2a9e Issue-ID: POLICY-2627 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-04-09Disable sonar main args for modelsJim Hahn1-1/+5
Issue-ID: POLICY-2305 Change-Id: Ie8c45fb767ec9b2f9b1b541532fede52306c36b4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-07Address sonar issues in modelsJim Hahn3-6/+9
Addressed the following sonar issues: - use RE2 instead of java.util Pattern for "+" and "*" - don't use deprecated methods - for Date(long), sonar appeared not to parse the argument's type correctly. Modified the code slightly to make sonar happy - duplicate blocks of code - either log or throw - missing assert in junit - for SDNR & VFC, eliminated threads, as they are unnecessary - duplicate code block in different branches - useless assignments - redeclaring abstract methods - cyclomatic complexity - used lombok in some cases (e.g., EqualsAndHashCode) - assert argument order - actually deleted ControlLoopTargetType, because it is not needed and sonar complains regardless of which order is used - add private constructor to utility classes - use StandardCharsets instead of literals Also: - added logback-test.xml to SO to eliminate the voluminous output from the junit test Issue-ID: POLICY-2305 Change-Id: I586c331781bedbd54a115a71847d04d293689445 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-25Cleanup eclipse warningsPamela Dragosh1-3/+1
Issue-ID: POLICY-2165 Change-Id: Iaad54af1b1210fe96fa44dcaa609834c46557877 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-17renew policy certs till 03/17/2021jhh1-0/+0
Issue-ID: POLICY-2402 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I42919180d73058bc78cc70a29a6d5d45823aa9eb
2020-01-17Update Dockerfiles for java11 in policy-modelsJim Hahn3-21/+4
Also modified docker build scripts so they work with SNAPSHOT or release versions of the tarballs. Issue-ID: POLICY-1586 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ib5b8c0b83d7736180ab213b0b67d457eab7ee48e
2020-01-10Remove deprecated methods from modelsJim Hahn1-6/+5
Addressed the following issues related to the java 11 upgrade: - forClass().newInstance() - java.xml.bind no longer included in jdk - new mockito doesn't clear captured lists Issue-ID: POLICY-1406 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ia254c1ed21f847d1824e7abc22528975372ee2b6
2020-01-10policy/models jdk 11 upgradesHOCKLA2-10/+12
Issue-ID: POLICY-1592 Change-Id: Iaa6b61c5f1c76f3e7c2043691f4d29dbc43d144e Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-11Fix timeout bug in dmaap simulatorJim Hahn4-10/+46
Also added a start script that can be used to execute the simulator in stand-alone mode (i.e., outside of a docker container). Change-Id: I26550ad36cfd2448c96cf0c09fec24e60ffd815b Issue-ID: POLICY-2298 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-11Fix dmaap simulator junitJim Hahn1-49/+42
Modified the code to leave the topics open through-out the test cases, and simply clear the queues between each test case. Hopefully that will fix the EndToEndTest junit in the dmaap simulator. Change-Id: I3658df4dbc70cd47fec1cfb84c7a2365133105ff Issue-ID: POLICY-2144 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-10-07Flesh out DMaaP simulatorJim Hahn35-415/+2793
Fleshed out the dmaap simulator with additional media types. Added more junit tests. Added buildDmaapSim() to simulators Util. Change-Id: I39acd3df8e8d0ded21228e56fa1ef919cafc3772 Issue-ID: POLICY-2144 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-22update keystorejhh1-0/+0
Issue-ID: POLICY-1988 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I565d8ca294750b748ba2709eedab032cd5eb0936 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-07-08Fix models due to sonar changes in commonJim Hahn1-1/+3
Fixed breakages due to changes made in policy/common to satisfy sonar. Change-Id: I7de701e743664afb5963a454c59478d1a1c83e87 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-18Change getCanonicalName to getName in modelsJim Hahn1-1/+2
Per javadocs, getName() should generally be used instead of Class.getCanonicalName(). This change only applies to classes; it does not apply to File objects. Note: this impacts the output from PfValidationMessage, as it will now list the names of embedded classes with a "$" separator instead of a ".". Change-Id: I2cd64bc0281dd324bf80eac57335a7299a516447 Issue-ID: POLICY-1646 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-03Fix dmaap-sim docker chmodJim Hahn1-1/+2
The chmod in the docker builder for my local VM does not appear to support the "+x" style options. Modified the dmaap-simulator docker file to use "755" instead. Also fixed the PDP simulator. Change-Id: I3dd906d2ef63303f8c8872ce38a5711d61e35c3e Issue-ID: POLICY-1829 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-05-01Fix SONAR issues on DMaaP Simulatorliamfallon1-14/+21
Fixed interrupt issue and stack trace printout on DMaaP simulator. Issue-ID: POLICY-1643 Change-Id: I0a7898b7ea230960df8052981fe22dfeb3a04365 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-30Docker container for DMaaP Simulatorliamfallon8-0/+314
THis review brings in a Docker container for the DMaaP simulator for CSIT testing. This container should NOT be submitted to the ONAP nexus as it is only for testing. Issue-ID: POLICY-1643 Change-Id: I0e2147da9b7c0a85db68044439d48378d3a3e5b5 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-17Add DMaaP simulator for CSIT testingliamfallon23-0/+1539
A rudimentary DMaaP simulator that simply holds requests and responds to all readers with whatever message comes in on a topic. The simulator is placed in policy models for now but should be submitted to DMaaP. The simulator is now working but is still extremely rough. Issue-ID: POLICY-1643 Change-Id: I28645a73cf198fe825c897243b30cd34dc29f20d Signed-off-by: liamfallon <liam.fallon@est.tech>