sdc.git
4 years agoRemove unused ArtifactsBusinessLogic::updateArtifactsFlowForInterfaceOperations 00/107500/3
Francis Toth [Mon, 11 May 2020 20:09:38 +0000 (16:09 -0400)]
Remove unused ArtifactsBusinessLogic::updateArtifactsFlowForInterfaceOperations

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

4 years agoRemove outputFullFilePath from ValidationConfigManager 98/106798/5
Francis Toth [Mon, 20 Apr 2020 00:55:37 +0000 (20:55 -0400)]
Remove outputFullFilePath from ValidationConfigManager

This commit aims to extract the outputFullFilePath field from ValidationConfigManager in order to improve testability. This commit contains multiple minor modifications resulting from bubbling up the outputFullFilePath static field to where it is actually set. Most of the modifications result from changing the signature of the functions which formerly relied on ValidationConfigManager.getOutputFullFilePath.

Change-Id: I0a28e527cabe606de8af62b8dcbc4b4e70db98ed
Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Issue-ID: SDC-2499

4 years agoFix security issues in SecurityUtil 51/107251/3
Neil Derraugh [Wed, 6 May 2020 15:28:39 +0000 (11:28 -0400)]
Fix security issues in SecurityUtil

- Removed hard coded key
- Specified mode and padding to address risky algorithm

Issue-ID: SDC-3017
Signed-off-by: Neil Derraugh <neil.derraugh@yoppworks.com>
Change-Id: I6c21174003fcb5669de49158d8dd6bf9907f50c6

4 years agoRefactor CsarUtil::writeComponentInterface 79/106979/4
Francis Toth [Fri, 1 May 2020 14:23:18 +0000 (10:23 -0400)]
Refactor CsarUtil::writeComponentInterface

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I6a40119540c18469db44e218984b4d4b92d3f4af
Issue-ID: SDC-2812

4 years agoRefactor ArtifactsBusinessLogic::generateToscaArtifact 35/107035/4
Francis Toth [Mon, 4 May 2020 12:14:51 +0000 (08:14 -0400)]
Refactor ArtifactsBusinessLogic::generateToscaArtifact

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

4 years agoRefactor to remove false positives from Sonar 52/106952/2
Chris André [Thu, 30 Apr 2020 19:41:41 +0000 (15:41 -0400)]
Refactor to remove false positives from Sonar

- 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

4 years agoRefactor ArtifactsBusinessLogic::handleDelete and ArtifactsBusinessLogic::deleteArtif... 86/107386/3
Francis Toth [Fri, 8 May 2020 12:17:33 +0000 (08:17 -0400)]
Refactor ArtifactsBusinessLogic::handleDelete and ArtifactsBusinessLogic::deleteArtifactByInterface

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I89f12c70f388375ed13554edf62bf6a442c9036a
Issue-ID: SDC-2812

4 years agoAllow any extension to WORKFLOW artifact type 42/107242/2
andre.schmid [Tue, 5 May 2020 11:45:33 +0000 (12:45 +0100)]
Allow any extension to WORKFLOW artifact type

Allow any extension to WORKFLOW artifact as it was before
the artifact type configuration change SDC-2754.

Change-Id: I6c497cd83e36fe4df0cc800b9301010c22aa79f7
Issue-ID: SDC-3019
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoRemove powermock from ComponentProcessesImplTest 56/107356/2
Rodrigo Lima [Thu, 7 May 2020 17:50:44 +0000 (13:50 -0400)]
Remove powermock from ComponentProcessesImplTest

- Remove powermock from ComponentProcessesImplTest and add new constructor to ComponentProcessesImpl

Issue-ID: SDC-3042
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I1766371a42a65d6b11c9b7b6783a312db2ed723e

4 years agoRemove powermock from NicsImplTest 62/107362/2
Rodrigo Lima [Thu, 7 May 2020 19:03:58 +0000 (15:03 -0400)]
Remove powermock from NicsImplTest

- Remove powermock from NicsImplTest and add new constructor to NicsImpl

Issue-ID: SDC-3043
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: Iec9343a403278f7db41d1654960c1060c3e75a99

4 years agoRemove powermock from ImagesImplTest 77/107277/2
Rodrigo Lima [Wed, 6 May 2020 21:52:15 +0000 (17:52 -0400)]
Remove powermock from ImagesImplTest

- Remove powermock from ImagesImplTest and add new constructor to ImagesImpl

Issue-ID: SDC-3038
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I6439a90a71d9de94c2233f8b64fed9da4860dd2e

4 years agoRemove powermock from ComponentDependenciesImplTest 61/107261/2
Rodrigo Lima [Wed, 6 May 2020 17:18:09 +0000 (13:18 -0400)]
Remove powermock from ComponentDependenciesImplTest

- Remove powermock from ComponentDependenciesImplTest and add new constructor to ComponentDependenciesImpl

