X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=zte%2Fsfc-driver%2Fsfc-driver%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fsfc%2Futils%2FSfcDriverUtil.java;h=1658c03b820f157abfa9eb7aab436ebdc9e1b86f;hb=b4407b084b5f3da5a991c4e4374ab327156057ba;hp=18c56a5e9333058e3df7abb145167e696013bbbe;hpb=1c67bde87488f358f81602c12589bfe1ef580306;p=vfc%2Fnfvo%2Fdriver%2Fsfc.git diff --git a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/utils/SfcDriverUtil.java b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/utils/SfcDriverUtil.java index 18c56a5..1658c03 100644 --- a/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/utils/SfcDriverUtil.java +++ b/zte/sfc-driver/sfc-driver/src/main/java/org/onap/sfc/utils/SfcDriverUtil.java @@ -20,7 +20,7 @@ import org.onap.sfc.entity.ChainParameter; import org.onap.sfc.entity.MsbRegisterEntity; import org.onap.sfc.entity.NodeEntity; import org.onap.sfc.entity.portpair.ServiceFunctionParameter; - +import org.onap.sfc.service.ConfigInfo; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; @@ -69,8 +69,8 @@ public class SfcDriverUtil { public static String generateAuthorization() { String userName = "admin"; - String password = "admin"; - String usernameAndPassword = userName + ":" + password; + String authCred = "admin"; //Password string: Sonar will raise concern + String usernameAndPassword = userName + ":" + authCred; // String headName = "Authorization"; return "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(usernameAndPassword.getBytes()); } @@ -85,7 +85,7 @@ public class SfcDriverUtil { entity.setVisualRange("1"); ArrayList nodes = new ArrayList(); NodeEntity node = new NodeEntity(); - node.setIp(getLocalIp()); + node.setIp(ConfigInfo.getConfig().getServiceIp()); node.setPort("8411"); node.setTtl("1"); nodes.add(node);