aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp
AgeCommit message (Collapse)AuthorFilesLines
2020-08-24Expose generic Service properties as propertiesandre.schmid1-12/+33
During the Service creation, the properties declared in the Generic Service Type are being parsed to inputs, but not to properties. The change parses the properties also to properties, keeping the previous input logic. Change-Id: I3ceba3adeaab56cd49fc8fbd657b02aa7c93e79b Issue-ID: SDC-3061 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-08-11Fix workflow designer issuexuegao1-0/+1
Fix the issue so that the workflow bpmn will be packed into csar again. Issue-ID: SDC-3181 Signed-off-by: xuegao <xg353y@intl.att.com> Change-Id: I5f8ca112fe1bd2a7abf1529f491400237d88ce56
2020-08-10Revert "Refactor CsarUtils::addInnerComponentsToCSAR"Sébastien Determe3-260/+161
This reverts commit f4165e2af8ae596d574aecae2fcf174420396b2e. Reason for revert: This PR has broken the API tests and the csar generation (csar.meta) is not present anymore. Therefore some components may not be able to open the CSAR with the sdc-tosca libraries We must rollback for now, until a fix is provided Change-Id: I3af8b9f08dd28b6abdb4df9acdcf9ab2623d10e5 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Issue-ID: SDC-3225
2020-08-06Remove needless Getter/Setter testingvasraz1-27/+10
Change-Id: I4802e15a57b01d520e875db295df2eb826b6b5c0 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2708
2020-07-29Config. allowed instances in component compositionandre.schmid3-127/+68
During the creation of Resource and Services components, the allowed types to add in its composition are hard-coded. This change allows those types to be configurable using the configuration.yaml backend file. Change-Id: If48849b57fe5124468db3d55f2f06391348935fb Issue-ID: SDC-3177 Signed-off-by: andre.schmid <andre.schmid@est.tech>
2020-07-12Refactor CsarUtils::addInnerComponentsToCSARFrancis Toth3-161/+260
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I4f9a52950d4d6ffadf9a5cb170c99d229ac83a35 Issue-ID: SDC-2812
2020-07-12Add endpoints for supporting substitution_filteraribeiro3-48/+328
Issue-ID: SDC-3160 Change-Id: Ibc722f283451fecde7655e867654880ae50cc645 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2020-07-09Add support for substitution_filter business logicaribeiro12-621/+1064
Tosca simple YAML profile allows for substitution_filter to be specified for a topology template to provide processing instructions to the orchestrator. Issue-ID: SDC-3147 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: Ia94b8c447d3157e614f9d1524ad4520b3980ba4d
2020-07-05Fix sonar issuessebdet3-105/+95
Fix sonar/checkstyle issues in sdc code Issue-ID: SDC-3158 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I33638b39d39b7e918437cb9f3e0f15d52fa92218
2020-07-05Fix sonar issuessebdet1-39/+52
Fix sonar/checkstyle issues in sdc code Issue-ID: SDC-3158 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I004b0f579ff1f273f39a155217972f5efcdcf5cb
2020-07-05Fix sonar issuessebdet1-44/+40
Fix sonar/checkstyle issues in sdc code Issue-ID: SDC-3158 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I0ae188c5f0e2d96fd94de66fe0dcd0c47bcd9af5
2020-07-05Fix sonar issuessebdet5-150/+110
Fix sonar/checkstyle issues in sdc code Issue-ID: SDC-3116 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: Ic29f9233838e15b195d1a339bfac8e6d56888609
2020-07-05Clean CsarUtils::MainYamlWithDependenciesFrancis Toth5-68/+40
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I593dd7bb6a20445899a14da793e8c550e1e14e09 Issue-ID: SDC-2812
2020-06-24Fix for name clash in csar generationKrupaNagabhushan1-2/+6
Issue-ID: SDC-3144 Change-Id: Ia9b66bb14bbff3add70eed8dfe41acc55c72b35b Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
2020-06-24Add Node Filter Business Logic Unit Testsaribeiro2-23/+22
Issue-ID: SDC-3125 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I80c755f4fffa813396ceb85c6aa7fde5b32590cd
2020-06-21Toggletalio4-54/+241
Add toggling mechanism to catalog side. The first toggleable feature is healing - this was added to healing flow, in healJanusGraphDao Issue-ID: SDC-2874 Signed-off-by: talio <talio@amdocs.com> Change-Id: If386651cab8304ebaf13497ded3a7a50bd60e477 Signed-off-by: talio <talio@amdocs.com>
2020-06-21Add Node Filter Servlets Unit Testsaribeiro3-25/+20
Issue-ID: SDC-3117 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I84e728f21290a59c7674f97d5977b945b93ef546
2020-06-21Add Support for node_filtersaribeiro9-870/+986
Allows for node_filter to be specified for a node template to provide processing instructions to the orchestrator Issue-ID: SDC-3095 Change-Id: I4e496e300552049d9bfd00df878b86d9fb97312b Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
2020-06-18Importing VSP with node_type in separate fileMichaelMorris2-4/+75
Import fails when a node_type referenced in the main template is defined in a separate yaml file in the csar even when that separate file is correctly imported in the main template Change-Id: I6abe074585c2ce592fe9bed7abe76f0856bcfe93 Issue-ID: SDC-2850 Signed-off-by: MichaelMorris <michael.morris@est.tech>
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-17Extract ComponentCache from CsarUtilsFrancis Toth2-70/+203
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 VNFDMichaelMorris1-5/+23
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-2957 Change-Id: I8a385b02568b3bf3d83a250cbe36a7e7f61e710c
2020-06-14Add support for directives on VFCaribeiro1-0/+1
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 Derraugh2-2/+10
- 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 sonar bugssebdet1-70/+66
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-08Make Directive values Tosca compliantaribeiro5-131/+110
Issue-ID: SDC-3079 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: Ie711c61244a4e2d68a96e2814ba2db52e067c6e4
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 handlingvasraz5-75/+177
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.schmid2-3/+67
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-28Fix interface types creationandre.schmid1-20/+64
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-28Extract artifact component belonging logicFrancis Toth2-104/+102
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 generationaribeiro2-17/+41
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-27Refactor CsarUtils::WriteArtifactDefinitionFrancis Toth1-50/+58
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-25Refactor CsarUtil::addInnerComponentsToCSARFrancis Toth1-20/+36
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I7f32d729a96f696c217631cd019105c17cb36a8c Issue-ID: SDC-2812
2020-05-24500 error at WFD artifact-deliveries apiBen David, Elad (eb7504)1-3/+4
Change-Id: I9227387c26b6ee4c68c635b78c4980a9c07b3d35 Issue-ID: SDC-3052 Signed-off-by: Ben David, Elad (eb7504) <eb7504@intl.att.com>
2020-05-21Refactor ArtifactsBusinessLogic::getRelatedComponentInstanceFrancis Toth1-51/+49
This commit aims to refactor the ArtifactsBusinessLogic::getRelatedComponentInstance, and getRelatedComponentComponentInstance. It improves how Either is used, fixes a potential NullPointerException, reduces some duplication along with cyclomatic complexity. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I2503f5e2a697f793e4dcf32d7793f83c4a25ff46 Issue-ID: SDC-2812
2020-05-20Remove wildcard pattern when retrieving componentsFrancis Toth3-40/+71
This commit aims to remove a redundant cast while preparing the field for some Either refactoring in ArtifactsBusinessLogic. The reasons for removing the wildcard pattern are explained in SDC-3040 (a sub-task of SDC-2812). Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I573c01eca56f096ccb54e564d0144291121bde22 Issue-ID: SDC-2812
2020-05-20Refactor ArtifactsBusinessLogic::handleDeleteInternalFrancis Toth1-18/+42
This commit is a first step towards the ArtifactsBusinessLogic::handleDeleteInternal function refactoring. It aims to improve how Either is used, and to reduce its cyclomatic complexity along with some duplications. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I1b476ccc0e0341975b80c10dc79c5dc1592267f4 Issue-ID: SDC-2812
2020-05-19Add null test to ComponentInstanceBusinessLogicChris André1-55/+81
- Added test in `changeInstanceVersion` for null value Issue-ID: SDC-2908 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I42a428c4b245a55b7229e2ec9b781e9af4403662
2020-05-19Refactor ArtifactsBusinessLogic::generateAndSaveToscaArtifactFrancis Toth1-34/+30
This commit aims to make some minor refactoring related to the either used in ArtifactsBusinessLogic::generateAndSaveToscaArtifact. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I4923e014146a17f1cd035db3513359a2ab8f38f2 Issue-ID: SDC-2812
2020-05-18Refactor CsarUtil::extractVfcArtifactFrancis Toth1-35/+49
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: Ica8d17d4f3c763920f406ccb89fb3e464d05eab4 Issue-ID: SDC-2812
2020-05-18Refactor tosca representation retrieval in CsarUtils::populateZipFrancis Toth1-30/+56
This commit aims to simplify CsarUtils::populateZip by extracting how a tosca representation is fetched to another function. this enables to reduce the overall cyclomatic complexity of the function. Some additional work still needs to be done especially regarding the ToscaRepresentation and MainYamlWithDependencies classes (These happen to be really similar). This will be done in another change in the near future. Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I93600d0752565de523cf2285b1fa2ba43a96334f Issue-ID: SDC-2812