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
Showing
2 changed files
with
2 additions
and
2 deletions
... | @@ -120,7 +120,7 @@ public class OvsdbBridgeConfig extends AbstractHandlerBehaviour | ... | @@ -120,7 +120,7 @@ public class OvsdbBridgeConfig extends AbstractHandlerBehaviour |
120 | private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) { | 120 | private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) { |
121 | int lastColon = deviceId.toString().lastIndexOf(":"); | 121 | int lastColon = deviceId.toString().lastIndexOf(":"); |
122 | int fistColon = deviceId.toString().indexOf(":"); | 122 | int fistColon = deviceId.toString().indexOf(":"); |
123 | - String ip = deviceId.toString().substring(fistColon + 1, lastColon - 1); | 123 | + String ip = deviceId.toString().substring(fistColon + 1, lastColon); |
124 | String port = deviceId.toString().substring(lastColon + 1); | 124 | String port = deviceId.toString().substring(lastColon + 1); |
125 | IpAddress ipAddress = IpAddress.valueOf(ip); | 125 | IpAddress ipAddress = IpAddress.valueOf(ip); |
126 | long portL = Long.valueOf(port).longValue(); | 126 | long portL = Long.valueOf(port).longValue(); | ... | ... |
... | @@ -111,7 +111,7 @@ public class OvsdbTunnelConfig extends AbstractHandlerBehaviour | ... | @@ -111,7 +111,7 @@ public class OvsdbTunnelConfig extends AbstractHandlerBehaviour |
111 | private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) { | 111 | private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) { |
112 | int lastColon = deviceId.toString().lastIndexOf(":"); | 112 | int lastColon = deviceId.toString().lastIndexOf(":"); |
113 | int fistColon = deviceId.toString().indexOf(":"); | 113 | int fistColon = deviceId.toString().indexOf(":"); |
114 | - String ip = deviceId.toString().substring(fistColon + 1, lastColon - 1); | 114 | + String ip = deviceId.toString().substring(fistColon + 1, lastColon); |
115 | String port = deviceId.toString().substring(lastColon + 1); | 115 | String port = deviceId.toString().substring(lastColon + 1); |
116 | IpAddress ipAddress = IpAddress.valueOf(ip); | 116 | IpAddress ipAddress = IpAddress.valueOf(ip); |
117 | long portL = Long.valueOf(port).longValue(); | 117 | long portL = Long.valueOf(port).longValue(); | ... | ... |
-
Please register or login to post a comment