diff options
author | hetengjiao <hetengjiao@chinamobile.com> | 2020-10-29 11:18:50 +0800 |
---|---|---|
committer | HE TENGJIAO <hetengjiao@chinamobile.com> | 2020-10-29 10:34:40 +0000 |
commit | 6b1fda49736a9a5d15385892ae5876aef07ad7bc (patch) | |
tree | adc85410a990a446d960790c0b070b0ba1daaff5 /adapters/mso-nssmf-adapter/src/main | |
parent | aa859daa7e210a286aae0e496fa09b4d9c133b86 (diff) |
modify subnetCapabilityQuery interface and some workflow error
Issue-ID: SO-2963
Signed-off-by: hetengjiao <hetengjiao@chinamobile.com>
Change-Id: Ieda037b617f3743a28aaba30e7f22bf5df919a24
Diffstat (limited to 'adapters/mso-nssmf-adapter/src/main')
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() { |