Issue-ID: SDC-3027
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I045e268230d94d4f52c4b85069eddade7678edee

4 years agoRemove porwermock from ComponentImplTest 47/107247/2
Rodrigo Lima [Wed, 6 May 2020 14:35:01 +0000 (10:35 -0400)]
Remove porwermock from ComponentImplTest

- Remove power mock from ComponentImplTest
- Add new constructor to ComponentsImpl

Issue-ID: SDC-3026
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I919fdb55990d813f4ac2950e3950b28e4686acbc

4 years agoRemove powermock from ComponentMonitoringUploadsImplTest 56/107156/2
Rodrigo Lima [Tue, 5 May 2020 20:21:45 +0000 (16:21 -0400)]
Remove powermock from ComponentMonitoringUploadsImplTest

- Remove powermock from ComponentMonitoringUploadsImplTest.
- Add new constructor to ComponentMonitoringUploadsImpl.

Issue-ID: SDC-3024
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: Ic8583db9c459c4d39258129a3b70cc108b30d7de

4 years agoMoved ArtifactsBusinessLogic::buildJsonStringForCsarVfcArtifact to JsonUtils 87/107387/2
Francis Toth [Fri, 8 May 2020 12:27:25 +0000 (08:27 -0400)]
Moved ArtifactsBusinessLogic::buildJsonStringForCsarVfcArtifact to JsonUtils

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: Ia3bb9fe9f97e1759e4e5b70eb5e5396ed87d716d
Issue-ID: SDC-2961

4 years agoRemove powermock from ComputeImplTest 97/107397/2
Rodrigo Lima [Fri, 8 May 2020 17:30:55 +0000 (13:30 -0400)]
Remove powermock from ComputeImplTest

- Remove powermock from ComputeImplTest and add new constructor to ComputeImpl

Issue-ID: SDC-3046
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: Idf3e67c52f1d65e059bbcfcda5a477e2398b0a3e

4 years agoRemove powermock from DeploymentFlavorsImplTest 15/107415/1
Rodrigo Lima [Fri, 8 May 2020 23:43:55 +0000 (19:43 -0400)]
Remove powermock from DeploymentFlavorsImplTest

- Remove powermock from DeploymentFlavorsImplTest and add new constructor to DeploymentFlavorsImpl

Issue-ID: SDC-3050
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: Ib66937932c58c684de5e6a65fbcfb251c0b55c8e

4 years agoRefactor CsarUtil::addComponentToCache 57/106857/6
Francis Toth [Wed, 29 Apr 2020 15:41:08 +0000 (11:41 -0400)]
Refactor CsarUtil::addComponentToCache

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: Ib78be78780a97c873e710d805dd26273159d5354
Issue-ID: SDC-2812

4 years agoClean normatives file during mvn clean 09/107309/2
andre.schmid [Thu, 7 May 2020 08:15:56 +0000 (09:15 +0100)]
Clean normatives file during mvn clean

The configuration to clean the normatives.tar.gz was incorrect,
so the file was not being cleaned up during mvn clean, which
could create an inconsistent sdc-backend-init docker image.

Change-Id: I15e3f4c49f404c147532c88c50f131cb61aea9c0
Issue-ID: SDC-3041
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoReduce scope from 'compile' to 'test' for 'junit-vintage-engine' 80/107280/2
vasraz [Wed, 6 May 2020 22:57:53 +0000 (23:57 +0100)]
Reduce scope from 'compile' to 'test' for 'junit-vintage-engine'

Change-Id: I39b0be6ba6650c9a7215acf359f3d74e0a24e553
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2844
Issue-ID: SDC-2983

4 years agoSupport functions in TOSCA Simple Profile in YAML 60/106660/3
vasraz [Fri, 24 Apr 2020 12:57:10 +0000 (13:57 +0100)]
Support functions in TOSCA Simple Profile in YAML

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

4 years agoSupport configuring of tosca type for categories 63/105163/7
MichaelMorris [Mon, 6 Apr 2020 14:44:56 +0000 (15:44 +0100)]
Support configuring of tosca type for categories

Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-2877
Change-Id: I3160c5089979757628f31a44b01836236563b770

4 years agoPrepare for Junit5 25/106825/13
vasraz [Wed, 29 Apr 2020 17:39:35 +0000 (18:39 +0100)]
Prepare for Junit5

Remove unused/duplicated dependencies

Change-Id: Iee0d9510ffbe3e2e14574e22ba965d6829fd568b
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2844
Issue-ID: SDC-2983

4 years agoMake `collectNewCapabilities` return an empty Map 04/106304/4
Chris André [Tue, 5 May 2020 16:39:20 +0000 (12:39 -0400)]
Make `collectNewCapabilities` return an empty Map

- Made `collectNewCapabilities` return an empty HashMap instead of a null value

Issue-ID: SDC-2924
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I58c35135be5a2614c3daeafbd766d53f401f917b

