aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp
AgeCommit message (Collapse)AuthorFilesLines
2020-05-12Remove unused ArtifactsBusinessLogic::updateArtifactsFlowForInterfaceOperationsFrancis Toth1-63/+0
This commit deletes the ArtifactsBusinessLogic::updateArtifactsFlowForInterfaceOperations function as it is no longer used anywhere. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I1dd950930485fc83bb02c889dafc5461192accbc Issue-ID: SDC-2812
2020-05-11Refactor CsarUtil::writeComponentInterfaceFrancis Toth1-18/+22
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I6a40119540c18469db44e218984b4d4b92d3f4af Issue-ID: SDC-2812
2020-05-11Refactor ArtifactsBusinessLogic::generateToscaArtifactFrancis Toth1-35/+55
This commit aims to refactor how Either is used in ArtifactsBusinessLogic::generateToscaArtifact. In order to keep the refactoring relatively small, we evalute its result at the call site. Change-Id: I669b30b44e9c69d1b3968fd719c5340b2dff83f5 Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Issue-ID: SDC-2812
2020-05-10Refactor to remove false positives from SonarChris André1-47/+86
- change `updateResourceInstancesNames` to account for case where `preparedResource` is null - change `findInputByName` to return an Either<InputDefinition, RuntimeException> in order to make exceptions explicit - create `rollbackWithEither` (+ tests) to make exceptions more explicit Issue-ID: SDC-2992 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I487994a3f9e88b0a2b14d2679c3587d85d8aa12d
2020-05-10Refactor ArtifactsBusinessLogic::handleDelete and ↵Francis Toth4-49/+47
ArtifactsBusinessLogic::deleteArtifactByInterface Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I89f12c70f388375ed13554edf62bf6a442c9036a Issue-ID: SDC-2812
2020-05-10Moved ArtifactsBusinessLogic::buildJsonStringForCsarVfcArtifact to JsonUtilsFrancis Toth2-16/+53
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: Ia3bb9fe9f97e1759e4e5b70eb5e5396ed87d716d Issue-ID: SDC-2961
2020-05-08Refactor CsarUtil::addComponentToCacheFrancis Toth1-17/+40
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: Ib78be78780a97c873e710d805dd26273159d5354 Issue-ID: SDC-2812
2020-05-07Support functions in TOSCA Simple Profile in YAMLvasraz8-8/+8
This commit aim to generalize usage of ToscaFunctions enum Change-Id: Iab3529e101f75db5f856778334a852afb532cdb6 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2982
2020-05-06fix bug - Error 500 while adding an OperationYuli Shlosberg1-5/+0
Change-Id: I7def95b3688877acbc9332cf4174c9d92226f2e2 Issue-ID: SDC-2953 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
2020-05-06fix bug - Unable to link CSAR artifactYuli Shlosberg1-4/+10
Change-Id: I586637f988b84b3b858e2c8d567c6844be38322b Issue-ID: SDC-2972 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
2020-05-06Handle null case in `addCalculatedCapabilitiesWithPropertiesToComponent`Chris André1-6/+15
- Change code to handle a null value for `groupDefinitions` as if it was an empty List Issue-ID: SDC-2910 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I5fca0ab76886e5f6a73a8f05ec35d38848f96dd8
2020-05-05Add tests for the presence of Optional valuesChris André1-14/+24
Issue-ID: SDC-3012 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I56cbf7fb5bd04ad2fbc496231d6abe72066124fe
2020-05-05Remove call to `get` on Optional variablesChris André1-12/+21
- Made multiple variables Optional Issue-ID: SDC-2991 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: If3dbfd37e933d10698ad1a93b6762c84e30f69b8
2020-05-05Refactor CsarUtil::getLatestSchemaFilesFromCassandraFrancis Toth1-16/+31
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I3f96d76a07fd32bdbd8b59beb5409eab0b0f3aa8 Issue-ID: SDC-2812
2020-05-05Refactor CsarUtil::getFromCassandraFrancis Toth1-11/+6
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I510d1d7fb4f4a7d7152fd5ea6d4d5ff61deea23a Issue-ID: SDC-2812
2020-05-05Refactor CsarUtils::collectComponentTypeArtifactsFrancis Toth1-14/+22
This commit is a minor refactoring required to refactor CsarUtils::collectComponentInstanceArtifacts. In order to keep this commit small, we only focused CsarUtils::collectComponentTypeArtifacts, and removed any output that is not reflected by the function's result type. Modifying an argument is a actually a bad practice as explained in Clean Code by Robert Martin (cf. "Output arguments should be avoided"). This commit aims to enforce this aspect. Change-Id: Ice4d6c9a78e7706c639dd60bc272253e298bc7be Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Issue-ID: SDC-2812
2020-05-03Refactor CsarUtils::createCsarFrancis Toth1-7/+6
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I41994c98515844030eed1d6f2756c9779e864cff Issue-ID: SDC-2812
2020-05-03Extract ArtifactOperationInfo from ArtifactsBusinessLogicFrancis Toth8-68/+124
This commit only intends to extract the inner static class ArtifactOperationInfo from the ArtifactsBusinessLogic class. In addition, getters have been added to get the artifactOperationEnum field's state (this allowed to reduce some boilerplate). Change-Id: Ib79a75893ef11ba0d25e0578d7e95f60284589d0 Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Issue-ID: SDC-2961
2020-05-03Refactor CsarUtils::validateNonMetaArtifactFrancis Toth1-20/+22
This commit aims to refactor the CsarUtils::validateNonMetaArtifact function and make it up to standards regarding how fj.Either should be used. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: Icadfce7229839e53bd09926b6865f2872c39d1a5 Issue-ID: SDC-2812
2020-04-30Replace call to `get` with a call to `ifPresent`Chris André1-3/+6
Issue-ID: SDC-2989 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I7fe273d869035f8852dbc398de60cc49dec2ce6e
2020-04-28Handle null case in `GroupVersionUpdater`Chris André1-13/+25
- change in the final condition of `isGenerateGroupUUID` - Added tests related to modified code Issue-ID: SDC-2913 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I22738f9f4922467209a16a4d6b3b78d7bfac11c9
2020-04-28Refactor CsarUtils::getEntryDataFrancis Toth1-20/+18
Change-Id: I1732ae05cfbe93c1bef8c249e16088a0cad34106 Issue-ID: SDC-2812 Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
2020-04-28Refactor CsarUtils::populateZipFrancis Toth1-30/+55
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I136ebda0ff92d6c42368f102ccf2b10f37524808 Issue-ID: SDC-2812
2020-04-27Add null test to ComponentBusinessLogicChris André1-13/+14
- Added test in `getFilteredComponentInstanceProperties` for null value - Removed nested `if` statements in `isMatchingComplexPropertyByRecursively` Issue-ID: SDC-2907 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I13a47b0dfe7aa6dec845a856c58bba8be5c1eead
2020-04-26Fix potential NPE in ArtifactsBusinessLogicandre.schmid1-8/+15
Fixes potential NPE in ArtifactsBusinessLogic introduced by SDC-2754. Change-Id: If53915ffc41ddd0dbcf00ea318cdae6f1b5471ad Issue-ID: SDC-2959 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-04-23Minor cleanups for BasicAuthenticationFilterChris André1-17/+17
- Changed String representing encoding to Java's StandardCharsets.UTF_8 - Added explicit else condition in order to not rely on `abortWith`'s side effects Issue-ID: SDC-2917 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I81cb94c399ff1d810e85c7b63fde195928ab1b08
2020-04-23Add null testsChris André1-15/+16
- Change `isPropertiesListSizesNotEquals` to `isPropertiesListSizesEquals` - Added assertions to silence SonarCloud Issue-ID: SDC-2914 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I88003de54aea6c28575fecf0f41b4c5ef36ef154
2020-04-23Fix null pointer exception warningsRodrigo Lima1-33/+48
Issue-ID: SDC-2911 Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com> Change-Id: Ic7f0ef631ed98e8baf2ea32b6bfc56a7142738f8
2020-04-22Fix bug for class SwitchoverDetectorReo Inoue1-1/+1
Signed-off-by: Reo Inoue <inoue.reo@jp.fujitsu.com> Issue-ID: SDC-2931 Change-Id: I6b40f538ff9ce7eed22ce71c542b188a8c866f26
2020-04-22Add null test to DistributionMonitoringBusinessLogicChris André1-3/+12
- Added test in `handleAuditingDaoResponse` for null value related to `resAuditingGenericEvent` Issue-ID: SDC-2909 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I422629cdbd4f05e10609cd78b7328c4e9f45538b
2020-04-22Handle null condition in ResourceImportManagerRodrigo Lima1-6/+7
- check if parentResource null in methods setRequirements and setCapabilities Issue-ID: SDC-2912 Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com> Change-Id: I1ea5a8cf26e3883b5d26fb970bc0abc4cbf1ee9a
2020-04-22Add null test to test in `UpgradeBusinessLogic`Chris André1-2/+2
Issue-ID: SDC-2915 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I4e6f27b707b1bdbbecf9a97606c9a655d834fe56
2020-04-22Add null tests in `createComponentExternal`Chris André1-3/+3
Issue-ID: SDC-2916 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: Ieb0a79c8d3a891a08cd758e1a4ebab7679166476
2020-04-19Configure a new Artifact Typeandre.schmid12-694/+502
Centralizes artifact configuration in one yaml entry. Allow the configuration of a new artifact type without the need of code changes. The configuration file now is used as a source of artifacts types instead the artifact type enum. The enum will be used as a source of base artifact types and also in hard coded business rules. Change-Id: Id0383d9fca9bce0519a4d52a4ecb3a68c8713f0f Issue-ID: SDC-2754 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-04-19Fix GAB problem in ui-ci testsandre.schmid1-0/+2
Generic Artifact Browser is failing in tests due mainly to a removal of the default constructor in GAB class. Change-Id: Id10b8d8d81c224e2658002b9c928e8aef7ca8e32 Issue-ID: SDC-2903 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-04-02Increase test coveragevasraz1-1/+1
Change-Id: I0c8ddfb32ae7abc6443007fc5cee72bec6da785b Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2833
2020-04-01Tests added to increase coverageDmitry Puzikov3-86/+23
Change-Id: I16a729385647cb691fb7c94bd8f26a3c19b1b99d Issue-ID: SDC-2861 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
2020-03-31Add 'required in runtime' for service inputsSatoshi Fujii1-4/+11
User may want to set required to true for some inputs so that make sure those input values are given at service instantiation time. By this change 'required in runtime' column is introduced into service inputs table in Properties Assignment screen and user can select required true/false for each input. Change-Id: I0d676d2d20e02c975d51c7f4d2bb63c699743d66 Issue-ID: SDC-2659 Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com>
2020-03-30Increase test coveragevasraz1-2/+2
Change-Id: Ibc6134e5954537258541ff018dc9794191d4e907 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2833
2020-03-30Fix unit testsDmitry Puzikov25-732/+147
Added asserts where required, add tests. Replaced getters-setters with Lombok annotations. Fixed incorect SUT in the tests. Removed default constructors used only for tests. Change-Id: I9be29d9c0d891039952178a3c3e1c3a2062d1382 Issue-ID: SDC-2856 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
2020-03-26Increase test coveragevasraz1-1/+1
Change-Id: I90606d768c55ad13aa9df62bc4d3f533206db1bc Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2833
2020-03-25Fix unit testsDmitry Puzikov1-13/+5
Add asserts where required, fix tiny issues. Replace getters-setters with Lombok annotations. Change-Id: Icb1a20f400fd8732a3d0ae23b8fe88bc693df1f5 Issue-ID: SDC-2853 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
2020-03-24Import of VFC will maintain interface implementationsMichaelMorris4-10/+103
Issue-ID: SDC-2772 Signed-off-by: MichaelMorris <michael.morris@est.tech> Change-Id: Id387ebd67ff0b136d532df70fe8b2b8760edc433
2020-03-24Fixed updating VFCk.kedron1-5/+8
Added checking that newProperty.path isn't null. Also added refreshing the returned property from the backend. Issue-ID: SDC-2800 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I82449d04f3151b5233cd99fb919b47f6d05a83fa
2020-03-24Fix unit testsDmitry Puzikov9-370/+48
Add asserts where required, fix tiny issues. Replace DTO getters-setters with Lombok anntations. Change-Id: I77c7ff2b1b536e357910ab1820ff27e03a16967a Issue-ID: SDC-2849 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
2020-03-22Add support for simple yaml profile 1.2vasraz3-13/+41
Change-Id: I735d25c6b6c3344c4b742f09b3aeaf4d03c2d17c Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2738
2020-03-22Include derived_from types in generated csararibeiro2-95/+275
Issue-ID: SDC-2775 Change-Id: I7b90ff78c389e5680cacafda2065669f6baf1735 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2020-03-20Fix unit testsDmitry Puzikov5-81/+23
Add asserts where required, fix tiny issues. Replaced getters-setters with Lombok annotations. Change-Id: I9d75c871870fffe82876e14dd2eb9d3585ecb916 Issue-ID: SDC-2708 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
2020-03-16Fix SDC-BE SwaggerDmitry Puzikov44-1309/+1395
General reorganisation of APIs rendering done. Fixed mix of swagger.v2 and new swagger.v3 conflicting annotatons. Moved to newer version of swagger-ui. Removed unused/inconsistent parts of pom.xml. Change-Id: Id1356b766caff6bf5817768c1a0f9b80541b85e8 Issue-ID: SDC-2718 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
2020-03-16Fix broken unit tests in catalog-bevasraz2-9/+1
Change-Id: I9a90a219a6eaec832660e01a359f034060e803c3 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2783