summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-06-17Reduce nest statement levelsxuegao1-32/+34
Reduce the if/for/switch/try nest statement levels to less than 3. Issue-ID: SDC-3119 Signed-off-by: xuegao <xg353y@intl.att.com> Change-Id: I60f0c0203db4495c6e10127114acdb8586867b14 Signed-off-by: xuegao <xg353y@intl.att.com>
2020-06-17Refactor ArtifactsBusinessLogic::getUpdatedGroupInstancesFrancis Toth1-23/+20
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I6d62c1f916aa820f84328d25d2afbc7470397b0d Issue-ID: SDC-2961
2020-06-17Reduce nest statement levelsxuegao1-10/+11
Reduce the if/for/switch/try nest statement levels to less than 3. Issue-ID: SDC-3118 Signed-off-by: xuegao <xg353y@intl.att.com> Change-Id: I490e66a807a0a8508b7e3c1da332546f2ced3005
2020-06-17Extract ComponentCache from CsarUtilsFrancis Toth4-89/+306
This commit aims to decouple the component caching logic from CsarUtils to its own class. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: Ia7e9284639ec8cd87ca5107e12f295e2eb599768 Issue-ID: SDC-2812
2020-06-17Support the substitution_mappings in the VNFDMichaelMorris3-10/+44
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-2957 Change-Id: I8a385b02568b3bf3d83a250cbe36a7e7f61e710c
2020-06-16Fix Sonar issuesChrisC2-24/+28
Hide implicit public constructor in utility class Issue-ID: SDC-3116 Signed-off-by: ChrisC <christophe.closset@intl.att.com> Change-Id: I4edd2ac37aab2fd587b5d46391dd669181385748
2020-06-16add information on the containers based on what is available in the wikiJulienBe1-2/+80
Issue-ID: SDC-2449 Change-Id: I740a14623161e051399f03d1788ae8a2605c1076 Signed-off-by: JulienBe <julien.bertozzi@intl.att.com>
2020-06-16Manifest is optional in ETSI SOL004 manifestMichaelMorris2-1/+60
SOL004MetaDirectoryValidtor enforces all files contained in an ETSI SOL004 CSAR are included in the manifest file, however the manifest itself is not mandatory to include in the manifest Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3057 Change-Id: I460071ecbd21578edb0603f600da0ac1ea877539
2020-06-15Add some unit testsSatoshi Fujii1-151/+403
This change added some unit tests for ComponentInstanceBusinessLogic to increase test coverage and removed unused variables for better readability. Also the test class was rewritten to use JUnit 5. Change-Id: I519976d00d8eccc194f8f1168d45f95392808652 Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: SDC-2885
2020-06-15Onboard TOSCA data_types defined in packageandre.schmid13-162/+329
Onboard TOSCA data_types defined in a CSAR package that does not exists in the SDC default data_types library. Those data_types were being lost. All data_types declared in the package will be included in the "GlobalSubstitutionServiceTemplate". This includes the data_types declared in the main topology template and in its imported definition files. Defines a maven profile to compile the catalog-be in the main SDC pom. Change-Id: I39445b0f42e924dc1015945b7e605e804c1d505b Issue-ID: SDC-2763 Signed-off-by: André Schmid <andre.schmid@est.tech> Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
2020-06-15Fix 'not running Junit5 tests'-issuevasraz3-0/+19
Change-Id: Iee67a4af7262e554a86252b411264f55ff1baa88 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3109
2020-06-15Fix Critical security vulnerabilityvasraz16-31/+252
com.fasterxml.jackson.core : jackson-databind : 2.9.9 Change-Id: I81af7879cb1fbcd158177a3dc220b704ff2f3388 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3111
2020-06-15Fix bug in UpdateIsVnfMenuxuegao1-2/+2
Fix the unboxing bug reported by Sonar. Issue-ID: SDC-3112 Signed-off-by: xuegao <xg353y@intl.att.com> Change-Id: I4ed3f9a48ad21af2f9f67872791df2796c4e4ad1
2020-06-14Use dummy info for distribution-engineOfir Sonsino1-11/+10
Change-Id: I7679e0ed8ce4c4217cf6c5f4a646fe06cf32372d Issue-ID: SDC-3115 Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
2020-06-14Fix Doc warningsChrisC2-16/+16
Fix some RST warnings and rendering issues Issue-ID: SDC-1357 Signed-off-by: ChrisC <christophe.closset@intl.att.com> Change-Id: I142085dcdbbaf8f1a3de27680548e2c37d0a099e
2020-06-14Add support for directives on VFCaribeiro23-116/+249
This change also updates the directives values according to Tosca 1.3 spec Issue-ID: SDC-3074 Change-Id: Ia6a68c9a23a71a2c17ba2c006990342811aa7b4e Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2020-06-11Rewrite of `updateArtifactOnInterfaceOperationByResourceUUID` to remove NPEChris André1-24/+25
Issue-ID: SDC-2978 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I60942ab1767bf65c806ce796ca62365396b20d93
2020-06-10Set properties on XML parsers to prevent XXE attackNeil Derraugh3-2/+14
- Set ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_SCHEMA properties on XML parsers to prevent XXE attacks Issue-ID: SDC-3106 Signed-off-by: Neil Derraugh <neil.derraugh@yoppworks.com> Change-Id: If4e835858dd3d718d37b3ee41fb2fd0c94574c24
2020-06-10Fix security issue in SecurityUtilNeil Derraugh6-30/+42
- Specified mode and padding to address risky algorithm - Corrected unit test for different exception message - Moved tests to package Issue-ID: SDC-3105 Signed-off-by: Neil Derraugh <neil.derraugh@yoppworks.com> Change-Id: I5773ab555a5468362c775cf99795df4eb8c52136
2020-06-10Java 11 migration - 'test-apis-ci'Rodrigo Lima1-14/+4
- Removed references to protected packages (sun.net.*) Issue-ID: SDC-3037 Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com> Change-Id: Ibbf25af390e624e15fb2bc8ea17777056fe5f3b5
2020-06-10Fix sonar bugssebdet2-71/+67
Fix all sonar bugs reported in SwitchoverDetector class + fix all checkstyle issues Issue-ID: SDC-2931 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: Ic86a3526fc7030e10a61b150058c04a391c40c7b
2020-06-10class passed to MdcLogger() is compared by nameJulienBe2-1/+63
Issue-ID: SDC-3098 Signed-off-by: JulienBe <julien.bertozzi@intl.att.com> Change-Id: I8b61218d1164a0ebff7f290ac82f1cdd67a5152a
2020-06-10Support setting SDC-BE configuration at deployment timevasraz3-6/+11
Change-Id: I4b384bc911630d6041a0c5c235d3aaf3ac148090 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3076
2020-06-10Add build config in READMEsebdet1-1/+3
Add a required step to build the project, the oparent settings.xml must be installed first in .m2 Issue-ID: SDC-2871 Change-Id: Id69582582849a8937f4e76d24d6a6bfdc8f0a957 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
2020-06-08Make Directive values Tosca compliantaribeiro7-148/+128
Issue-ID: SDC-3079 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: Ie711c61244a4e2d68a96e2814ba2db52e067c6e4
2020-06-03Rewrite of `certifyToscaElement` to remove NPEChris André1-42/+77
- Modularized `certifyToscaElement` in smaller, less complex methods (`handleRelationsBeforeCertifyingAndProcessClone`, `cloneToscaElementAndHandleRelations`, `handleRelationsOfNewestCertifiedToscaElementAndReturn` & `logDebugMessageAndReturnStorageOperationStatus`) - Removed potential NPE flagged by Sonar in `certifyToscaElement` Issue-ID: SDC-2966 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: Id65871cbfd611abdcc878e61c1541f01ff972828
2020-06-03Refactor method 'undoCheckout' to simplify it and remove potential NPEChris André1-44/+70
- Extracted methods 'retrieveAndUpdatePreviousVersion' and 'updateEdgeToCatalogRootAndReturnPreVersionElement' from 'undoCheckout' Issue-ID: SDC-2965 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I52faffdaf2e99a9de8c2e566da26a5be6e7fd667
2020-06-02ArtifactsBusinessLogic refactor to remove NullPointerExceptionChris André1-3/+11
- Reformatted `downloadResourceInstanceArtifactByUUIDs` - Fixed Sonar-related warning regarding a NPE in `validateInput` Issue-ID: SDC-2979 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I5a62daabcc436f28fba1f09317c5723281df15bf
2020-06-02Add constraints structure to ToscaPropertyandre.schmid3-47/+109
Add constraints structure to ToscaProperty and implements the valid_values property. Change-Id: Id69581582839a8937f0c76c24d6a6bfcc7f0a957 Issue-ID: SDC-3084 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-06-02Refactor CsarUtils::writeComponentInterfaceFrancis Toth3-13/+150
This commit aims to decouple the zip file writing logic from the CsarUtils::writeComponentInterface function. This should provide a higher level of testability and maintenance thanks to inversion of control. An extra helper has also been added to help the migration from the FJ library to VAVR. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I4f2df4749cae3082906a80acc39045ac8887ec39 Issue-ID: SDC-2812
2020-06-01Remove boolean entries in TOSCA MetadataMichaelMorris1-6/+6
Change-Id: I0101bbe35656b4c7d7405429d95939b892e85402 Issue-ID: SDC-2876 Signed-off-by: MichaelMorris <michael.morris@est.tech>
2020-06-01Add interface inputs handlingvasraz6-76/+178
Enables interface inputs specified in a node_type to be imported and included in the generated csar Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: Ia3acaad50b4091831d0c0471b07ba2b2e9bd380d Issue-ID: SDC-3077
2020-06-01Plugin to customize prop. during Service creationandre.schmid3-21/+118
Creates an entry point to customize properties of a Service Component before its creation. Change-Id: I102a70b37eec498dd9c6df009c38da57d0e5b17f Issue-ID: SDC-3062 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-05-28Finalize Documentation R6Ofir Sonsino1-3/+3
Change-Id: I66837d0b314c1a529bd6ca2e29c9527899286c6f Issue-ID: SDC-2949 Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
2020-05-28Fix interface types creationandre.schmid7-35/+218
Interface types creation logic was not interpreting some allowed TOSCA entries, that, when declared, were breaking the interface type creation. Every entry under the interface type was being considered as an interface operation, but it is possible to have "derived_from", "version", "metadata" and "description". Also it is not considering the Interface Type entries "inputs", "operations" and "notifications". Another thing is that TOSCA 1.3 changes the way operations should be declared, deprecating the previous way. Now there should be an entry "operations" with the operations entries under it, instead of having the operations entries direct under the interface type. The change allows both types, following the TOSCA rule: if operations entry is not present, then the deprecated way is considered. Change-Id: I13218bda60b29d19b9c5565cbfd63ae3250a78bf Issue-ID: SDC-3075 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-05-28Entry points in ToscaExportHandler for plugin useandre.schmid1-2/+2
Open the access for two methods in ToscaExportHandler so they can be called in a CsarEntryGenerator plugin. Change-Id: I0ee1daab348c0fc85db56428369a5ec190cb0101 Issue-ID: SDC-3083 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-05-28Encapsulate ReportManager's failedVerticesPerTask and resultsPerVertex in ReportFrancis Toth22-113/+197
This commit aims to encapsulate the static fields failedVerticesPerTask and resultsPerVertex in their own class (called Report). In the short terms, any state needing to be passed around will be stored there. Unfortunately, this commit required many minor changes in functions signature (to pass the Report instance). Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I3756d9a939cbd0f2856be72aa2bd24a3980dde49 Issue-ID: SDC-2499
2020-05-28Extract artifact component belonging logicFrancis Toth5-119/+417
This commit extracts checkArtifactInComponent and checkArtifactInResourceInstance from ArtifactsBusinessLogic. Tests have been added along with a some utility functions designed to generate randomized test data. The former tests were deleted as they were not doing any assertions. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I1b27c55d064cf4e9a40cd7b152e7ea6032a09276 Issue-ID: SDC-2961
2020-05-28Allow global types generationaribeiro8-31/+234
This change allows to configure which global type file will be added to the generated CSAR Issue-ID: SDC-3021 Change-Id: I83c0c3f317c4a4e5e8dbf22cb3dbd47e63562d3a Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2020-05-27Revert "Java 11 migration: fixing problems on 'catalog-fe'"aribeiro2-3/+8
This reverts commit 50906f4dcd00b0162298d1f86d72dcfc4d3caee9. Issue-ID: SDC-3088 Change-Id: I13c48243b3a137c7e66da1ef217a0ecbbd55f216 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2020-05-27Refactor CsarUtils::WriteArtifactDefinitionFrancis Toth4-70/+73
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I167a05d8fbc2085a3e25eeb5bfd6b30f0e80462e Issue-ID: SDC-2812
2020-05-27Add ArtifactsBusinessLogic::fetchLatestComponentMetadataFrancis Toth1-43/+47
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: Ibb8621a91551a2e4ffcac1145f85ed7983063d02 Issue-ID: SDC-2812
2020-05-27Work on unchecked Optional accessChris André1-21/+58
- extract code to static methods - throw an explicit exception now if element not found Issue-ID: SDC-2987 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I693bb53059b056235b567ac1f9f752a33512505a
2020-05-26Fix for locked componentaribeiro2-13/+22
After add, update or remove node_filter the component was left locked on SDC Issue-ID: SDC-3072 Change-Id: I27058760704bd6261619946becda3612a6386432 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2020-05-26Fix wrong tests directory structurevasraz6-0/+0
Change-Id: I0538e5ad56c9a77a0e9cb40d629739e979b67495 Issue-ID: SDC-3073 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
2020-05-26Java 11 migration: fixing problem on 'openecomp-tosca-converter-core'Chris André1-2/+2
- Explicitely indicate the type associated with 'Collection' Issue-ID: SDC-3030 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I557eb205598c337b75b06a2c7d705276aeb543a1
2020-05-25Java 11 migration: fixing problems on 'catalog-fe'Chris André2-8/+3
- Upgrade `jersey-bom` version variable to the most recent stable one - Removed `jersey-common` version variable and replaced its references with `jersey-bom` Issue-ID: SDC-3036 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I414e3814d6d4fc1d927b302efb5dd08659676dc2
2020-05-25Refactor CsarUtil::addInnerComponentsToCSARFrancis Toth1-20/+36
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I7f32d729a96f696c217631cd019105c17cb36a8c Issue-ID: SDC-2812
2020-05-24Support setting SDC-BE configuration at deployment timevasraz2-76/+77
Change-Id: Id1ebcb01d81b8e0cd681dcb304aa77bb3248d69c Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3076
2020-05-24Fix potential NullPointer in SchemaFileImportandre.schmid1-10/+17
While reading the YAML to import, if the content was missing the entry node_types it was causing a NullPointerException. Also the exception was being suppressed, making very difficult to understand what happened. Change-Id: I44badbee1c739ddf6db08b4e518adb33c430fa84 Issue-ID: SDC-3070 Signed-off-by: andre.schmid <andre.schmid@est.tech>