Search in sources :

Example 11 with OfMetadata

use of org.openkilda.rulemanager.OfMetadata in project open-kilda by telstra.

the class MultiTableIngressRuleGenerator method buildInstructions.

private Instructions buildInstructions(Switch sw, List<Action> actions) {
    Instructions instructions = Instructions.builder().applyActions(actions).goToTable(OfTable.POST_INGRESS).build();
    addMeterToInstructions(flowPath.getMeterId(), sw, instructions);
    if (flowPath.isOneSwitchFlow()) {
        RoutingMetadata metadata = RoutingMetadata.builder().oneSwitchFlowFlag(true).build(sw.getFeatures());
        instructions.setWriteMetadata(new OfMetadata(metadata.getValue(), metadata.getMask()));
    }
    return instructions;
}
Also used : OfMetadata(org.openkilda.rulemanager.OfMetadata) Instructions(org.openkilda.rulemanager.Instructions) RoutingMetadata(org.openkilda.rulemanager.utils.RoutingMetadata)

Aggregations

OfMetadata (org.openkilda.rulemanager.OfMetadata)11 Instructions (org.openkilda.rulemanager.Instructions)8 RoutingMetadata (org.openkilda.rulemanager.utils.RoutingMetadata)7 Test (org.junit.Test)5 PopVlanAction (org.openkilda.rulemanager.action.PopVlanAction)5 MeterId (org.openkilda.model.MeterId)4 PortColourCookie (org.openkilda.model.cookie.PortColourCookie)4 ArrayList (java.util.ArrayList)3 FlowSpeakerData (org.openkilda.rulemanager.FlowSpeakerData)3 SpeakerData (org.openkilda.rulemanager.SpeakerData)3 Action (org.openkilda.rulemanager.action.Action)3 GroupAction (org.openkilda.rulemanager.action.GroupAction)3 PopVxlanAction (org.openkilda.rulemanager.action.PopVxlanAction)3 PortOutAction (org.openkilda.rulemanager.action.PortOutAction)3 PushVlanAction (org.openkilda.rulemanager.action.PushVlanAction)3 PushVxlanAction (org.openkilda.rulemanager.action.PushVxlanAction)3 SetFieldAction (org.openkilda.rulemanager.action.SetFieldAction)3 CopyFieldAction (org.openkilda.rulemanager.action.noviflow.CopyFieldAction)3 FieldMatch (org.openkilda.rulemanager.match.FieldMatch)3 List (java.util.List)2