4 years agoIncrease test coverage - openecomp-sdc-vendor-software-product-lib 81/106981/2
vasraz [Fri, 1 May 2020 14:35:01 +0000 (15:35 +0100)]
Increase test coverage - openecomp-sdc-vendor-software-product-lib

Change-Id: Id51ce6f488efd6db02aad479ff419b58436be27c
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3001

4 years agoIncrease test coverage - openecomp-sdc-tosca-generator-api 75/106975/2
vasraz [Fri, 1 May 2020 10:41:13 +0000 (11:41 +0100)]
Increase test coverage -  openecomp-sdc-tosca-generator-api

Change-Id: I1537d71b11ee440cb01bdee49350336f074ea36d
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3001

4 years agoRemove unused ES code and unneeded ES health check 23/107123/2
Neil Derraugh [Tue, 5 May 2020 15:27:28 +0000 (11:27 -0400)]
Remove unused ES code and unneeded ES health check

Remove the ES health check since ES was removed.

Issue-ID: SDC-3022
Signed-off-by: neil.derraugh@yoppworks.com
Change-Id: I918212de39d7b53959ac400975b3c47f889252c1

4 years agofix bug - Error 500 while adding an Operation 17/107117/2
Yuli Shlosberg [Tue, 5 May 2020 15:00:36 +0000 (18:00 +0300)]
fix bug - Error 500 while adding an Operation

Change-Id: I7def95b3688877acbc9332cf4174c9d92226f2e2
Issue-ID: SDC-2953
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
4 years agofix bug - Unable to link CSAR artifact 97/107097/3
Yuli Shlosberg [Tue, 5 May 2020 09:45:46 +0000 (12:45 +0300)]
fix bug - Unable to link CSAR artifact

Change-Id: I586637f988b84b3b858e2c8d567c6844be38322b
Issue-ID: SDC-2972
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
4 years agoRemove powermockito from OrchestrationTemplateCandidateImplTest 96/106996/3
Rodrigo Lima [Fri, 1 May 2020 19:25:06 +0000 (15:25 -0400)]
Remove powermockito from OrchestrationTemplateCandidateImplTest

- Remove powermockito from OrchestrationTemplateCandidateImplTest. Add new constructor to OrchestrationTemplateCandidateImpl

Issue-ID: SDC-3007
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I5f0a2061796e8410a5b225c43baa70d7e0269684

4 years agoHandle null case in `addCalculatedCapabilitiesWithPropertiesToComponent` 75/106375/3
Chris André [Tue, 21 Apr 2020 16:25:29 +0000 (12:25 -0400)]
Handle null case in `addCalculatedCapabilitiesWithPropertiesToComponent`

- 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

4 years agoWork around potential NullPointerExceptions in `ToscaOperationFacade` 60/106560/6
Chris André [Thu, 23 Apr 2020 20:53:42 +0000 (16:53 -0400)]
Work around potential NullPointerExceptions in `ToscaOperationFacade`

- Add tests in `getToscaElementByOperation` and `updateToscaElement` for null values
- rewrite `getLatestCertifiedByToscaResourceName` in a more functional way
- Rewrite some other usages of Either in a more functional way

Issue-ID: SDC-2922
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I52b294ec91faf9e1054af572dcca4060e62fe571

4 years agoSetting default store types when not defined in configuration for init of https client 99/107099/3
ilanap [Tue, 5 May 2020 10:51:47 +0000 (13:51 +0300)]
Setting default store types when not defined in configuration for init of https client

Issue-ID: SDC-2962
Signed-off-by: ilanap <ilanap@amdocs.com>
Change-Id: I9d88031c7d20951a4a77138340b1ddc26f47c0b6
Signed-off-by: ilanap <ilanap@amdocs.com>
4 years agoAdd tests for the presence of Optional values 61/107061/2
Chris André [Mon, 4 May 2020 17:58:39 +0000 (13:58 -0400)]
Add tests for the presence of Optional values

Issue-ID: SDC-3012
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I56cbf7fb5bd04ad2fbc496231d6abe72066124fe

4 years agoUnifiedCompositionService - Refactor code to handle Optional value 74/107074/2
Chris André [Mon, 4 May 2020 21:00:03 +0000 (17:00 -0400)]
UnifiedCompositionService - Refactor code to handle Optional value

Issue-ID: SDC-3015
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I1d15d20e9c603ff894c7c4be46b26d60745cb7e5

4 years agoReplace hashCode and equals methods to cleanup NPE warning 61/106561/4
Neil Derraugh [Thu, 23 Apr 2020 21:03:33 +0000 (17:03 -0400)]
Replace hashCode and equals methods to cleanup NPE warning

Replace hashCode() and equals() with Lombok
@EqualsAndHashCode(callSuper = true)

Issue-ID: SDC-2925
Signed-off-by: neil.derraugh <neil.derraugh@yoppworks.com>
Change-Id: I51056103dc7df953508b2e465a535b46c63e2667

