From 792d29108336bc5c804511ea5a9626be0bf58c20 Mon Sep 17 00:00:00 2001 From: 付光荣10144542 Date: Thu, 30 Aug 2018 16:23:56 +0800 Subject: Changed the Query Logic for logicLink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9d8bd3316a70de0f1a1b7b15432fb3a0e9432fda Issue-ID: HOLMES-160 Signed-off-by: 付光荣10144542 --- .../src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java | 5 +++-- .../src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'holmes-actions') diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java index 5d33c43..75b1bfc 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java @@ -65,8 +65,9 @@ public class AaiQuery4Ccvpn { params.put("networkId", networkId); params.put("pnfName", pnfName); params.put("ifName", ifName); - params.put("status", status); - Response response = get(getHostAddr(), getPath(AaiConfig.MsbConsts.AAI_LINK_QUERY, params)); + + Response response = get(getHostAddr(), getPath(AaiConfig.MsbConsts.AAI_LINK_QUERY, params) + + (status == null ? "" : String.format("&operational-status=%s", status))); if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) { throw new RuntimeException("Failed to connect to AAI. Cause: " + response.getStatusInfo().getReasonPhrase()); diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java index dda9922..f1b3e21 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java @@ -39,7 +39,7 @@ public class AaiConfig { public static final String AAI_TP_UPDATE = AAI_PREF + AAI_API_VERSION + "/network/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces/p-interface/{ifName}"; - public static final String AAI_LINK_QUERY = AAI_PREF + AAI_API_VERSION + "/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces?interface-name={ifName}&operational-status={status}"; + public static final String AAI_LINK_QUERY = AAI_PREF + AAI_API_VERSION + "/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces?interface-name={ifName}"; public static final String AAI_LINK_UPDATE = AAI_PREF + AAI_API_VERSION + "/network/logical-links/logical-link/{linkName}"; @@ -71,7 +71,7 @@ public class AaiConfig { public static final String AAI_TP_UPDATE = AAI_MSB_PREF + AAI_NETWORK + AAI_API_VERSION + "/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces/p-interface/{ifName}"; - public static final String AAI_LINK_QUERY = AAI_MSB_PREF + AAI_NETWORK + AAI_API_VERSION + "/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces?interface-name={ifName}&operational-status={status}"; + public static final String AAI_LINK_QUERY = AAI_MSB_PREF + AAI_NETWORK + AAI_API_VERSION + "/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces?interface-name={ifName}"; public static final String AAI_LINK_UPDATE = AAI_MSB_PREF + AAI_NETWORK + AAI_API_VERSION + "/logical-links/logical-link/{linkName}"; -- cgit 1.2.3-korg