Fixing issue with nested services 79/115179/3
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>
Thu, 12 Nov 2020 16:17:46 +0000 (16:17 +0000)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Mon, 7 Dec 2020 21:39:14 +0000 (21:39 +0000)
Issue-ID: SDC-3376
Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Change-Id: Ibd234cc1e4459c0b8eb62ed6601a1dc9be3f1853

catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java
catalog-ui/src/app/ng2/pages/composition/palette/services/palette.service.ts

index 9eebbc5..5c8d9c6 100644 (file)
@@ -540,7 +540,7 @@ public class ToscaExportHandler {
                                   final ComponentInstance componentInstance) {
         log.debug("createDependency componentCache {}", componentCache);
         final Component componentRI = componentCache.get(componentInstance.getComponentUid());
-        if (componentRI == null) {
+        if (componentRI == null || componentInstance.getOriginType() == OriginTypeEnum.ServiceSubstitution) {
             // all resource must be only once!
             final Either<Component, StorageOperationStatus> resource = toscaOperationFacade
                 .getToscaFullElement(componentInstance.getComponentUid());
index d1d4850..ba165b0 100644 (file)
@@ -84,10 +84,7 @@ export class CompositionPaletteService {
                        retValObject['Service'] = serviceGroup;
                    }
                }
-               else {
-                   // Generic will be the 1st category in the left Pallete
                        retValObject['Generic'] = resInstances['Generic'];
-               }
            }
         
         // Add all other categories