Search in sources :

Example 1 with SwitchHistoryCommand

use of org.openkilda.wfm.topology.network.storm.bolt.sw.command.SwitchHistoryCommand in project open-kilda by telstra.

the class NetworkPersistedStateImportHandler method switchAddWithHistory.

/**
 * Emit new history fact about switch.
 * @param historyFacts entity
 */
public void switchAddWithHistory(HistoryFacts historyFacts) {
    SwitchHistoryCommand command = new SwitchHistoryCommand(historyFacts);
    SwitchId switchId = command.getDatapath();
    CommandContext context = getCommandContext().fork(switchId.toOtsdFormat());
    getOutput().emit(new Values(switchId, command, context));
}
Also used : CommandContext(org.openkilda.wfm.CommandContext) Values(org.apache.storm.tuple.Values) SwitchHistoryCommand(org.openkilda.wfm.topology.network.storm.bolt.sw.command.SwitchHistoryCommand) SwitchId(org.openkilda.model.SwitchId)

Aggregations

Values (org.apache.storm.tuple.Values)1 SwitchId (org.openkilda.model.SwitchId)1 CommandContext (org.openkilda.wfm.CommandContext)1 SwitchHistoryCommand (org.openkilda.wfm.topology.network.storm.bolt.sw.command.SwitchHistoryCommand)1