samuel
Committed by Gerrit Code Review

[ONOS-2512]Fix the bug that catch the node ip and port is wrong in

OvsdbTunnelConfig and OvsdbBridgeConfig

Change-Id: I36da6d2196ca8b2372dd8f70b3c25582fbfdea70
......@@ -120,7 +120,7 @@ public class OvsdbBridgeConfig extends AbstractHandlerBehaviour
private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) {
int lastColon = deviceId.toString().lastIndexOf(":");
int fistColon = deviceId.toString().indexOf(":");
String ip = deviceId.toString().substring(fistColon + 1, lastColon - 1);
String ip = deviceId.toString().substring(fistColon + 1, lastColon);
String port = deviceId.toString().substring(lastColon + 1);
IpAddress ipAddress = IpAddress.valueOf(ip);
long portL = Long.valueOf(port).longValue();
......
......@@ -111,7 +111,7 @@ public class OvsdbTunnelConfig extends AbstractHandlerBehaviour
private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) {
int lastColon = deviceId.toString().lastIndexOf(":");
int fistColon = deviceId.toString().indexOf(":");
String ip = deviceId.toString().substring(fistColon + 1, lastColon - 1);
String ip = deviceId.toString().substring(fistColon + 1, lastColon);
String port = deviceId.toString().substring(lastColon + 1);
IpAddress ipAddress = IpAddress.valueOf(ip);
long portL = Long.valueOf(port).longValue();
......