Skip to content
Snippets Groups Projects
Commit 7f17d13a authored by Michael Stolarchuk's avatar Michael Stolarchuk
Browse files

Change the compound key separator for these primary keys to '|'

parent a6769855
No related branches found
No related tags found
No related merge requests found
......@@ -1099,7 +1099,7 @@ public class Controller
String datapathIdString = sw.getStringId();
Map<String, Object> portInfo = new HashMap<String, Object>();
int portNumber = U16.f(port.getPortNumber());
String id = datapathIdString + ":" + portNumber;
String id = datapathIdString + "|" + portNumber;
portInfo.put(PORT_ID, id);
portInfo.put(PORT_SWITCH, datapathIdString);
portInfo.put(PORT_NUMBER, portNumber);
......@@ -1125,7 +1125,7 @@ public class Controller
protected void removePortInfo(IOFSwitch sw, short portNumber) {
String datapathIdString = sw.getStringId();
String id = datapathIdString + ":" + portNumber;
String id = datapathIdString + "|" + portNumber;
storageSource.deleteRowAsync(PORT_TABLE_NAME, id);
}
......
......@@ -1476,7 +1476,7 @@ public class DeviceManagerImpl implements IDeviceManagerService, IOFMessageListe
String switchId = switchPort.getSw().getStringId();
Short port = switchPort.getPort();
String attachmentPointId =
deviceId + "-" + switchId + "-" + port.toString();
deviceId + "|" + switchId + "|" + port.toString();
Map<String, Object> rowValues = new HashMap<String, Object>();
rowValues.put(ID_COLUMN_NAME, attachmentPointId);
......@@ -1506,7 +1506,7 @@ public class DeviceManagerImpl implements IDeviceManagerService, IOFMessageListe
String switchId = switchPort.getSw().getStringId();
Short port = switchPort.getPort();
String attachmentPointId =
deviceId + "-" + switchId + "-" + port.toString();
deviceId + "|" + switchId + "|" + port.toString();
storageSource.deleteRowAsync(
DEVICE_ATTACHMENT_POINT_TABLE_NAME, attachmentPointId);
} catch (NullPointerException e) {
......@@ -1522,7 +1522,7 @@ public class DeviceManagerImpl implements IDeviceManagerService, IOFMessageListe
String deviceId = device.getDlAddrString();
String networkAddressString = IPv4.fromIPv4Address(
networkAddress.getNetworkAddress());
String networkAddressId = deviceId + "-" + networkAddressString;
String networkAddressId = deviceId + "|" + networkAddressString;
if (networkAddress.getNetworkAddress() == 0) {
log.error("Zero network address for device {}\n {}",
......@@ -1547,7 +1547,7 @@ public class DeviceManagerImpl implements IDeviceManagerService, IOFMessageListe
String deviceId = device.getDlAddrString();
String networkAddressString = IPv4.fromIPv4Address(
networkAddress.getNetworkAddress());
String networkAddressId = deviceId + "-" + networkAddressString;
String networkAddressId = deviceId + "|" + networkAddressString;
storageSource.deleteRowAsync(DEVICE_NETWORK_ADDRESS_TABLE_NAME,
networkAddressId);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment