diff options
author | 付光荣10144542 <fu.guangrong@zte.com.cn> | 2018-08-30 16:23:56 +0800 |
---|---|---|
committer | 付光荣10144542 <fu.guangrong@zte.com.cn> | 2018-08-30 16:23:56 +0800 |
commit | 792d29108336bc5c804511ea5a9626be0bf58c20 (patch) | |
tree | 8def9b3f5d8600e87696853dcbdad2bd4d2ea353 /holmes-actions/src | |
parent | eedc951cb67a0b3de14648740df0d4ead8150e02 (diff) |
Changed the Query Logic for logicLink
Change-Id: I9d8bd3316a70de0f1a1b7b15432fb3a0e9432fda
Issue-ID: HOLMES-160
Signed-off-by: 付光荣10144542 <fu.guangrong@zte.com.cn>
Diffstat (limited to 'holmes-actions/src')
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/aai/AaiQuery4Ccvpn.java | 5 | ||||
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java | 4 |
2 files changed, 5 insertions, 4 deletions
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}"; |