4 years agoRemove call to `get` on Optional variables 76/106776/2
Chris André [Tue, 28 Apr 2020 22:28:27 +0000 (18:28 -0400)]
Remove call to `get` on Optional variables

- Made multiple variables Optional

Issue-ID: SDC-2991
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: If3dbfd37e933d10698ad1a93b6762c84e30f69b8

4 years agoRefactor CsarUtil::getLatestSchemaFilesFromCassandra 86/106986/4
Francis Toth [Fri, 1 May 2020 15:45:41 +0000 (11:45 -0400)]
Refactor CsarUtil::getLatestSchemaFilesFromCassandra

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I3f96d76a07fd32bdbd8b59beb5409eab0b0f3aa8
Issue-ID: SDC-2812

4 years agoRefactor CsarUtil::getFromCassandra 89/106989/2
Francis Toth [Fri, 1 May 2020 15:59:31 +0000 (11:59 -0400)]
Refactor CsarUtil::getFromCassandra

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I510d1d7fb4f4a7d7152fd5ea6d4d5ff61deea23a
Issue-ID: SDC-2812

4 years agoRefactor CsarUtils::collectComponentTypeArtifacts 11/107011/3
Francis Toth [Sun, 3 May 2020 14:01:47 +0000 (10:01 -0400)]
Refactor CsarUtils::collectComponentTypeArtifacts

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

4 years agoRemove all thrift's dependencies 56/106756/3
vasraz [Tue, 28 Apr 2020 15:57:56 +0000 (16:57 +0100)]
Remove all thrift's dependencies

Remove unused/duplicated dependencies

Change-Id: Ic2239acc5ddde1d0874b5139c228934ec1e61cd0
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2985

4 years agoAdd Autowired annotation to the constructor instead of param in ExternalTestingImpl 12/107012/1
Rodrigo Lima [Mon, 4 May 2020 00:24:35 +0000 (20:24 -0400)]
Add Autowired annotation to the constructor instead of param in ExternalTestingImpl

Issue-ID: SDC-3003
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I720c6cf271a1444a584f42cdca2a7e4f2c59a85d

4 years agoRefactor CsarUtils::createCsar 02/106602/3
Francis Toth [Fri, 24 Apr 2020 14:31:36 +0000 (10:31 -0400)]
Refactor CsarUtils::createCsar

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I41994c98515844030eed1d6f2756c9779e864cff
Issue-ID: SDC-2812

4 years agoExtract ArtifactOperationInfo from ArtifactsBusinessLogic 72/106472/9
Francis Toth [Wed, 22 Apr 2020 23:00:33 +0000 (19:00 -0400)]
Extract ArtifactOperationInfo from ArtifactsBusinessLogic

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

4 years agoRemove powermockito from NetworksImplTest 51/106951/3
Francis Toth [Thu, 30 Apr 2020 19:36:38 +0000 (15:36 -0400)]
Remove powermockito from NetworksImplTest

This commit aims to remove the Powermockito dependency from NetworksImplTest.

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I7eecb877f86a64514609e11fd9501f3fb972a866
Issue-ID: SDC-2984

4 years agoRemove powermockito from ApiTest 85/106985/2
Rodrigo Lima [Fri, 1 May 2020 15:44:48 +0000 (11:44 -0400)]
Remove powermockito from ApiTest

- Remove powermockit from ApiTest. Add new constructor to ExternalTestingImpl in order to pass
vendorSoftwareProductManager param.

Issue-ID: SDC-3003
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: Ibdaa12a986557dbf1d4cdf6d4c1952ba642582cf

4 years agoIncrease test coverage - openecomp-sdc-model-lib 74/106974/2
vasraz [Fri, 1 May 2020 11:33:22 +0000 (12:33 +0100)]
Increase test coverage - openecomp-sdc-model-lib

Change-Id: I86e4935fd418bb01971f21ae32351be6044a2566
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3001

4 years agoIncrease test coverage - openecomp-sdc-vendor-software-product-api 84/106984/2
vasraz [Fri, 1 May 2020 15:40:10 +0000 (16:40 +0100)]
Increase test coverage - openecomp-sdc-vendor-software-product-api

Change-Id: Ifaaf73998ee0f7df66082fdc4963b4c05678e5c1
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3001

4 years agoRefactor CsarUtils::validateNonMetaArtifact 99/106999/2
Francis Toth [Fri, 1 May 2020 17:26:03 +0000 (13:26 -0400)]
Refactor CsarUtils::validateNonMetaArtifact

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

4 years agoFix sdc-FE /onboarding war listing 71/106971/1
andre.schmid [Thu, 30 Apr 2020 15:56:36 +0000 (16:56 +0100)]
Fix sdc-FE /onboarding war listing

It creates a index.html page that will end up in the
onboarding-FE .war file. When the /onboarding context
is accessed, a blank page will show up instead of the
contents of the .war.

