use of org.onosproject.ovsdb.controller.OvsdbNodeId in project onos by opennetworkinglab.
the class OvsdbPortConfig method changeDeviceIdToNodeId.
// OvsdbNodeId(IP) is used in the adaptor while DeviceId(ovsdb:IP)
// is used in the core. So DeviceId need be changed to OvsdbNodeId.
private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) {
String[] splits = deviceId.toString().split(":");
if (splits.length < 1) {
return null;
}
IpAddress ipAddress = IpAddress.valueOf(splits[1]);
return new OvsdbNodeId(ipAddress, 0);
}
use of org.onosproject.ovsdb.controller.OvsdbNodeId in project onos by opennetworkinglab.
the class OvsdbPortConfig method getOvsdbClient.
private OvsdbClientService getOvsdbClient(DriverHandler handler) {
OvsdbController ovsController = handler.get(OvsdbController.class);
OvsdbNodeId nodeId = changeDeviceIdToNodeId(handler.data().deviceId());
return ovsController.getOvsdbClient(nodeId);
}
use of org.onosproject.ovsdb.controller.OvsdbNodeId in project onos by opennetworkinglab.
the class OvsdbQueueConfig method changeDeviceIdToNodeId.
// OvsdbNodeId(IP) is used in the adaptor while DeviceId(ovsdb:IP)
// is used in the core. So DeviceId need be changed to OvsdbNodeId.
private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) {
String[] splits = deviceId.toString().split(":");
if (splits.length < 1) {
return null;
}
IpAddress ipAddress = IpAddress.valueOf(splits[1]);
return new OvsdbNodeId(ipAddress, 0);
}
use of org.onosproject.ovsdb.controller.OvsdbNodeId in project onos by opennetworkinglab.
the class OvsdbQueueConfig method getOvsdbClient.
private OvsdbClientService getOvsdbClient(DriverHandler handler) {
OvsdbController ovsController = handler.get(OvsdbController.class);
OvsdbNodeId nodeId = changeDeviceIdToNodeId(handler.data().deviceId());
return ovsController.getOvsdbClient(nodeId);
}
use of org.onosproject.ovsdb.controller.OvsdbNodeId in project onos by opennetworkinglab.
the class OvsdbBridgeConfig method changeDeviceIdToNodeId.
// OvsdbNodeId(IP) is used in the adaptor while DeviceId(ovsdb:IP)
// is used in the core. So DeviceId need be changed to OvsdbNodeId.
private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) {
String[] splits = deviceId.toString().split(":");
if (splits == null || splits.length < 1) {
return null;
}
IpAddress ipAddress = IpAddress.valueOf(splits[1]);
return new OvsdbNodeId(ipAddress, 0);
}
Aggregations