aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorChuanyu Chen <chenchuanyu@huawei.com>2020-10-30 01:00:30 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-30 01:00:30 +0000
commit4026813ee1ae77a92fd36f5de22a9a5d405306e4 (patch)
tree52c35c92268969a728011308b3086c18eff2c1da /adapters
parent095cadcfe590b2cdfd65a56833cb97440c18b3f2 (diff)
parent6b1fda49736a9a5d15385892ae5876aef07ad7bc (diff)
Merge "modify subnetCapabilityQuery interface and some workflow error"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java2
-rw-r--r--adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java29
2 files changed, 29 insertions, 2 deletions
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
index 28789f2a98..84e1eb2acc 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
@@ -159,7 +159,7 @@ public class NssmfAdapterConsts {
new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET));
urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.QUERY_SUB_NET_CAPABILITY),
- new NssmfUrlInfo(INTERNAL_QUERY_SUB_NET_CAPABILITY, HttpMethod.POST));
+ new NssmfUrlInfo(INTERNAL_QUERY_SUB_NET_CAPABILITY, HttpMethod.GET));
}
/**
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
index a4a79bf2cd..432cfacb0b 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
@@ -219,7 +219,11 @@ public class RestUtil {
break;
case GET:
- base = new HttpGet(url);
+ HttpGetWithBody get = new HttpGetWithBody(url);
+ if (content != null) {
+ get.setEntity(new StringEntity(content, APPLICATION_JSON));
+ }
+ base = get;
break;
case PUT:
@@ -280,6 +284,29 @@ public class RestUtil {
}
}
+ class HttpGetWithBody extends HttpEntityEnclosingRequestBase {
+ public static final String METHOD_NAME = "GET";
+
+ public HttpGetWithBody() {
+ super();
+ }
+
+ public HttpGetWithBody(final String uri) {
+ super();
+ setURI(URI.create(uri));
+ }
+
+ public HttpGetWithBody(final URI uri) {
+ super();
+ setURI(uri);
+ }
+
+ @Override
+ public String getMethod() {
+ return METHOD_NAME;
+ }
+ }
+
public HttpClient getHttpsClient() {