Search in sources :

Example 1 with GroupRemoveCommand

use of org.openkilda.floodlight.command.group.GroupRemoveCommand in project open-kilda by telstra.

the class RecordHandler method doDeleteGroupRequest.

private void doDeleteGroupRequest(CommandMessage message) {
    SwitchId switchId = ((DeleteGroupRequest) message.getData()).getSwitchId();
    GroupId groupId = ((DeleteGroupRequest) message.getData()).getGroupId();
    logger.debug("Delete group '{}' for switch '{}'", groupId, switchId);
    handleSpeakerCommand(new GroupRemoveCommand(new MessageContext(message), switchId, groupId));
    DeleteGroupResponse response = new DeleteGroupResponse(true);
    String correlationId = message.getCorrelationId();
    InfoMessage infoMessage = new InfoMessage(response, System.currentTimeMillis(), correlationId);
    getKafkaProducer().sendMessageAndTrack(context.getKafkaSwitchManagerTopic(), correlationId, infoMessage);
}
Also used : DeleteGroupResponse(org.openkilda.messaging.info.switches.DeleteGroupResponse) InfoMessage(org.openkilda.messaging.info.InfoMessage) GroupRemoveCommand(org.openkilda.floodlight.command.group.GroupRemoveCommand) SwitchId(org.openkilda.model.SwitchId) MessageContext(org.openkilda.messaging.MessageContext) DeleteGroupRequest(org.openkilda.messaging.command.switches.DeleteGroupRequest) GroupId(org.openkilda.model.GroupId)

Aggregations

GroupRemoveCommand (org.openkilda.floodlight.command.group.GroupRemoveCommand)1 MessageContext (org.openkilda.messaging.MessageContext)1 DeleteGroupRequest (org.openkilda.messaging.command.switches.DeleteGroupRequest)1 InfoMessage (org.openkilda.messaging.info.InfoMessage)1 DeleteGroupResponse (org.openkilda.messaging.info.switches.DeleteGroupResponse)1 GroupId (org.openkilda.model.GroupId)1 SwitchId (org.openkilda.model.SwitchId)1