From 0b6288e180c1d33bba88b3df5e03442c57058db9 Mon Sep 17 00:00:00 2001 From: Piyush Garg Date: Wed, 29 Aug 2018 15:40:53 +0530 Subject: Added support for VF Module Delete recipe Enhanced SOActorServiceProvider to support VF Module Delete Recipe. Added SOOperationType enum to map the policy recipe with the SO API that we want to call for a recipe. vf module id from non-base vf module is used to construct the delete request url and same will be deleted. Updated SOManager so that it sends request to SO based on the SOOperationType enum value. Enhanced RESTManager to add support for the http delete using new class HttpDeleteWithBody (to allow pass the payload to the SO delete VF module API). Change-Id: I15b678ed9ebc85dfa7cb62bbf23e41c0fe6e4c69 Issue-ID: POLICY-1079 Signed-off-by: Piyush Garg --- .../aai/src/main/java/org/onap/policy/aai/AaiManager.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'controlloop/common/model-impl/aai') diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java index 56f79d378..b54981d22 100644 --- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java @@ -88,13 +88,13 @@ public final class AaiManager { return null; } - int httpResponseCode = httpDetails.a; + int httpResponseCode = httpDetails.first; logger.info(url); logger.info("{}", httpResponseCode); - logger.info(httpDetails.b); + logger.info(httpDetails.second); - if (httpDetails.b != null) { + if (httpDetails.second != null) { return composeResponse(httpDetails, url, AaiNqResponse.class); } return null; @@ -174,11 +174,11 @@ public final class AaiManager { return null; } - int httpResponseCode = httpDetailsGet.a; + int httpResponseCode = httpDetailsGet.first; logger.info(urlGet); logger.info("{}", httpResponseCode); - logger.info(httpDetailsGet.b); + logger.info(httpDetailsGet.second); if (httpResponseCode == 200) { T responseGet = composeResponse(httpDetailsGet, urlGet, classOfResponse); @@ -226,8 +226,8 @@ public final class AaiManager { private T composeResponse(final Pair httpDetails, final String url, final Class classOfResponse) { try { - T response = Serialization.gsonPretty.fromJson(httpDetails.b, classOfResponse); - netLogger.info("[IN|{}|{}|]{}{}", "AAI", url, LINE_SEPARATOR, httpDetails.b); + T response = Serialization.gsonPretty.fromJson(httpDetails.second, classOfResponse); + netLogger.info("[IN|{}|{}|]{}{}", "AAI", url, LINE_SEPARATOR, httpDetails.second); return response; } catch (JsonSyntaxException e) { logger.error("postQuery threw: ", e); -- cgit 1.2.3-korg