Search in sources :

Example 36 with MplsCriterion

use of org.onosproject.net.flow.criteria.MplsCriterion in project fabric-tna by stratum.

the class ForwardingObjectiveTranslator method mplsRule.

private void mplsRule(ForwardingObjective obj, Set<Criterion> criteriaWithMeta, ObjectiveTranslation.Builder resultBuilder) throws FabricPipelinerException {
    final MplsCriterion mplsCriterion = (MplsCriterion) criterionNotNull(criteriaWithMeta, Criterion.Type.MPLS_LABEL);
    final TrafficSelector selector = DefaultTrafficSelector.builder().add(mplsCriterion).build();
    resultBuilder.addFlowRule(flowRule(obj, P4InfoConstants.FABRIC_INGRESS_FORWARDING_MPLS, selector));
}
Also used : MplsCriterion(org.onosproject.net.flow.criteria.MplsCriterion) TrafficSelector(org.onosproject.net.flow.TrafficSelector) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector)

Aggregations

MplsCriterion (org.onosproject.net.flow.criteria.MplsCriterion)36 DefaultTrafficSelector (org.onosproject.net.flow.DefaultTrafficSelector)32 DefaultTrafficTreatment (org.onosproject.net.flow.DefaultTrafficTreatment)30 FlowRule (org.onosproject.net.flow.FlowRule)29 VlanIdCriterion (org.onosproject.net.flow.criteria.VlanIdCriterion)29 Test (org.junit.Test)26 VlanId (org.onlab.packet.VlanId)26 List (java.util.List)25 DeviceId (org.onosproject.net.DeviceId)25 ImmutableSet (com.google.common.collect.ImmutableSet)24 Collection (java.util.Collection)24 Collections (java.util.Collections)24 Collectors (java.util.stream.Collectors)24 EasyMock (org.easymock.EasyMock)24 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)24 Before (org.junit.Before)24 ComponentConfigAdapter (org.onosproject.cfg.ComponentConfigAdapter)24 CoreService (org.onosproject.core.CoreService)24 FilteredConnectPoint (org.onosproject.net.FilteredConnectPoint)24 APP_ID (org.onosproject.net.NetTestTools.APP_ID)24