Change-Id: I0fb4be28e193e6e6bbd58c1af9a49d5750981b7e
Issue-ID: SDC-3000
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoHEAT to TOSCA VM Consolidation 84/106884/2
Ben David, Elad (eb7504) [Thu, 30 Apr 2020 11:00:28 +0000 (14:00 +0300)]
HEAT to TOSCA VM Consolidation

Change-Id: I00c9cf90d7486af33955acae7dfe653e14ceebdc
Issue-ID: SDC-2997
Signed-off-by: Ben David, Elad (eb7504) <eb7504@intl.att.com>
4 years agoReplace call to `get` with a call to `ifPresent` 73/106773/2
Chris André [Tue, 28 Apr 2020 21:49:54 +0000 (17:49 -0400)]
Replace call to `get` with a call to `ifPresent`

Issue-ID: SDC-2989
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I7fe273d869035f8852dbc398de60cc49dec2ce6e

4 years agoRemove mockito from TypeUtilsTest 49/106849/2
Rodrigo Lima [Wed, 29 Apr 2020 19:39:56 +0000 (15:39 -0400)]
Remove mockito from TypeUtilsTest

- Remove the use of mockito verify from TypeUtilsTest

Issue-ID: SDC-2993
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I42c9c972cead10afaa3ec299624cf3d26e4d04db

4 years agoFix GAB ui test row and column count 00/106500/2
andre.schmid [Thu, 23 Apr 2020 11:44:59 +0000 (12:44 +0100)]
Fix GAB ui test row and column count

Change-Id: Ib9e4eb054cd23db9359b6d4db4ce079007c1e4e7
Issue-ID: SDC-2963
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoFix VFs and Service not visible in SDC Dashboard 04/106804/1
vasraz [Wed, 29 Apr 2020 13:13:18 +0000 (14:13 +0100)]
Fix VFs and Service not visible in SDC Dashboard

Change-Id: Ia42775388c3ad9539b7d0020476f0f7a91ce8bb9
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2938

4 years agoHandle null case in `GroupVersionUpdater` 80/106380/5
Chris André [Tue, 21 Apr 2020 18:40:07 +0000 (14:40 -0400)]
Handle null case in `GroupVersionUpdater`

- 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

4 years agoRefactor CsarUtils::getEntryData 01/106601/2
Francis Toth [Fri, 24 Apr 2020 14:29:03 +0000 (10:29 -0400)]
Refactor CsarUtils::getEntryData

Change-Id: I1732ae05cfbe93c1bef8c249e16088a0cad34106
Issue-ID: SDC-2812
Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
4 years agoRefactor CsarUtils::populateZip 03/106603/5
Francis Toth [Fri, 24 Apr 2020 15:11:01 +0000 (11:11 -0400)]
Refactor CsarUtils::populateZip

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I136ebda0ff92d6c42368f102ccf2b10f37524808
Issue-ID: SDC-2812

4 years agoRemove csvReportFilePath from ValidationConfigManager 00/106300/6
Francis Toth [Mon, 20 Apr 2020 00:16:33 +0000 (20:16 -0400)]
Remove csvReportFilePath from ValidationConfigManager

This commit aims to extract the csvReportFilePath field from ValidationConfigManager in order to improve testability. This commit contains multiple minor modifications resulting from bubbling up the csvReportFilePath static field to where it is actually set. Put differently, most of the modifications result from changing the signature of the functions which formerly relied on ValidationConfigManager.getCSVReportFilePath.

Change-Id: I82c3b0fca8a0f407319e40ecfff45e89ec1d4323
Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Issue-ID: SDC-2499

4 years agoWork around potential NullPointerExceptions in HeatTreeManagerUtil 36/106636/2
Chris André [Fri, 24 Apr 2020 23:51:01 +0000 (19:51 -0400)]
Work around potential NullPointerExceptions in HeatTreeManagerUtil

- Replace null return values with empty Map objects

Issue-ID: SDC-2928
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I3357a8789a00201a7ffda1dbf0be5f08cbb9c33b

4 years agoEnabling JS in SonarCloud 00/103300/6
andre.schmid [Fri, 6 Mar 2020 14:42:45 +0000 (14:42 +0000)]
Enabling JS in SonarCloud

Configures jest test coverage and missing sonar
properties for javascript file scan and report.

Change-Id: I9170a176cc4e580ac14f669c334ee949942503f6
Issue-ID: SDC-2741
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoFix null pointer warning 56/106556/3
Rodrigo Lima [Thu, 23 Apr 2020 19:41:02 +0000 (15:41 -0400)]
Fix null pointer warning

- Check name and value in method setToscaPresentationValue

Issue-ID: SDC-2926
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I0d66b29c84139afff92065769bf1b79082959333

