summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2021-06-09 09:33:59 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2021-06-09 09:33:59 +0800
commitc08c42c56caaa197f950f6479944bf95593063bc (patch)
tree66957a5e5073a61061f8e5690d9cefca103e840b
parent7707376cd0f5b460f88eb3d1eb5c7fe78077a708 (diff)
Fixed some problems identified by SonarCloud
Change-Id: Iec0ce332527773c127f60fd192e044801f5442e2 Issue-ID: HOLMES-442 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
-rw-r--r--holmes-actions/src/main/java/org/onap/holmes/common/aai/config/AaiConfig.java28
1 files changed, 21 insertions, 7 deletions
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 34fa67a..bc6575f 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
@@ -1,5 +1,5 @@
/**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2017 - 2021 ZTE Corporation.
* <p>
* 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
@@ -25,6 +25,12 @@ public class AaiConfig {
private static final String AAI_AUTHENTICATION_PWD = "AAI";
+ private static final String AAI_PNF_URL_SUF = "/network/pnfs/pnf/{pnfName}/p-interfaces/p-interface/nodeId-{pnfName}-ltpId-{ifName}";
+
+ private AaiConfig() {
+
+ }
+
public static String getAuthenticationCredentials() {
String userCredentials = AAI_AUTHENTICATION_USER + ":"
+ AAI_AUTHENTICATION_PWD;
@@ -33,19 +39,23 @@ public class AaiConfig {
public static class AaiConsts {
+ private AaiConsts() {
+
+ }
+
private static final String AAI_PREF = "/aai/";
public static final String AAI_VNF_ADDR = AAI_PREF + "v11/network/generic-vnfs/generic-vnf";
- public static final String AAI_TP_UPDATE = AAI_PREF + AAI_API_VERSION + "/network/pnfs/pnf/{pnfName}/p-interfaces/p-interface/nodeId-{pnfName}-ltpId-{ifName}";
+ public static final String AAI_TP_UPDATE = AAI_PREF + AAI_API_VERSION + AAI_PNF_URL_SUF;
- public static final String AAI_LINK_QUERY = AAI_PREF + AAI_API_VERSION + "/network/pnfs/pnf/{pnfName}/p-interfaces/p-interface/nodeId-{pnfName}-ltpId-{ifName}";
+ public static final String AAI_LINK_QUERY = AAI_PREF + AAI_API_VERSION + AAI_PNF_URL_SUF;
public static final String AAI_LINK_UPDATE = AAI_PREF + AAI_API_VERSION + "/network/logical-links/logical-link/{linkName}";
public static final String AAI_TP_ADDR = AAI_PREF + AAI_API_VERSION + "/network/pnfs/pnf/{node-Id}/p-interfaces/p-interface/{tp-id}";
- public static final String AAI_VPN_ADDR = AAI_PREF + AAI_API_VERSION + "/network/pnfs/pnf/{pnfName}/p-interfaces/p-interface/nodeId-{pnfName}-ltpId-{ifName}";
+ public static final String AAI_VPN_ADDR = AAI_PREF + AAI_API_VERSION + AAI_PNF_URL_SUF;
public static final String AAI_CONN_ADDR = AAI_PREF + AAI_API_VERSION + "/network/vpn-bindings/vpn-binding/{vpnId}";
@@ -67,6 +77,10 @@ public class AaiConfig {
public static class MsbConsts {
+ private MsbConsts() {
+
+ }
+
private static final String AAI_MSB_PREF = "/api";
private static final String AAI_NETWORK = "/aai-network/";
@@ -77,15 +91,15 @@ public class AaiConfig {
public static final String AAI_VNF_ADDR = AAI_NETWORK + AAI_API_VERSION + "/generic-vnfs/generic-vnf";
- public static final String AAI_TP_UPDATE = AAI_NETWORK + AAI_API_VERSION + "/network/pnfs/pnf/{pnfName}/p-interfaces/p-interface/nodeId-{pnfName}-ltpId-{ifName}";
+ public static final String AAI_TP_UPDATE = AAI_NETWORK + AAI_API_VERSION + AAI_PNF_URL_SUF;
- public static final String AAI_LINK_QUERY = AAI_NETWORK + AAI_API_VERSION + "/network/pnfs/pnf/{pnfName}/p-interfaces/p-interface/nodeId-{pnfName}-ltpId-{ifName}";
+ public static final String AAI_LINK_QUERY = AAI_NETWORK + AAI_API_VERSION + AAI_PNF_URL_SUF;
public static final String AAI_LINK_UPDATE = AAI_NETWORK + AAI_API_VERSION + "/network/logical-links/logical-link/{linkName}";
public static final String AAI_TP_ADDR = AAI_NETWORK + AAI_API_VERSION + "/pnfs/pnf/{node-Id}/p-interfaces/p-interface/{tp-id}";
- public static final String AAI_VPN_ADDR = AAI_NETWORK + AAI_API_VERSION + "/network/pnfs/pnf/{pnfName}/p-interfaces/p-interface/nodeId-{pnfName}-ltpId-{ifName}";
+ public static final String AAI_VPN_ADDR = AAI_NETWORK + AAI_API_VERSION + AAI_PNF_URL_SUF;
public static final String AAI_CONN_ADDR = AAI_NETWORK + AAI_API_VERSION + "/network/vpn-bindings/vpn-binding/{vpnId}";