summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2024-05-21Add spring-boot actuator to model-loader1.14.1Fiete Ostkamp2-1/+48
- add actuator that enables liveness probes - allow passing in jvm args to the running process (for debugging or profiling) - bump version to 1.14.1 Issue-ID: AAI-3852 Change-Id: Id4b8c5d5402a8eeaf1630a3cdcdfc68471a26a94 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-05-16Stop sdc-distribution-client upon service shutdownFiete Ostkamp2-7/+79
- restore old behaviour by calling distributionClient.stop() - downgrade sdc-distribution-client version to 2.0.0 Issue-ID: AAI-3848 Change-Id: Id252f4d8e387a916dcbdebd5110b46432858ee6b Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-30Return List<Artifact> in ArtifactDownloadManagerFiete Ostkamp10-258/+137
- return processed artifacts as List<Artifact> instead of updating the parameters in ArtifactDownloadManager - use exceptions to signal exceptional behaviour instead of boolean success = false; Issue-ID: AAI-3841 Change-Id: Ie99c5da1f553bebd70665914fa6be9c460fa412c Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-29Refactor babel-related code to not update parameter valuesFiete Ostkamp14-163/+178
- return processed Artifact's as List<Artifact> in BabelArtifactService and ArtifactDownloadManager Issue-ID: AAI-3840 Change-Id: Ibc78517e87ebf1bfc9c6336555c96e6d1506cf5c Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-26Upgrade spring-boot to 2.7.X in model-loaderFiete Ostkamp1-3/+4
- upgrade spring-boot from 2.4.13 to 2.7.18 Issue-ID: AAI-3838 Change-Id: Ia43df48e049ae1e3d05aaa0ed85c245db7df004c Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-26Update oparent in model-loaderFiete Ostkamp2-3/+6
- update oparent from 2.1.0 to latest 3.3.3 - remove: - org.json - jetty-security - jline dependencies as they are not used anywhere Issue-ID: AAI-3837 Change-Id: Id39dac0dfbb3a56568f43816035f06c29148d15c Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-26Remove jersey and aai-rest-client dependencies from model-loaderFiete Ostkamp6-87/+33
- aai-rest-client has been fully replaced with RestTemplate - use spring provided imports in ModelController Issue-ID: AAI-3836 Change-Id: If2471c8a68c273823bef138626534df1894a91d7 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-24Improve error logging1.14.0Fiete Ostkamp2-4/+16
- do not log csar payload to babel on info level - log exception when PUT to aai-resources fails Issue-ID: AAI-3834 Change-Id: I524315465c79165755fb9b8062f29f4f10d876ab Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-22Use RestTemplate in AaiRestClientFiete Ostkamp28-437/+832
- brings tracing support for the requests towards aai-resources - leverage automatic object mapping done by Jackson in the background - add model related entities Issue-ID: AAI-3833 Change-Id: I4f6ec65c80a6dcc1e1e3fa10786a119996c3bc79 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-18Update babel dependency in model-loaderFiete Ostkamp1-16/+2
Issue-ID: AAI-3832 Change-Id: I1cd1588dac16401c7f5064398ff7b8de71bffe30 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-18Refactor Babel related code in model-loaderFiete Ostkamp16-463/+349
- introduce BabelArtifactService - simplify babel http client by removing factory and https support Issue-ID: AAI-3827 Change-Id: I5c004d342687c8aaa8f26927342752d472f05da3 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-17Add model-loader integration tests1.13.6Fiete Ostkamp24-509/+685
- add integration tests that assert the external communication towards other services using Wiremock - remove tests that are asserting getters and setters of objects Issue-ID: AAI-3826 Change-Id: I1f627801869f40cb0eaa61b10148b41bd3b1bdb8 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-11sdc-distribution-client is registered twice in model-loaderFiete Ostkamp3-80/+4
- registration of client was moved into separate config class in last change - however registration in ModelController was not removed Issue-ID: AAI-3824 Change-Id: Icad4211fb245d84fd369c75dd48de7f9a1ec1b20 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-08Model distribution fails with model-loader 1.13.5Fiete Ostkamp10-5/+225
- move sdc-distribution-client instantiation out of the ModelController into a separate class - add integration test with embedded kafka (not fully implemented) Issue-ID: AAI-3818 Change-Id: I0b5dd118d9145372ddf123319b58829d0ef9275a Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-04-05Make rest-client request timeout in model-loader configurableFiete Ostkamp5-19/+34
- this reduces the test execution time, when test cases run into timouts Issue-ID: AAI-3703 Change-Id: Ie683f55e5ce8d59b10d2788aea6933854dcb7e99 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-03-26Use more dependency injection in model-loaderFiete Ostkamp19-234/+182
- use more dependency injection - make class variables final if possible - simplify mock creation in some tests using @Mock Issue-ID: AAI-3811 Change-Id: I7a7ccba02df78e6fd3bf082c23aac0968137661b Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-03-26Refactor model controller in model-loaderFiete Ostkamp4-52/+89
- rename ModelLoaderService to ModelController since it's a @RestController - use dependency injection for depending classes - make class as immutable as possible Issue-ID: AAI-3806 Change-Id: I3b976f2c4ed3dba43e8696eb9f6e0d7575403963 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-02-28Add tracing to model-loaderFiete Ostkamp1-0/+11
Issue-ID: AAI-3789 Change-Id: I7ded82e560e07da74883e6a5d7cc61835470d55c Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2024-02-28Update model-loader to spring-boot 2.4Fiete Ostkamp26-122/+128
- update spring boot from 2.3.12 to 2.4.13 release - migrate JUnit 4 to JUnit 5 - bump version to 1.13.5 Issue-ID: AAI-3788 Change-Id: I280dd09194dfb4c9810c01933fdd18ea7f3d03a9 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
2022-11-16Replace deprecated methods in model-loaderFiete Ostkamp23-37/+66
- junit's assertThat was deprecated in favour of hamcrest - apache-commons now requires a Charset argument Issue-ID: AAI-3604 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I10bf46922e44b3a3adcc14eab6486401a5cf14e1
2022-11-08[SDC-DIST] Upgrade sdc-distro-client to v 2.0.0efiacor8-53/+46
Signed-off-by: efiacor <fiachra.corcoran@est.tech> Issue-ID: DMAAP-1800 Change-Id: Idcfa147dd07a18953972b85f38ec2d46ba3fc009
2022-10-14Fixed AAI ModelLoader fails to connect to aai-babelNiharika Sharma4-32/+68
Issue-ID: AAI-3533 Signed-off-by: Niharika Sharma <niharika.sharma@amdocs.com> Change-Id: I121263b0be39b13109782e0b5db02d3a36650d75
2021-07-29Merge "Fix sonar issues"William Reehil20-41/+55
2021-07-20fix CRITICAL xxe (XML External Entity) issues identified in sonarcloudwr148d1-0/+1
Issue-ID: AAI-3346 Signed-off-by: wr148d <wr148d@att.com> Change-Id: I76532cc11f348f9c267f5cd87e061b139ce4e7e0
2021-07-20Fix sonar issuesSamuel Liard20-41/+55
Issue-ID: AAI-3362 Signed-off-by: sliard <samuel.liard@gmail.com> Change-Id: I46a41146fb69cf99e4bfaedc4a94807b025832af
2021-02-24Update model loader to use java 11Maharajh, Robby (rx2202)2-31/+10
Issue-ID: AAI-3004 Change-Id: I85ab6634bee7cb8c58fdc63cfd15de4b6955681a Signed-off-by: Maharajh, Robby (rx2202) <rx2202@us.att.com>
2021-02-01Allow HTTP with SDCSylvain Desbureaux1-1/+12
New version of SDC client allows to either use https or http. Default version is set to https. We allow here to configure this. Issue-ID: OOM-2670 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I22c21573d99ac4e6eecc9ca78215635e52e98449
2020-06-01Containers should not run as root by defaultwr148d1-2/+11
Issue-ID: AAI-2822 Signed-off-by: wr148d <wr148d@att.com> Change-Id: Ia6fdf7867f0732234506422bc7ed4ed8ebc380fb
2019-08-29Fixed version parsingDmitry Puzikov3-21/+50
Change-Id: Ibd37f998820dd4a77a6c320ce6b1066b06c86f51 Issue-ID: INT-798 Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
2019-08-07Upversion Spring Boot to 2.1.6Lee, Tian (tl5884)4-61/+45
Change-Id: I0e8b3f738777ab106d13fa826f0b40e3392a0f6b Issue-ID: AAI-2539 Signed-off-by: Lee, Tian (tl5884) <tianl@amdocs.com>
2019-04-10Provide the ability to set the truststore properties during model-loader startupPolavarapu, Chaitanya (cp8128)1-0/+15
Issue-ID: AAI-2339 Change-Id: Icb6b35a6bf5bccfd1771a670a0626fe5b0b0cc12 Signed-off-by: Polavarapu, Chaitanya (cp8128) <cp8128@att.com>
2019-03-18Refactor GizmoTranslator.translate()mark.j.leonard3-30/+33
Address Sonar violation for the translate() method throwing multiple types of checked Exception. Add a JUnit test case for this. Change-Id: If3c18460895f8193c7b759da4537aad0a2cbf485 Issue-ID: AAI-2264 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-03-15Fix Sonar bugs in Dublin codemark.j.leonard2-99/+100
Address issues arising from AAI-2089 and AAI-1957. Fix 9 bugs relating to null pointer exceptions. Reduce the calculated complexity of the GizmoTranslator method generateModelElementId() by reimplementing using Streams. Change-Id: Ic7983db1e9364d79ff79deb09552028501bbbf2c Issue-ID: AAI-2264 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-03-14Handle unexpected HTTP return codesed852m2-32/+110
Issue-ID: AAI-2263 Change-Id: I2510b7a2630918ffe17efbbf813c3e43b0b44d34 Signed-off-by: ed852m <ed.dening@amdocs.com>
2019-02-21Add metrics logging for Babel requestsmark.j.leonard3-7/+38
Change-Id: I67492a90b0faac1c60be118be4e25237bd3a780d Issue-ID: AAI-2183 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2019-01-25Allow parsing of properties taken from environmentPopescu, Serban1-32/+43
Property variables starting with ENV: will be retrieved as environment variables Change-Id: I191920078c8aa78dee2327adcca39a0d1e1a89df Issue-ID: AAI-2089 Signed-off-by: Serban Popescu <serban.popescu@amdocs.com>
2019-01-09Added echo service to model-loaderStela Stoykova1-0/+38
Issue-ID: AAI-2060 Change-Id: I19e16b7447f5ef8b7533449b18895c2bc98188d2 Signed-off-by: Stela Stoykova <Stela.Stoykova@amdocs.com>
2018-12-24Fix bug in gixmo interfaceShwetank Dave1-2/+26
Change-Id: I75a6d3fdde11359aa834113c97f9b35a8744e902 Issue-ID: AAI-1957 Signed-off-by: Shwetank Dave <shwetank.dave@amdocs.com>
2018-12-11Handle non-obfuscated configDaniel Silverthorn2-6/+35
Change-Id: I5c57fcc16a93881af5cdf33947967e0d7ef2dd33 Issue-ID: AAI-1997 Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
2018-11-27Fix Sonar code smellsmark.j.leonard12-240/+182
Reformat to ONAP Java standards. Rename GizmoTranslatorTest.java to Test*.java to match the existing naming conventions. Remove duplicated test scaffolding from this file. Change-Id: Ie8d5f7ea113d3d60d6222f66cd6740df7f9afca0 Issue-ID: AAI-1957 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-11-27Configurable option to load models via Gizmosblimkie12-31/+936
Change-Id: I792e1a0db166ccab84f42a2d1beb92d7a630165b Issue-ID: AAI-1957 Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
2018-09-18Remove unused system properties from unit testsLee, Tian (tl5884)2-4/+0
Change-Id: I5d56bf794c69381d03dda277afe4e110791b660a Issue-ID: AAI-1606 Signed-off-by: Lee, Tian (tl5884) <tianl@amdocs.com>
2018-08-17Explicitly initialise the EventCallback classmark.j.leonard4-6/+8
Remove the @Autowired annotation on the Babel Service Client and pass this as a parameter so that Spring will inject the value. This ensures that the EventCallback is not initialised with a null value. Issue-ID: AAI-1501 Change-Id: Ic1a66bf61afec4f707162acf323b83a8a48e8f28 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-06-07Add support for loading VNF Catalog XML filesmark.j.leonard21-226/+1318
Issue-ID: AAI-1214 Change-Id: I5d0eb3456916e6f3e5ba3a9b4e828feaff0cde4e Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-06-06Refactor for Sonar smells and code coveragemark.j.leonard62-920/+1662
Various code formatting and style fixes (to address Sonar code smells). Introduce a BabelServiceClientException to replace the use of the base Exception class. Make both the BabelServiceClient class and its Factory class use an interface, to allow for Spring injection (using annotations) and for simplified mocking. Refactor the Notification Publishing by making this the responsibility of the main Service classes and not the deployment manager. Issue-ID: AAI-1207 Change-Id: I6bf8a504fa7b98e9158c9976fd1d88c6c54027c1 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-06-06Remove deprecated AJSC configurationmark.j.leonard24-666/+0
Issue-ID: AAI-1206 Change-Id: Iffad6eb946bb8c63cf69bd2193d7518e733ea406 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-05-17Fix issue with VNFImage rollbackLee, Tian (tl5884)1-7/+2
Fix issue where VNFImage data UUID is being overwritten, causing rollback failures. Change-Id: I66fd9125f7806c74d80ede6d2f0d4c04d0756cc0 Issue-ID: AAI-1148 Signed-off-by: Lee, Tian (tl5884) <tianl@amdocs.com>
2018-05-01Import Spring Boot Logging base resourcev1.2.0mark.j.leonard1-0/+1
Issue-ID: AAI-1110 Change-Id: Iab0ba2130e1131c938e0c9dbc7ba33cef8db75de Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-04-26Convert project from AJSC to Spring Bootmark.j.leonard76-1524/+2349
Remove all AJSC configuration and dependencies. Update the pom.xml to use oparent and to depend on Spring Boot. Refactor the main class to introduce a minimal set of Spring annotations. Note that the license text was corrected in this change. Issue-ID: AAI-1039 Change-Id: I16385db3216ec39bfd2881f2278e340ec3795199 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
2018-04-18Remove dependency on org.powermock (PowerMockito)mark.j.leonard17-1288/+358
Replace use of PowerMockito packages with the standard Mockito. Create a BabelServiceClient Factory class to simplify mocking. Remove duplicated "no mock" test classes that were not in fact free of mocking. Add a dummy sample CSAR file for testing of artifact downloads. Change-Id: Ib86f560e514e1efab0e2f732e494a032d555c7c3 Issue-ID: AAI-1049 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>