use of org.openkilda.messaging.command.grpc.DumpLogicalPortsRequest in project open-kilda by telstra.
the class SwitchValidateFsm method requestLogicalPorts.
private void requestLogicalPorts(String ipAddress) {
SwitchId switchId = getSwitchId();
log.info("Sending request to get switch logical ports. IP {} (switch={}, key={})", ipAddress, switchId, key);
carrier.sendCommandToSpeaker(key, new DumpLogicalPortsRequest(ipAddress));
pendingRequests.add(ExternalResources.ACTUAL_LOGICAL_PORTS);
}
use of org.openkilda.messaging.command.grpc.DumpLogicalPortsRequest in project open-kilda by telstra.
the class MessageProcessor method handleCommandMessage.
private void handleCommandMessage(CommandMessage command, String key) {
CommandData data = command.getData();
String correlationId = command.getCorrelationId();
CompletableFuture<Response> result;
if (data instanceof CreateLogicalPortRequest) {
result = handleCreateLogicalPortRequest((CreateLogicalPortRequest) data);
} else if (data instanceof DumpLogicalPortsRequest) {
result = handleDumpLogicalPortsRequest((DumpLogicalPortsRequest) data);
} else if (data instanceof GetSwitchInfoRequest) {
result = handleGetSwitchInfoRequest((GetSwitchInfoRequest) data);
} else if (data instanceof GetPacketInOutStatsRequest) {
result = handleGetPacketInOutStatsRequest((GetPacketInOutStatsRequest) data);
} else if (data instanceof DeleteLogicalPortRequest) {
result = handleDeleteLogicalPortRequest((DeleteLogicalPortRequest) data);
} else {
result = unhandledMessage(command);
}
result.thenAccept(response -> sendResponse(response, correlationId, key));
}
Aggregations