4 years agoAdd null test to ComponentBusinessLogic 06/106306/4
Chris André [Wed, 22 Apr 2020 15:22:29 +0000 (11:22 -0400)]
Add null test to ComponentBusinessLogic

- 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

4 years agoUpdate WORKFLOW Artifact Type configuration 57/106457/2
andre.schmid [Tue, 21 Apr 2020 17:08:10 +0000 (18:08 +0100)]
Update WORKFLOW Artifact Type configuration

To add an operation with an existing Workflow in a RESOURCE,
the Artifact Type WORKFLOW needs to support the extension
"bpmn" and the component type "RESOURCE".

Change-Id: Ic7eb9afe3ced0348f7aadcc43edf121a0bdcf015
Issue-ID: SDC-2954
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoFix potential NPE in ArtifactsBusinessLogic 56/106456/2
andre.schmid [Wed, 22 Apr 2020 10:00:52 +0000 (11:00 +0100)]
Fix potential NPE in ArtifactsBusinessLogic

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>
4 years agoAdded early check for null value for `containerV` 62/106162/4
Chris André [Thu, 16 Apr 2020 21:48:06 +0000 (17:48 -0400)]
Added early check for null value for `containerV`

- Formatting code following project's code style
- Added early check for null value for `containerV`

Issue-ID: SDC-2905
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I648e9a4a04be3f2e7cd3e30a70c04de2257a99d3

4 years agoMinor cleanups for BasicAuthenticationFilter 94/106394/2
Chris André [Wed, 22 Apr 2020 00:51:42 +0000 (20:51 -0400)]
Minor cleanups for BasicAuthenticationFilter

- 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

4 years agoAdd null tests 90/106390/3
Chris André [Tue, 21 Apr 2020 23:25:21 +0000 (19:25 -0400)]
Add null tests

- 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

4 years agoFix null pointer exception warnings 89/106289/2
Rodrigo Lima [Mon, 20 Apr 2020 15:56:35 +0000 (11:56 -0400)]
Fix null pointer exception warnings

Issue-ID: SDC-2911
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: Ic7f0ef631ed98e8baf2ea32b6bfc56a7142738f8

4 years agoHandle null condition in TopologyTemplateOperation 55/106455/1
Rodrigo Lima [Wed, 22 Apr 2020 15:57:18 +0000 (11:57 -0400)]
Handle null condition in TopologyTemplateOperation

- check if instanceId null in method isNotEmptyMapOfProperties

Issue-ID: SDC-2920
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I70667142ed51834de638903ccae4ffcb896cccab

4 years agoFix unit tests not running 40/106340/6
Baumel, Dvir (db384r) [Tue, 21 Apr 2020 11:14:15 +0000 (14:14 +0300)]
Fix unit tests not running

Change-Id: I06462b6180a1f1a310aae994f4e703a498f80247
Issue-ID: SDC-2933
Signed-off-by: Baumel, Dvir (db384r) <dvir.baumel@intl.att.com>
4 years agoUsed `configurationManager` instead of `getConfigurationManager` 64/106064/3
Chris André [Tue, 14 Apr 2020 20:21:43 +0000 (16:21 -0400)]
Used `configurationManager` instead of `getConfigurationManager`

Issue-ID: SDC-2890
Change-Id: I1559ebc60076bd0884ae1136c9c904f7ab46e72e
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
4 years agoFix bug for class SwitchoverDetector 43/106243/3
Reo Inoue [Mon, 20 Apr 2020 07:20:49 +0000 (16:20 +0900)]
Fix bug for class SwitchoverDetector

Signed-off-by: Reo Inoue <inoue.reo@jp.fujitsu.com>
Issue-ID: SDC-2931
Change-Id: I6b40f538ff9ce7eed22ce71c542b188a8c866f26

4 years agoAdd null test to DistributionMonitoringBusinessLogic 62/106362/2
Chris André [Tue, 21 Apr 2020 15:21:32 +0000 (11:21 -0400)]
Add null test to DistributionMonitoringBusinessLogic

- 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

4 years agoHandle null condition in ResourceImportManager 81/106381/2
Rodrigo Lima [Tue, 21 Apr 2020 19:17:29 +0000 (15:17 -0400)]
Handle null condition in ResourceImportManager

- 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

4 years agoAdd null test in ArtifactsOperations 97/106397/2
Chris André [Wed, 22 Apr 2020 01:26:12 +0000 (21:26 -0400)]
Add null test in ArtifactsOperations

- Added if statement in `updateArtifactOnGraph` to account for the case where variable `artifactInst` has not been properly initialized

Issue-ID: SDC-2919
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I73fe3b3bcef59e5797a0f7cfe7b6894816d0d3fb

4 years agoMinor cleanups for JanusGraphDao 95/106395/2
Chris André [Wed, 22 Apr 2020 01:11:55 +0000 (21:11 -0400)]
Minor cleanups for JanusGraphDao

- Fixed typo in a call to `logger.debug`
- Modified if statement following recommendation from SonarCloud

