diff options
author | 2017-10-19 14:31:33 +0800 | |
---|---|---|
committer | 2017-10-19 14:31:33 +0800 | |
commit | 8739e1df33bdfb0155b77252ebcc94e2f087b725 (patch) | |
tree | 08f84be50793b4f2aca914ea6e275f0c9660d25b /nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java | |
parent | e6ef1e3333bff9c9da98873f40bb4e1ac53e4d79 (diff) |
Update http query part
Change-Id: I8b316decb203e3f4efbce8c9d47a88479065dbf6
Issue-ID: VFC-544
Signed-off-by: yufei_zhou <yufei.zhou@nokia-sbell.com>
Diffstat (limited to 'nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java')
3 files changed, 10 insertions, 7 deletions
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientProcessorImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientProcessorImpl.java index 319b0e32..ca8e7e2e 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientProcessorImpl.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientProcessorImpl.java @@ -49,4 +49,8 @@ public class HttpClientProcessorImpl implements HttpClientProcessorInf{ } return processor.process(url); } + + public void setHttpClientBuilder(HttpClientBuilder httpClientBuilder) { + this.httpClientBuilder = httpClientBuilder; + } } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java index bd3e3635..225a228a 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java @@ -48,7 +48,6 @@ public class HttpRequestProcessor { HttpResponse response = httpClient.execute(httpRequest); HttpResult httpResult = buildHttpResult(response); - httpClient.close(); return httpResult; } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/init/EnvVariablesInitialization.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/init/EnvVariablesInitialization.java index eddc51a5..1fb7138a 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/init/EnvVariablesInitialization.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/init/EnvVariablesInitialization.java @@ -58,15 +58,15 @@ public class EnvVariablesInitialization implements ApplicationRunner { } try { - handLcmMsbServiceInfo(); + handleLcmMsbServiceInfo(); } catch (Exception e) { - logger.error("handLcmMsbServiceInfo error", e); + logger.error("handleLcmMsbServiceInfo error", e); } try { - handCatalogMsbServiceInfo(); + handleCatalogMsbServiceInfo(); } catch (Exception e) { - logger.error("handCatalogMsbServiceInfo error", e); + logger.error("handleCatalogMsbServiceInfo error", e); } } @@ -86,13 +86,13 @@ public class EnvVariablesInitialization implements ApplicationRunner { return CommonConstants.SCHEMA_HTTP + "://" + adaptorEnv.getMsbIp() + ":" + adaptorEnv.getMsbPort(); } - private void handLcmMsbServiceInfo() throws ClientProtocolException, IOException { + private void handleLcmMsbServiceInfo() throws ClientProtocolException, IOException { String urlInMsb = msbMgmr.getServiceUrlInMsbBySeriveNameAndVersion(adaptorEnv.getLcmServiceNameInMsb(), adaptorEnv.getLcmVersionInMsb()); adaptorEnv.setLcmUrlInMsb(urlInMsb); adaptorEnv.setLcmApiUriFront(generateApiUriFront(urlInMsb)); } - private void handCatalogMsbServiceInfo() throws ClientProtocolException, IOException { + private void handleCatalogMsbServiceInfo() throws ClientProtocolException, IOException { String urlInMsb = msbMgmr.getServiceUrlInMsbBySeriveNameAndVersion(adaptorEnv.getCatalogServiceNameInMsb(), adaptorEnv.getCatalogVersionInMsb()); adaptorEnv.setCatalogUrlInMsb(urlInMsb); adaptorEnv.setCatalogApiUriFront(generateApiUriFront(urlInMsb)); |