aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
authormojahidi <mojahidul.islam@amdocs.com>2018-05-15 14:26:08 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-05-15 11:39:01 +0000
commitf6aa388616a47bad055e8c166e4bc2d61cebdc12 (patch)
treea997a8024f5528405bc356108c04905e0fd6986a /openecomp-be
parentdcc03a35879a1a194500b2e0b5be32f34d8210b6 (diff)
Removed logger.debug(, exception)
Removed logger.debug(, exception) from code Change-Id: Ifc3d5947932027c3261c50a8f6275f5034576d60 Issue-ID: SDC-836 Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java21
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java29
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java25
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java24
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java26
5 files changed, 64 insertions, 61 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java
index b0d0b64ad8..92aa6e8540 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java
@@ -1,9 +1,6 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2018 European Support Limited
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -15,8 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * ============LICENSE_END=========================================================
- */
+*/
package org.openecomp.sdc.vendorsoftwareproduct.impl;
@@ -27,8 +23,6 @@ import org.mockito.MockitoAnnotations;
import org.mockito.Spy;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.session.SessionContextProviderFactory;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
@@ -55,8 +49,6 @@ import static org.mockito.Mockito.verify;
public class NetworkManagerImplTest {
- private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
-
private static final String VSP_ID = "vsp";
private static final String USER_ID = "test_user1";
private static final Version VERSION = new Version("version_id");
@@ -186,7 +178,6 @@ public class NetworkManagerImplTest {
networkManager.createNetwork(network);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -197,7 +188,6 @@ public class NetworkManagerImplTest {
networkManager.getNetwork(vspId, version, networkId);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -208,7 +198,6 @@ public class NetworkManagerImplTest {
networkManager.updateNetwork(new NetworkEntity(vspId, version, networkId));
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -218,7 +207,6 @@ public class NetworkManagerImplTest {
networkManager.listNetworks(vspId, version);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -230,7 +218,6 @@ public class NetworkManagerImplTest {
networkManager.deleteNetwork(vspId, version, networkId);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java
index c63e5bd21b..9efb9e1d11 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright © 2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
package org.openecomp.sdc.vendorsoftwareproduct.impl;
import org.mockito.InjectMocks;
@@ -5,8 +21,6 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.Spy;
import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.NetworkManager;
import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
@@ -38,8 +52,6 @@ import static org.mockito.Mockito.verify;
public class NicManagerImplTest {
- private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
-
private static final String NIC_NOT_EXIST_MSG =
"Vendor Software Product NIC with Id nic1 does not exist for Vendor Software Product with " +
"id VSP_ID and version version_id";
@@ -137,7 +149,6 @@ public class NicManagerImplTest {
try {
NicEntity created = nicManager.createNic(nicEntity);
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(VendorSoftwareProductErrorCodes.NIC_NAME_FORMAT_NOT_ALLOWED,
exception.code().id());
}
@@ -163,7 +174,6 @@ public class NicManagerImplTest {
try {
NicEntity created = nicManager.createNic(nicEntity);
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals("Invalid request, NIC with name " + nic.getName() +
" already exist for component with ID " + nicEntity.getComponentId() + ".",
exception.code().message());
@@ -186,7 +196,6 @@ public class NicManagerImplTest {
try {
NicEntity created = nicManager.createNic(nicEntity);
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals("Invalid request,NetworkId not allowed for External Networks",
exception.code().message());
Assert
@@ -210,7 +219,6 @@ public class NicManagerImplTest {
try {
NicEntity created = nicManager.createNic(nicEntity);
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals("Invalid request, Network Description not allowed for Internal Networks",
exception.code().message());
Assert.assertEquals(VendorSoftwareProductErrorCodes
@@ -359,7 +367,6 @@ public class NicManagerImplTest {
nicManager.updateNic(nicEntity);
Assert.fail();
} catch (CoreException ex) {
- log.debug("", ex);
Assert.assertEquals(VendorSoftwareProductErrorCodes.NIC_NAME_FORMAT_NOT_ALLOWED,
ex.code().id());
}
@@ -458,7 +465,6 @@ public class NicManagerImplTest {
nicManager.createNic(nic);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -469,7 +475,6 @@ public class NicManagerImplTest {
nicManager.getNic(vspId, version, componentId, nicId);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -480,7 +485,6 @@ public class NicManagerImplTest {
nicManager.updateNic(new NicEntity(vspId, version, componentId, nicId));
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -491,7 +495,6 @@ public class NicManagerImplTest {
nicManager.deleteNic(vspId, version, componentId, nicId);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java
index cb2ff421f2..328f21ab47 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright © 2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
package org.openecomp.sdc.vendorsoftwareproduct.impl;
import org.mockito.ArgumentCaptor;
@@ -10,8 +26,6 @@ import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
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.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessType;
@@ -38,8 +52,6 @@ import static org.mockito.Mockito.verify;
public class ProcessManagerImplTest {
- private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName());
-
private static final String USER1 = "processesTestUser";
private static final String VSP_ID = "vsp";
private static final Version VERSION = new Version(0, 1);
@@ -311,7 +323,6 @@ public class ProcessManagerImplTest {
processManager.getProcess(vspId, version, componentId, processId);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -324,7 +335,6 @@ public class ProcessManagerImplTest {
.updateProcess(new ProcessEntity(vspId, version, componentId, processId));
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -335,7 +345,6 @@ public class ProcessManagerImplTest {
processManager.getProcessArtifact(vspId, version, componentId, processId);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -349,7 +358,6 @@ public class ProcessManagerImplTest {
vspId, version, componentId, processId);
Assert.fail();
} catch (CoreException exception) {
- log.error("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
@@ -360,7 +368,6 @@ public class ProcessManagerImplTest {
processManager.deleteProcessArtifact(vspId, VERSION, componentId, processId);
Assert.fail();
} catch (CoreException exception) {
- log.debug("", exception);
Assert.assertEquals(exception.code().id(), expectedErrorCode);
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
index 9cebdd2ccc..01f9de27bb 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
@@ -1,30 +1,24 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+/*
+ * Copyright © 2018 European Support Limited
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * ============LICENSE_END=========================================================
- */
+*/
package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.heat.datatypes.HeatBoolean;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
@@ -44,8 +38,6 @@ import java.util.Optional;
public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBase {
- protected static Logger logger = LoggerFactory.getLogger(ResourceTranslationNeutronSubnetImpl.class);
-
@Override
public void translate(TranslateTo translateTo) {
Optional<AttachedResourceId> subnetNetwork = getAttachedNetworkResource(translateTo);
@@ -133,14 +125,12 @@ public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBas
Boolean booleanValue = HeatBoolean.eval(defaultVal);
dhcpParameterDefinition.set_default(booleanValue);
} catch (CoreException coreException) {
- logger.debug("",coreException);
- //if value is not valid value for boolean set with dhcp_enabled default value = true
dhcpParameterDefinition.set_default(true);
logger.warn("Parameter '" + dhcpEnabledParameterName + "' used for "
+ ToscaConstants.DHCP_ENABLED_PROPERTY_NAME
+ " boolean property, but it's value is not a valid boolean value, therefore "
+ ToscaConstants.DHCP_ENABLED_PROPERTY_NAME
- + " property will be set with default value of 'true'.");
+ + " property will be set with default value of 'true'.", coreException);
}
dhcpParameterDefinition.setType(PropertyType.BOOLEAN.getDisplayName());
}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java
index 76b63d5498..834e059a37 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/src/main/java/org/openecomp/sdc/validation/base/ResourceBaseValidator.java
@@ -1,5 +1,25 @@
+/*
+ * Copyright © 2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
package org.openecomp.sdc.validation.base;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
import org.apache.commons.collections4.MapUtils;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.core.validation.ErrorMessageCode;
@@ -22,10 +42,6 @@ import org.openecomp.sdc.validation.Validator;
import org.openecomp.sdc.validation.type.ConfigConstants;
import org.openecomp.sdc.validation.util.ValidationUtil;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
/**
* Created by TALIO on 2/16/2017.
*/
@@ -54,7 +70,7 @@ public class ResourceBaseValidator implements Validator {
try {
manifestContent = ValidationUtil.validateManifest(globalContext);
} catch (Exception exception) {
- LOGGER.debug("",exception);
+ LOGGER.error("Failed to validate manifest file", exception);
return;
}