summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-11-25 02:31:18 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-25 02:31:18 +0000
commit1b22f332a4640e65c24dcab9d1b929f5c6d752cf (patch)
treea49a5797149f7d8eabe1728ec20775f6165e9061 /bpmn/so-bpmn-infrastructure-common
parent86b26db6e9bdcfae238833197fbc92642547ea7f (diff)
parente6dc14ab8c5a9ef72ed9e0ddc781ea3e11bf291e (diff)
Merge "Fix retrieval for SDNC endpoint" into casablanca
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java11
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java2
2 files changed, 9 insertions, 4 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index 0a00a61f83..3108adaa53 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -289,9 +289,8 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
protected boolean isSend2SdncDirectly() {
logger.info("AbstractSdncOperationTask.isSend2SdncDirectly begin!");
- String sdncIp = UrnPropertiesReader.getVariable("sdnc-ip");
- String sdncPort = UrnPropertiesReader.getVariable("sdnc-port");
- if (!StringUtils.isBlank(sdncIp) && isIp(sdncIp) && !StringUtils.isBlank(sdncPort)) {
+ String sdncHost = UrnPropertiesReader.getVariable("sdnc.host");
+ if (!StringUtils.isBlank(sdncHost)) {
logger.info("AbstractSdncOperationTask.isSend2SdncDirectly = true.");
return true;
}
@@ -317,6 +316,12 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
return returnPort;
}
+ protected String getSdncHost() {
+ String sdncHost = UrnPropertiesReader.getVariable("sdnc.host");
+ logger.info("AbstractSdncOperationTask.getSdncPort: returnPort = {}", sdncHost);
+ return sdncHost;
+ }
+
private GenericResourceApi getGenericResourceApiClient() {
logger.info("AbstractSdncOperationTask.getGenericResourceApiClient begin!");
String msbIp = System.getenv().get(ONAP_IP);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
index 8e41d0d88e..dc625d35c3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
@@ -72,7 +72,7 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
private void send2SdncDirectly(String defaulAuth,
RpcServiceTopologyOperationInputEntity inputEntity) throws RouteException {
sdncLogger.info("SdncServiceTopologyOperationTask.send2SdncDirectly begin!");
- String url = "http://" + getSdncIp() + ":" + getSdncPort() + URL;
+ String url = getSdncHost() + URL;
HttpPost httpPost = new HttpPost(url);
httpPost.addHeader("Authorization", defaulAuth);
httpPost.addHeader("Content-type", "application/json");