Modify the get service Abstract status interface and add the tonode judgment 20/114620/2
authorsebdet <sebastien.determe@intl.att.com>
Thu, 5 Nov 2020 11:02:07 +0000 (12:02 +0100)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Thu, 5 Nov 2020 11:41:47 +0000 (11:41 +0000)
Fix code

Issue-ID: SDC-3346
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I5e8fb25e2c855639f3389dc3b54b9dc8ceea3037

catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/AbstractTemplateBusinessLogic.java

index 9061f8e..9206dcb 100644 (file)
@@ -124,16 +124,15 @@ public class AbstractTemplateBusinessLogic extends BaseBusinessLogic {
                                               String serviceUniqueId,List<AbstractResourceInfo> abstractResourceInfoList) {
         boolean isAbstract = getIsAbstract(resource.getCategories());
         log.debug("before if isAbstract,get resource:{}", resource);
-        if (!isAbstract) {
-            log.debug("getResourceAbstractStatus:resource {} ,with id {} isAbstract{} is missing the isAbstract parameter",
-                    resource.getName(), resource.getUUID(),false);
-        }
         if (isAbstract) {
             log.debug("getResourceAbstractStatus: resource {} with id {} ,NormalizedName:{},isAbstract{} is abstract resource",
                     resource.getName(), resource.getUUID(), resource.getNormalizedName(), true);
             isContainAbstractResource = true;
             AbstractResourceInfo abstractResourceInfo = getAbstractResourceInfo(resource, componentInstancesRelations, serviceUniqueId);
             abstractResourceInfoList.add(abstractResourceInfo);
+        } else {
+            log.debug("getResourceAbstractStatus:resource {} ,with id {} isAbstract{} is missing the isAbstract parameter",
+                    resource.getName(), resource.getUUID(),false);
         }
         return isContainAbstractResource;
     }