Issue-ID: SDC-2918
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I75d50d74703bf7c706b84723bb5d43760b8b7baf

4 years agoAdd null test to test in `UpgradeBusinessLogic` 92/106392/2
Chris André [Wed, 22 Apr 2020 00:28:38 +0000 (20:28 -0400)]
Add null test to test in `UpgradeBusinessLogic`

Issue-ID: SDC-2915
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I4e6f27b707b1bdbbecf9a97606c9a655d834fe56

4 years agoAdd null tests in `createComponentExternal` 93/106393/2
Chris André [Wed, 22 Apr 2020 00:41:08 +0000 (20:41 -0400)]
Add null tests in `createComponentExternal`

Issue-ID: SDC-2916
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: Ieb0a79c8d3a891a08cd758e1a4ebab7679166476

4 years agoINFO.yaml update 79/106379/4
Ofir Sonsino [Tue, 21 Apr 2020 17:30:28 +0000 (20:30 +0300)]
INFO.yaml update

Change-Id: Ie410001eae688aa9d0c579f35eb57eeebfe9ae08
Issue-ID: SDC-2934
Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
4 years agoFix catalog-ui dev proxy calls to uicache 59/106359/2
andre.schmid [Tue, 21 Apr 2020 13:13:17 +0000 (14:13 +0100)]
Fix catalog-ui dev proxy calls to uicache

Fixes webpack dev server proxy to uicache removed in
SDC-2843, Change Id: I9a6c89e45ea425eb9abf827906562e14a39cf1ff.

Change-Id: I83aa842df4c7bf3d140216c93b48eb1cfec48656
Issue-ID: SDC-2944
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoFix 404 in sdc-FE calls to workflow 57/106357/2
andre.schmid [Tue, 21 Apr 2020 13:01:21 +0000 (14:01 +0100)]
Fix 404 in sdc-FE calls to workflow

Fixes webpack workflow proxy configuration.
Fixes FE proxy while rewriting URLs to workflow plugin.
Fixes compilation problems to run locally the catalog-ui.

Change-Id: I89f3f46bd8ce0159713b1d0d957a2e75f8a3d062
Issue-ID: SDC-2943
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoFix catalog-fe plugin online checking 58/106358/1
andre.schmid [Tue, 21 Apr 2020 13:30:00 +0000 (14:30 +0100)]
Fix catalog-fe plugin online checking

ESAPI encoder cannot be loaded due to a missing ESAPI.properties file
in path, which causes an exception and breaks the online checking call.
The plugin is always shown as offline.

Change-Id: I05088d200e9a1bea1de2e00c07d5bbf6e3a67d41
Issue-ID: SDC-2945
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoRemove props from ValidationConfigManager 65/106265/3
Francis Toth [Sun, 19 Apr 2020 23:50:10 +0000 (19:50 -0400)]
Remove props from ValidationConfigManager

Signed-off-by: Francis Toth <francis.toth@yoppworks.com>
Change-Id: I1c3a845c44722010e8933876e59752cef00937f0
Issue-ID: SDC-2499

4 years agoFix cs-init SchemaFileImport error file creation 80/106280/1
andre.schmid [Mon, 20 Apr 2020 13:20:23 +0000 (14:20 +0100)]
Fix cs-init SchemaFileImport error file creation

Fix issue in SdcSchemaFileImport "STDERR: Error in file creation :
data, /tmp/sdctool/tosca/data-types/data.yml
(No such file or directory)", during the cassandra init.
Introduced by SDC-2898.

Change-Id: Ifd2018fac456f15d03fc39ea766a6ae0c3eda081
Issue-ID: SDC-2939
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoFix GAB problem in ui-ci tests 45/106245/1
andre.schmid [Mon, 20 Apr 2020 07:47:08 +0000 (08:47 +0100)]
Fix GAB problem in ui-ci tests

Generic Artifact Browser is failing in tests due
to an assertion problem.

Change-Id: Ib398d04f0a876ae7d531af14e129f0dc6838dd52
Issue-ID: SDC-2903
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoAdded a try-with-resource to properly close a FileInputStream 62/106062/5
Chris André [Thu, 16 Apr 2020 00:05:32 +0000 (20:05 -0400)]
Added a try-with-resource to properly close a FileInputStream

Issue-ID: SDC-2898
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I0a0163937ee2e760f3074d858dfc68a7b262ecd9

4 years agoAdded early check for null value for `containerV` 56/106156/4
Chris André [Thu, 16 Apr 2020 20:29:05 +0000 (16:29 -0400)]
Added early check for null value for `containerV`

- Formatting code following project's code style
- Added early check for null value for `containerV`

Issue-ID: SDC-2904
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: Ib8d7c1bf36608855c73d8a0df637e86aefce9377

4 years agoFix Tosca properties declaration 49/105149/2
aribeiro [Fri, 3 Apr 2020 11:01:29 +0000 (12:01 +0100)]
Fix Tosca properties declaration

