From 2bd5e9339b6255eb8d9cbeae183c1728984d5a88 Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Thu, 15 Aug 2019 17:23:44 +0300 Subject: probe sdc by retrieving service model if uuid configured If system.properties has value for probe.sdc.model.uuid then usd this value for retrieving service model otherwise probe only sdc connectivity with sdc2/rest/healthCheck Issue-ID: VID-378 Signed-off-by: Eylon Malin Change-Id: Icd1c31217e56a8c0cfa5c2f2bc5f11e0c8dd7ff8 Signed-off-by: Eylon Malin --- .../org/onap/vid/aai/ResponseWithRequestInfo.java | 49 ---------------------- .../org/onap/vid/aai/ResponseWithRequestInfo.kt | 34 +++++++++++++++ 2 files changed, 34 insertions(+), 49 deletions(-) delete mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.kt (limited to 'vid-app-common/src/main/java/org/onap/vid/aai') diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.java b/vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.java deleted file mode 100644 index 567099c81..000000000 --- a/vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.vid.aai; - -import org.springframework.http.HttpMethod; - -import javax.ws.rs.core.Response; - -public class ResponseWithRequestInfo { - private String requestUrl; - private HttpMethod requestHttpMethod; - private Response response; - - public ResponseWithRequestInfo(Response response, String requestUrl, HttpMethod requestHttpMethod) { - this.response = response; - this.requestUrl = requestUrl; - this.requestHttpMethod = requestHttpMethod; - } - - public String getRequestUrl() { - return requestUrl; - } - - public HttpMethod getRequestHttpMethod() { - return requestHttpMethod; - } - - public Response getResponse() { - return response; - } -} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.kt b/vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.kt new file mode 100644 index 000000000..aaa41c2d3 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/ResponseWithRequestInfo.kt @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.vid.aai + +import io.joshworks.restclient.http.HttpResponse +import org.springframework.http.HttpMethod + +import javax.ws.rs.core.Response + +open class BaseResponseWithRequestInfo(val requestUrl: String?, val requestHttpMethod: HttpMethod) + +class HttpResponseWithRequestInfo(val response: HttpResponse?, requestUrl: String?, requestHttpMethod: HttpMethod) : + BaseResponseWithRequestInfo(requestUrl, requestHttpMethod) + +class ResponseWithRequestInfo(val response: Response?, requestUrl: String?, requestHttpMethod: HttpMethod) : + BaseResponseWithRequestInfo(requestUrl, requestHttpMethod) -- cgit 1.2.3-korg