[sdc] - logging entries for OS debugging purposes 07/6807/1
authorTal Gitelman <tg851x@intl.att.com>
Mon, 7 Aug 2017 08:52:08 +0000 (11:52 +0300)
committerTal Gitelman <tg851x@intl.att.com>
Mon, 7 Aug 2017 08:52:08 +0000 (11:52 +0300)
Change-Id: I3c502a03833f9ddf5e2e919542d13a3b6691e279
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentBusinessLogic.java
catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java

index 21f7b3a..33180cd 100644 (file)
@@ -905,11 +905,18 @@ public abstract class ComponentBusinessLogic extends BaseBusinessLogic {
                } else {
                        genericTypeToscaName = component.fetchGenericTypeToscaNameFromConfig();
                }
-               if(null == genericTypeToscaName)
+               log.debug("Fetching generic tosca name {}", genericTypeToscaName);
+               if(null == genericTypeToscaName) {
+                       log.debug("Failed to fetch certified node type by tosca resource name {}", genericTypeToscaName);
                        return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR));
+               }
+               
                Either<Resource, StorageOperationStatus> findLatestGeneric = toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(genericTypeToscaName);
-               if(findLatestGeneric.isRight())
+               if(findLatestGeneric.isRight()){
+                       log.debug("Failed to fetch certified node type by tosca resource name {}", genericTypeToscaName);
                        return Either.right(componentsUtils.getResponseFormat(ActionStatus.GENERIC_TYPE_NOT_FOUND, component.assetType(), genericTypeToscaName));
+               }
+               
                Resource genericTypeResource = findLatestGeneric.left().value();
                component.setDerivedFromGenericInfo(genericTypeResource);
                return Either.left(genericTypeResource);
index a8d8413..51e64ca 100644 (file)
@@ -3567,10 +3567,11 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
                Map<String, List<ComponentInstanceInput>> instInputs = new HashMap<>();
 
                for (Entry<String, UploadComponentInstanceInfo> entry : uploadResInstancesMap.entrySet()) {
+                       log.trace("Processing entry: {}", entry);
                        UploadComponentInstanceInfo uploadComponentInstanceInfo = entry.getValue();
                        ComponentInstance currentCompInstance = null;
                        for (ComponentInstance compInstance : componentInstancesList) {
-
+                               log.trace("Processing component instance: {}", compInstance);
                                if (compInstance.getName().equals(uploadComponentInstanceInfo.getName())) {
                                        currentCompInstance = compInstance;
                                        break;