use of org.openkilda.rulemanager.ProtoConstants.PortNumber in project open-kilda by telstra.
the class BfdCatchRuleGenerator method generateCommands.
@Override
public List<SpeakerData> generateCommands(Switch sw) {
if (!sw.getFeatures().contains(SwitchFeature.BFD)) {
return Collections.emptyList();
}
Set<FieldMatch> match = catchRuleMatch(sw);
Instructions instructions = Instructions.builder().applyActions(Collections.singletonList(new PortOutAction(new PortNumber(SpecialPortType.LOCAL)))).build();
return Collections.singletonList(FlowSpeakerData.builder().switchId(sw.getSwitchId()).ofVersion(OfVersion.of(sw.getOfVersion())).cookie(new Cookie(CATCH_BFD_RULE_COOKIE)).table(OfTable.INPUT).priority(CATCH_BFD_RULE_PRIORITY).match(match).instructions(instructions).build());
}
Aggregations