aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-01-04 18:45:51 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-01-04 19:35:32 +0000
commit19740db71482fae0760abfa3c7a9a5d171b6d597 (patch)
tree97be0d4adc78d68338fe643b9f0577d9f5815c68 /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src
parent386af7e65bbc73f50f0c78b3a745c8c81ecad288 (diff)
Remove enter/exit debug #3
Change-Id: If2ea8d16a1fd1867b4b314290fdcfaeafef93c19 Issue-ID: SDC-875 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentDependencyModelManagerImpl.java12
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentManagerImpl.java31
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ManualVspToscaManagerImpl.java8
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java47
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java64
5 files changed, 0 insertions, 162 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentDependencyModelManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentDependencyModelManagerImpl.java
index 17d1833af6..81bbe356c3 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentDependencyModelManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentDependencyModelManagerImpl.java
@@ -7,7 +7,6 @@ import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
@@ -23,8 +22,6 @@ import org.openecomp.sdc.versioning.dao.types.Version;
import java.util.Collection;
public class ComponentDependencyModelManagerImpl implements ComponentDependencyModelManager {
-
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
protected static final Logger logger =
LoggerFactory.getLogger(ComponentDependencyModelManagerImpl.class);
@@ -46,9 +43,6 @@ public class ComponentDependencyModelManagerImpl implements ComponentDependencyM
@Override
public Collection<ComponentDependencyModelEntity> list(String vspId, Version version) {
-
- mdcDataDebugMessage.debugExitMessage("VSP id, version", vspId, version.toString());
-
return componentDependencyModelDao
.list(new ComponentDependencyModelEntity(vspId, version, null));
}
@@ -87,20 +81,15 @@ public class ComponentDependencyModelManagerImpl implements ComponentDependencyM
@Override
public void delete(String vspId, Version version, String dependencyId) {
- mdcDataDebugMessage.debugEntryMessage("VSP id, dependencyId", vspId, dependencyId);
ComponentDependencyModelEntity componentDependencyEntity = getComponentDependency(vspId,
version, dependencyId);
if (componentDependencyEntity != null) {
componentDependencyModelDao.delete(componentDependencyEntity);
}
-
- mdcDataDebugMessage.debugExitMessage("VSP id, dependencyId", vspId, dependencyId);
}
@Override
public void update(ComponentDependencyModelEntity entity) {
- mdcDataDebugMessage.debugEntryMessage("VSP id, dependencyId", entity.getVspId(),
- entity.getId());
ComponentDependencyModelEntity componentDependencyEntity = getComponentDependency(
entity.getVspId(), entity.getVersion(), entity.getId());
validateComponentDependency(entity);
@@ -109,7 +98,6 @@ public class ComponentDependencyModelManagerImpl implements ComponentDependencyM
@Override
public ComponentDependencyModelEntity get(String vspId, Version version, String dependencyId) {
- mdcDataDebugMessage.debugEntryMessage("VSP id, dependencyId", vspId, dependencyId);
ComponentDependencyModelEntity componentDependency =
getComponentDependency(vspId, version, dependencyId);
return componentDependency;
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentManagerImpl.java
index dab000951f..f509658b37 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComponentManagerImpl.java
@@ -26,7 +26,6 @@ import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerErrorCode;
@@ -61,7 +60,6 @@ import java.util.stream.Collectors;
import static org.openecomp.sdc.tosca.datatypes.ToscaNodeType.COMPUTE_TYPE_PREFIX;
public class ComponentManagerImpl implements ComponentManager {
- private static final MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private final ComponentDao componentDao;
private final CompositionEntityDataManager compositionEntityDataManager;
private final NicManager nicManager;
@@ -81,14 +79,11 @@ public class ComponentManagerImpl implements ComponentManager {
@Override
public Collection<ComponentEntity> listComponents(String vspId, Version version) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID, vspId);
- mdcDataDebugMessage.debugExitMessage(VSP_ID, vspId);
return componentDao.list(new ComponentEntity(vspId, version, null));
}
@Override
public void deleteComponents(String vspId, Version version) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID, vspId);
if (!vspInfoDao.isManual(vspId, version)) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.DELETE_COMPONENT, ErrorLevel.ERROR.name(),
@@ -96,14 +91,10 @@ public class ComponentManagerImpl implements ComponentManager {
throw new CoreException(
new CompositionEditNotAllowedErrorBuilder(vspId, version).build());
}
-
- mdcDataDebugMessage.debugExitMessage(VSP_ID, vspId);
}
@Override
public ComponentEntity createComponent(ComponentEntity component) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID, component.getId());
-
final String vfcAddNotAllowedInHeatOnboardingMsg =
"VFCs cannot be added for VSPs onboarded with HEAT.";
@@ -121,9 +112,6 @@ public class ComponentManagerImpl implements ComponentManager {
updateComponentName(component);
createdComponent = compositionEntityDataManager.createComponent(component);
}
-
- mdcDataDebugMessage.debugExitMessage(VSP_ID, component.getId());
-
return createdComponent;
}
@@ -177,8 +165,6 @@ public class ComponentManagerImpl implements ComponentManager {
@Override
public CompositionEntityValidationData updateComponent(ComponentEntity component) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID_COMPONENT_ID, component
- .getVspId(), component.getId());
ComponentEntity retrieved =
getValidatedComponent(component.getVspId(), component.getVersion(), component.getId());
@@ -199,9 +185,6 @@ public class ComponentManagerImpl implements ComponentManager {
}
componentDao.update(component);
}
- mdcDataDebugMessage.debugExitMessage(VSP_ID_COMPONENT_ID, component.getVspId(),
- component.getId());
-
return validationData;
}
@@ -233,7 +216,6 @@ public class ComponentManagerImpl implements ComponentManager {
@Override
public CompositionEntityResponse<ComponentData> getComponent(String vspId, Version version,
String componentId) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
ComponentEntity componentEntity = getValidatedComponent(vspId, version, componentId);
ComponentData component = componentEntity.getComponentCompositionData();
@@ -245,15 +227,11 @@ public class ComponentManagerImpl implements ComponentManager {
response.setId(componentId);
response.setData(component);
response.setSchema(getComponentCompositionSchema(schemaInput));
- mdcDataDebugMessage.debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
-
return response;
}
@Override
public void deleteComponent(String vspId, Version version, String componentId) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
-
if (!vspInfoDao.isManual(vspId, version)) {
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.DELETE_COMPONENT, ErrorLevel.ERROR.name(),
@@ -261,15 +239,11 @@ public class ComponentManagerImpl implements ComponentManager {
throw new CoreException(
new CompositionEditNotAllowedErrorBuilder(vspId, version).build());
}
-
- mdcDataDebugMessage.debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
}
@Override
public QuestionnaireResponse getQuestionnaire(String vspId, Version version,
String componentId) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
-
QuestionnaireResponse questionnaireResponse = new QuestionnaireResponse();
ComponentEntity component = componentDao.getQuestionnaireData(vspId, version, componentId);
VersioningUtil
@@ -283,20 +257,15 @@ public class ComponentManagerImpl implements ComponentManager {
new ComponentQuestionnaireSchemaInput(nicNames, questionnaireResponse.getData() == null
? null
: JsonUtil.json2Object(questionnaireResponse.getData(), Map.class))));
-
- mdcDataDebugMessage.debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
return questionnaireResponse;
}
@Override
public void updateQuestionnaire(String vspId, Version version, String componentId,
String questionnaireData) {
- mdcDataDebugMessage.debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
validateComponentExistence(vspId, version, componentId);
componentDao.updateQuestionnaireData(vspId, version, componentId, questionnaireData);
-
- mdcDataDebugMessage.debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
}
@Override
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ManualVspToscaManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ManualVspToscaManagerImpl.java
index fdb9621bcb..367d2a9c21 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ManualVspToscaManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ManualVspToscaManagerImpl.java
@@ -6,7 +6,6 @@ import org.openecomp.sdc.generator.core.services.ManualVspToscaGenerationService
import org.openecomp.sdc.generator.datatypes.tosca.DeploymentFlavorModel;
import org.openecomp.sdc.generator.datatypes.tosca.MultiFlavorVfcImage;
import org.openecomp.sdc.generator.datatypes.tosca.VspModelInfo;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerErrorCode;
@@ -22,14 +21,11 @@ import java.util.Map;
import java.util.Optional;
public class ManualVspToscaManagerImpl implements ManualVspToscaManager {
-
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private ManualVspDataCollectionService
manualVspDataCollectionService = new ManualVspDataCollectionService();
@Override
public VspModelInfo gatherVspInformation(String vspId, Version version) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
VspModelInfo vspModelInfo = new VspModelInfo();
//Get Release Vendor Name
Optional<String> releaseVendor;
@@ -104,18 +100,14 @@ public class ManualVspToscaManagerImpl implements ManualVspToscaManager {
if (MapUtils.isNotEmpty(vspComponentNics)) {
vspModelInfo.setNics(vspComponentNics);
}
-
- mdcDataDebugMessage.debugExitMessage(null, null);
return vspModelInfo;
}
@Override
public ToscaServiceModel generateToscaModel(VspModelInfo vspModelInfo) {
- mdcDataDebugMessage.debugEntryMessage(null, null);
ManualVspToscaGenerationService vspToscaGenerator = new ManualVspToscaGenerationService();
ToscaServiceModel manualVspToscaServiceModel =
vspToscaGenerator.createManualVspToscaServiceModel(vspModelInfo);
- mdcDataDebugMessage.debugExitMessage(null, null);
return manualVspToscaServiceModel;
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java
index a751ed68a5..2a86042040 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java
@@ -20,7 +20,6 @@ import org.apache.commons.collections4.CollectionUtils;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.types.LoggerConstants;
import org.openecomp.sdc.logging.types.LoggerErrorCode;
@@ -58,8 +57,6 @@ import java.util.Map;
import java.util.stream.Collectors;
public class NicManagerImpl implements NicManager {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
-
private final NicDao nicDao;
private final CompositionEntityDataManager compositionEntityDataManager;
private final NetworkManager networkManager;
@@ -78,8 +75,6 @@ public class NicManagerImpl implements NicManager {
@Override
public Collection<NicEntity> listNics(String vspId, Version version, String componentId) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
-
Collection<NicEntity> nics = nicDao.list(new NicEntity(vspId, version, componentId, null));
if (!nics.isEmpty()) {
@@ -90,9 +85,6 @@ public class NicManagerImpl implements NicManager {
nicEntity.setNicCompositionData(nic);
});
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId);
-
return nics;
}
@@ -104,9 +96,6 @@ public class NicManagerImpl implements NicManager {
@Override
public NicEntity createNic(NicEntity nic) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID_COMPONENT_ID, nic.getVspId(),
- nic.getComponentId());
-
NicEntity createdNic;
if (!vspInfoDao.isManual(nic.getVspId(), nic.getVersion())) {
ErrorCode onboardingMethodUpdateErrorCode = NotSupportedHeatOnboardMethodErrorBuilder
@@ -120,10 +109,6 @@ public class NicManagerImpl implements NicManager {
validateNic(nic);
createdNic = compositionEntityDataManager.createNic(nic);
}
-
- MDC_DATA_DEBUG_MESSAGE
- .debugExitMessage(VSP_ID_COMPONENT_ID, nic.getVspId(), nic.getComponentId());
-
return createdNic;
}
@@ -200,9 +185,6 @@ public class NicManagerImpl implements NicManager {
@Override
public CompositionEntityResponse<Nic> getNic(String vspId, Version version, String componentId,
String nicId) {
- MDC_DATA_DEBUG_MESSAGE
- .debugEntryMessage("VSP id, component id, nic id", vspId, componentId, nicId);
-
NicEntity nicEntity = getValidatedNic(vspId, version, componentId, nicId);
Nic nic = nicEntity.getNicCompositionData();
@@ -217,10 +199,6 @@ public class NicManagerImpl implements NicManager {
response.setId(nicId);
response.setData(nic);
response.setSchema(getNicCompositionSchema(schemaInput));
-
- MDC_DATA_DEBUG_MESSAGE
- .debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId, nicId);
-
return response;
}
@@ -236,9 +214,6 @@ public class NicManagerImpl implements NicManager {
@Override
public void deleteNic(String vspId, Version version, String componentId, String nicId) {
- MDC_DATA_DEBUG_MESSAGE
- .debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId, nicId);
-
if (!vspInfoDao.isManual(vspId, version)) {
final ErrorCode deleteNicErrorBuilder =
DeleteNicErrorBuilder.getDeleteNicForHeatOnboardedVspErrorBuilder();
@@ -251,17 +226,10 @@ public class NicManagerImpl implements NicManager {
NicEntity nicEntity = getValidatedNic(vspId, version, componentId, nicId);
nicDao.delete(nicEntity);
-
- MDC_DATA_DEBUG_MESSAGE
- .debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId, nicId);
}
@Override
public CompositionEntityValidationData updateNic(NicEntity nic) {
- MDC_DATA_DEBUG_MESSAGE
- .debugEntryMessage(VSP_ID_COMPONENT_ID, nic.getVspId(), nic.getComponentId(),
- nic.getId());
-
NicEntity retrieved =
getValidatedNic(nic.getVspId(), nic.getVersion(), nic.getComponentId(), nic.getId());
@@ -286,19 +254,12 @@ public class NicManagerImpl implements NicManager {
if (CollectionUtils.isEmpty(validationData.getErrors())) {
nicDao.update(nic);
}
- MDC_DATA_DEBUG_MESSAGE
- .debugExitMessage(VSP_ID_COMPONENT_ID, nic.getVspId(), nic.getComponentId(),
- nic.getId());
-
return validationData;
}
@Override
public QuestionnaireResponse getNicQuestionnaire(String vspId, Version version,
String componentId, String nicId) {
- MDC_DATA_DEBUG_MESSAGE
- .debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId, nicId);
-
QuestionnaireResponse questionnaireResponse = new QuestionnaireResponse();
NicEntity nicQuestionnaire = nicDao.getQuestionnaireData(vspId, version, componentId, nicId);
VersioningUtil.validateEntityExistence(nicQuestionnaire,
@@ -306,23 +267,15 @@ public class NicManagerImpl implements NicManager {
questionnaireResponse.setData(nicQuestionnaire.getQuestionnaireData());
questionnaireResponse.setSchema(getNicQuestionnaireSchema(null));
-
- MDC_DATA_DEBUG_MESSAGE
- .debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId, nicId);
-
return questionnaireResponse;
}
@Override
public void updateNicQuestionnaire(String vspId, Version version, String componentId,
String nicId, String questionnaireData) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID_COMPONENT_ID, vspId, componentId, nicId);
-
getNic(vspId, version, componentId, nicId);
nicDao.updateQuestionnaireData(vspId, version, componentId, nicId, questionnaireData);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID_COMPONENT_ID, vspId, componentId, nicId);
}
protected String getNicQuestionnaireSchema(SchemaTemplateInput schemaInput) {
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
index e38c1b3b37..692f6f3db7 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
@@ -38,7 +38,6 @@ import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
import org.openecomp.sdc.logging.messages.AuditMessages;
import org.openecomp.sdc.logging.types.LoggerConstants;
@@ -117,7 +116,6 @@ import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductManager {
- private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage();
private static final Logger LOGGER =
LoggerFactory.getLogger(VendorSoftwareProductManagerImpl.class);
@@ -183,8 +181,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public ValidationResponse validate(String vspId, Version version) throws IOException {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
VspDetails vspDetails = getValidatedVsp(vspId, version);
Collection<ComponentDependencyModelEntity> componentDependencies =
componentDependencyModelDao.list(new ComponentDependencyModelEntity(vspId, version, null));
@@ -224,9 +220,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
validationResponse
.setVspErrors(vspErrors, LoggerTragetServiceName.SUBMIT_VSP);
validationResponse.setLicensingDataErrors(validateLicensingData(vspDetails));
-
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return validationResponse;
}
@@ -259,8 +252,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public Map<String, List<ErrorMessage>> compile(String vspId, Version version) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
ToscaServiceModel serviceModel =
OnboardingMethod.Manual.name().equals(getValidatedVsp(vspId, version).getOnboardingMethod())
//Generate Tosca service model for Manual Onboarding flow
@@ -269,7 +260,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
: serviceModelDao.getServiceModel(vspId, version);
Map<String, List<ErrorMessage>> compilationErrors = compile(vspId, version, serviceModel);
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return compilationErrors;
}
@@ -344,8 +334,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
}
private Set<CompositionEntityValidationData> componentValidation(String vspId, Version version) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
Set<CompositionEntityValidationData> validationData = new HashSet<>();
Collection<ComponentEntity> components =
componentDao.list(new ComponentEntity(vspId, version, null));
@@ -474,15 +462,11 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
}
private Collection<ErrorCode> validateLicensingData(VspDetails vspDetails) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspDetails.getId());
-
if (vspDetails.getVendorId() == null || vspDetails.getVlmVersion() == null
|| vspDetails.getLicenseAgreement() == null
|| CollectionUtils.isEmpty(vspDetails.getFeatureGroups())) {
return Collections.emptyList();
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspDetails.getId());
return vendorLicenseFacade
.validateLicensingData(vspDetails.getVendorId(), vspDetails.getVlmVersion(),
vspDetails.getLicenseAgreement(), vspDetails.getFeatureGroups());
@@ -490,20 +474,14 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public VspDetails createVsp(VspDetails vspDetails) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null);
-
vspInfoDao.create(vspDetails);
vspInfoDao.updateQuestionnaireData(vspDetails.getId(), vspDetails.getVersion(),
new JsonSchemaDataGenerator(getVspQuestionnaireSchema(null)).generateData());
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null);
return vspDetails;
}
@Override
public void updateVsp(VspDetails vspDetails) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspDetails.getId());
-
VspDetails retrieved = vspInfoDao.get(vspDetails);
// TODO: 6/21/2017 remove this validation when validation will be added in the REST level
if (retrieved == null) {
@@ -518,8 +496,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
updateUniqueName(retrieved.getName(), vspDetails.getName());
vspInfoDao.update(vspDetails);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspDetails.getId());
}
private void updateDeploymentFlavor(VspDetails vspDetails) {
@@ -553,11 +529,7 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public VspDetails getVsp(String vspId, Version version) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
VspDetails vsp = getValidatedVsp(vspId, version);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return vsp;
}
@@ -574,13 +546,9 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public void deleteVsp(String vspId) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
LoggerTragetServiceName.DELETE_VSP, ErrorLevel.ERROR.name(),
LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Unsupported operation");
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
-
throw new UnsupportedOperationException(
VendorSoftwareProductConstants.UNSUPPORTED_OPERATION_ERROR);
}
@@ -592,7 +560,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public File getTranslatedFile(String vspId, Version version) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
String errorMessage;
PackageInfo packageInfo = packageInfoDao.get(new PackageInfo(vspId, version));
@@ -625,17 +592,12 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
throw new CoreException(new TranslationFileCreationErrorBuilder(vspId, version).build(),
exception);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
-
return translatedFile;
}
@Override
public byte[] getOrchestrationTemplateFile(String vspId, Version version) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
OrchestrationTemplateEntity uploadData = orchestrationTemplateDao.get(vspId, version);
ByteBuffer contentData = uploadData.getContentData();
if (contentData == null) {
@@ -654,8 +616,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't get uploaded HEAT");
throw new CoreException(new FileCreationErrorBuilder(vspId).build(), exception);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return baos.toByteArray();
}
@@ -666,8 +626,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public PackageInfo createPackage(String vspId, Version version) throws IOException {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
ToscaServiceModel toscaServiceModel = enrichedServiceModelDao.getServiceModel(vspId, version);
VspDetails vspDetails = vspInfoDao.get(new VspDetails(vspId, version));
Version vlmVersion = vspDetails.getVlmVersion();
@@ -686,8 +644,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
packageInfoDao.create(packageInfo);
LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.CREATE_PACKAGE + vspId);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return packageInfo;
}
@@ -706,8 +662,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
@Override
public QuestionnaireResponse getVspQuestionnaire(String vspId, Version version) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
VspQuestionnaireEntity retrieved = vspInfoDao.getQuestionnaire(vspId, version);
VersioningUtil.validateEntityExistence(retrieved, new VspQuestionnaireEntity(vspId, version),
VspDetails.ENTITY_TYPE);
@@ -717,19 +671,12 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
QuestionnaireResponse questionnaireResponse = new QuestionnaireResponse();
questionnaireResponse.setData(questionnaireData);
questionnaireResponse.setSchema(getVspQuestionnaireSchema(null));
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
-
return questionnaireResponse;
}
@Override
public void updateVspQuestionnaire(String vspId, Version version, String questionnaireData) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
vspInfoDao.updateQuestionnaireData(vspId, version, questionnaireData);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
}
@@ -758,8 +705,6 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
private QuestionnaireValidationResult validateQuestionnaire(String vspId, Version version,
String onboardingMethod) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
-
// The apis of CompositionEntityDataManager used here are stateful!
// so, it must be re-created from scratch when it is used!
CompositionEntityDataManager compositionEntityDataManager =
@@ -800,19 +745,14 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
if (MapUtils.isNotEmpty(errorsByEntityId)) {
compositionEntityDataManager.buildTrees();
compositionEntityDataManager.addErrorsToTrees(errorsByEntityId);
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return new QuestionnaireValidationResult(
compositionEntityDataManager.getAllErrorsByVsp(vspId));
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return null;
}
@Override
public File getInformationArtifact(String vspId, Version version) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(VSP_ID, vspId);
VspDetails vspDetails = vspInfoDao.get(new VspDetails(vspId, version));
if (vspDetails == null) {
@@ -836,14 +776,10 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
} catch (IOException ex) {
throw new CoreException(new InformationArtifactCreationErrorBuilder(vspId).build(), ex);
}
-
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(VSP_ID, vspId);
return infoArtifactFile;
}
String getVspQuestionnaireSchema(SchemaTemplateInput schemaInput) {
- MDC_DATA_DEBUG_MESSAGE.debugEntryMessage(null);
- MDC_DATA_DEBUG_MESSAGE.debugExitMessage(null);
return SchemaGenerator
.generate(SchemaTemplateContext.questionnaire, CompositionEntityType.vsp, schemaInput);
}