Remove duplicated entries
Default value for Boolean type should not be a String
According to the description for the keyname 'attachments:' it should be of type List rather than String

Issue-ID: SDC-2870
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: Iac2b4f89dac16a6aef9dcabea74def5cacff99a6

4 years agoValidates artifact configuration 07/106207/2
andre.schmid [Fri, 17 Apr 2020 13:53:17 +0000 (14:53 +0100)]
Validates artifact configuration

Validates if all the SDC base artifacts are configured.
The base artifacts are provided by the ArtifactTypeEnum.

Change-Id: Iffa38d6ba276014940afad71f7472bc8d730fcf8
Issue-ID: SDC-2929
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoConfigure a new Artifact Type 30/101230/7
andre.schmid [Wed, 29 Jan 2020 17:25:21 +0000 (17:25 +0000)]
Configure a new Artifact Type

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>
4 years agoMax boundary check for instances relationships 38/105138/3
andre.schmid [Fri, 3 Apr 2020 16:41:23 +0000 (17:41 +0100)]
Max boundary check for instances relationships

Considering the max boundary of a requirement during a component
composition, allowing the correct number of the requirement
relationships between instances.

Change-Id: I82a1a6daeda8fadcf1c232b117d5b099db7b35d7
Issue-ID: SDC-2872
Signed-off-by: andre.schmid <andre.schmid@est.tech>
4 years agoFix non appearance VFCs on the Home tab 06/105006/2
vasraz [Thu, 2 Apr 2020 15:26:24 +0000 (16:26 +0100)]
Fix non appearance VFCs on the Home tab

Change-Id: I1543da25b76adbe426726444bd855393267fabe5
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2868

4 years agoAdded ui-ci test case for checking if hidden 15/105815/2
Divyang Patel [Thu, 9 Apr 2020 11:31:49 +0000 (21:31 +1000)]
Added ui-ci test case for checking if hidden

categories are not visible (USECASE: 3rd Party Operational Domain Manager)

Issue-ID: SDC-2879
Signed-off-by: Divyang Patel <divyang.patel@team.telstra.com>
Change-Id: Ic64b7de0f6ee70aef279ce13c3d2e18c194c6789

4 years agoSimplified thread-safety for the `getGson` method 63/106063/2
Chris André [Thu, 16 Apr 2020 00:18:59 +0000 (20:18 -0400)]
Simplified thread-safety for the `getGson` method

Issue-ID: SDC-2900
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I8c687bb408a5e0b1e95316bdae6d53126bc82696

4 years agoUnable to update VSP (heat template) version in VF 44/106144/2
Sebastien Premont-Tendland [Thu, 16 Apr 2020 18:51:35 +0000 (14:51 -0400)]
Unable to update VSP (heat template) version in VF

This seems to fix the issue, we can still
onboard CBA at VF level and the CBA get included
in the distributed CSAR under the directory
Artifacts/*/Deployment/CONTROLLER_BLUEPRINT_ARCHIVE/
as expected

Issue-ID: SDC-2892
Signed-off-by: Sebastien Premont-Tendland <sebastien.premont@bell.ca>
Change-Id: Ie9f9cd7b8d2cf5eb3ff3c41a4b04eedd788265a6

4 years agoZipSlip test fails on Mac OS 09/106209/2
Neil Derraugh [Fri, 17 Apr 2020 17:35:30 +0000 (13:35 -0400)]
ZipSlip test fails on Mac OS

Mac OS has a symlink in the tmp dir that gets created in the test for
ZipSlip.  Using real paths prevents the test test from failing by using
actual paths instead of a potentially different symlinked path to the
canonical path.

Issue-ID: SDC-2887
Signed-off-by: neil.derraugh <neil.derraugh@yoppworks.com>
Change-Id: Iafb0a84f6ab68276c5782c1ef716c59435aa72f5

4 years agoRemoved explicit references to exceptions in log messages 58/106058/3
Chris André [Wed, 15 Apr 2020 17:37:46 +0000 (13:37 -0400)]
Removed explicit references to exceptions in log messages

Issue-ID: SDC-2884
Change-Id: I6f3e9503922cc3a4f4049fced8d23cede7b0455a
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
4 years agoFix GAB problem in ui-ci tests 88/106088/3
andre.schmid [Fri, 10 Apr 2020 13:13:23 +0000 (14:13 +0100)]
Fix GAB problem in ui-ci tests

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>
4 years agoImproved UX in the distribution component 44/105544/2
k.kedron [Wed, 8 Apr 2020 16:00:11 +0000 (18:00 +0200)]
Improved UX in the distribution component

Added new logic to expand currently open tab,
after clicking the refresh button.

Issue-ID: SDC-2886
Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com>
Change-Id: Ib9d1c7cbf2ca2dd9df22f7f74ffda64144c06047