aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-03-21 18:40:40 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-21 18:40:40 +0000
commitae62cbb1785ea581be62496170ce5595bacd51da (patch)
tree47d87260c52d662dae1d318a5fa747a60ffd3252 /bpmn
parent1b9b833a49976c449bbb65b8a7975e8b17620154 (diff)
parentbf26eb2128ea7b77d6cbe6091deed50cd473035a (diff)
Merge "Removed MsoUtils.log() calls from CatalogDbUtils"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy18
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsFactory.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy6
3 files changed, 15 insertions, 13 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
index 0d9b3c5b94..d5b0b31a39 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
@@ -51,13 +51,13 @@ class CatalogDbUtils {
private static final Logger logger = LoggerFactory.getLogger( CatalogDbUtils.class);
private HttpClientFactory httpClientFactory
- private MsoUtils msoUtils
- private JsonUtils jsonUtils
+ private MsoUtils utils
+ private JsonUtils jsonUtils
static private String defaultDbAdapterVersion = "v2"
- CatalogDbUtils(HttpClientFactory httpClientFactory, MsoUtils msoUtils, JsonUtils jsonUtils) {
+ CatalogDbUtils(HttpClientFactory httpClientFactory, JsonUtils jsonUtils) {
this.httpClientFactory = httpClientFactory
- this.msoUtils = msoUtils
+ this.utils = new MsoUtils()
this.jsonUtils = jsonUtils
}
@@ -105,7 +105,7 @@ class CatalogDbUtils {
}
}
catch (Exception e) {
- msoUtils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ logger.error("Exception in Querying Catalog DB: " + e.message)
throw e
}
@@ -488,7 +488,7 @@ class CatalogDbUtils {
}
}
catch (Exception e) {
- msoUtils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ logger.error("Exception in Querying Catalog DB: " + e.message)
throw e
}
@@ -500,13 +500,13 @@ class CatalogDbUtils {
String encodedString = null
try {
String basicAuthValueDB = UrnPropertiesReader.getVariable("mso.adapters.db.auth", execution)
- msoUtils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB)
+ logger.debug("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB)
- encodedString = msoUtils.getBasicAuth(basicAuthValueDB, UrnPropertiesReader.getVariable("mso.msoKey", execution))
+ encodedString = utils.getBasicAuth(basicAuthValueDB, UrnPropertiesReader.getVariable("mso.msoKey", execution))
execution.setVariable("BasicAuthHeaderValueDB",encodedString)
} catch (IOException ex) {
String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()
- msoUtils.log("ERROR", dataErrorMessage)
+ logger.error(dataErrorMessage)
}
return encodedString
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsFactory.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsFactory.groovy
index faa0037169..bf7d07cbb3 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsFactory.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsFactory.groovy
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 NOKIA.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* 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
@@ -26,6 +28,6 @@ import org.onap.so.client.HttpClientFactory
public class CatalogDbUtilsFactory {
CatalogDbUtils create() {
- return new CatalogDbUtils(new HttpClientFactory(), new MsoUtils(), new JsonUtils())
+ return new CatalogDbUtils(new HttpClientFactory(), new JsonUtils())
}
}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy
index d6a7cf0634..d7438f80f9 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 Nokia.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* 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
@@ -51,7 +53,6 @@ class CatalogDbUtilsTest {
private static final String RESPONSE_FROM_CATALOG_DB = "{\"serviceVnfs\": [{\"name\": \"service1\"," +
"\"vfModules\": [{\"name\": \"module1\", \"isBase\":true, \"initialCount\":1}]}]}"
private HttpClientFactory httpClientFactoryMock
- private MsoUtils msoUtilsMock
private JsonUtils jsonUtilsMock
private HttpClient httpClientMock
private DelegateExecutionFake executionFake
@@ -61,11 +62,10 @@ class CatalogDbUtilsTest {
@Before
void setUp() {
httpClientFactoryMock = mock(HttpClientFactory.class)
- msoUtilsMock = mock(MsoUtils.class)
jsonUtilsMock = mock(JsonUtils.class)
httpClientMock = mock(HttpClient.class)
executionFake = new DelegateExecutionFake()
- testedObject = new CatalogDbUtils(httpClientFactoryMock, msoUtilsMock, jsonUtilsMock)
+ testedObject = new CatalogDbUtils(httpClientFactoryMock, jsonUtilsMock)
}
@Test