Search in sources :

Example 86 with FlowRuleIntent

use of org.onosproject.net.intent.FlowRuleIntent in project onos by opennetworkinglab.

the class LinkCollectionIntentCompilerDomainP2PTest method testCompilationSingleDeviceDomainP2P.

/**
 * We test the proper compilation of one domain device.
 */
@Test
public void testCompilationSingleDeviceDomainP2P() {
    intent = LinkCollectionIntent.builder().appId(APP_ID).selector(selector).treatment(treatment).applyTreatmentOnEgress(true).links(p2pLinks).filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(d1p10))).filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(d3p10))).constraints(domainConstraint).build();
    sut.activate();
    List<Intent> compiled = sut.compile(intent, Collections.emptyList());
    assertThat(compiled, hasSize(2));
    DomainPointToPointIntent domainIntent = ((DomainPointToPointIntent) compiled.get(0));
    ConnectPoint ingress = domainIntent.filteredIngressPoints().iterator().next().connectPoint();
    assertThat(ingress, equalTo(d2p0));
    ConnectPoint egress = domainIntent.filteredEgressPoints().iterator().next().connectPoint();
    assertThat(egress, equalTo(d2p1));
    assertThat(domainIntent.links(), hasSize(0));
    Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(1)).flowRules();
    assertThat(rules, hasSize(2));
    sut.deactivate();
}
Also used : DomainPointToPointIntent(org.onosproject.net.domain.DomainPointToPointIntent) DomainPointToPointIntent(org.onosproject.net.domain.DomainPointToPointIntent) Intent(org.onosproject.net.intent.Intent) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) LinkCollectionIntent(org.onosproject.net.intent.LinkCollectionIntent) FlowRule(org.onosproject.net.flow.FlowRule) ConnectPoint(org.onosproject.net.ConnectPoint) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) Test(org.junit.Test)

Example 87 with FlowRuleIntent

use of org.onosproject.net.intent.FlowRuleIntent in project onos by opennetworkinglab.

the class LinkCollectionIntentCompilerTest method testFilteredConnectPointForSp.

/**
 * Single point to multi point case. Scenario is the follow:
 *
 * -1 of1 2-1 of2 2--1 of3 2-
 *             3
 *             `-1 of4 2-
 *
 * We test the proper compilation of sp2mp with trivial selector,
 * trivial treatment and different filtered points
 */
@Test
public void testFilteredConnectPointForSp() {
    sut.activate();
    Set<Link> testLinks = ImmutableSet.of(DefaultLink.builder().providerId(PID).src(of1p2).dst(of2p1).type(DIRECT).build(), DefaultLink.builder().providerId(PID).src(of2p2).dst(of3p1).type(DIRECT).build(), DefaultLink.builder().providerId(PID).src(of2p3).dst(of4p1).type(DIRECT).build());
    TrafficSelector expectOf1Selector = DefaultTrafficSelector.builder(vlan100Selector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf1Treatment = DefaultTrafficTreatment.builder().setOutput(PortNumber.portNumber(2)).build();
    TrafficSelector expectOf2Selector = DefaultTrafficSelector.builder(vlan100Selector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf2Treatment = DefaultTrafficTreatment.builder().setOutput(PortNumber.portNumber(2)).setOutput(PortNumber.portNumber(3)).build();
    TrafficSelector expectOf3Selector = DefaultTrafficSelector.builder(vlan100Selector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf3Treatment = DefaultTrafficTreatment.builder().setOutput(PortNumber.portNumber(2)).build();
    TrafficSelector expectOf4Selector = DefaultTrafficSelector.builder(vlan100Selector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf4Treatment = DefaultTrafficTreatment.builder().setVlanId(VlanId.vlanId("200")).setOutput(PortNumber.portNumber(2)).build();
    Set<FilteredConnectPoint> ingress = ImmutableSet.of(new FilteredConnectPoint(of1p1, vlan100Selector));
    Set<FilteredConnectPoint> egress = ImmutableSet.of(new FilteredConnectPoint(of3p2, vlan100Selector), new FilteredConnectPoint(of4p2, vlan200Selector));
    intent = LinkCollectionIntent.builder().appId(APP_ID).filteredIngressPoints(ingress).filteredEgressPoints(egress).treatment(treatment).applyTreatmentOnEgress(true).links(testLinks).build();
    assertThat(sut, is(notNullValue()));
    List<Intent> result = sut.compile(intent, Collections.emptyList());
    assertThat(result, is(notNullValue()));
    assertThat(result, hasSize(1));
    Intent resultIntent = result.get(0);
    assertThat(resultIntent, instanceOf(FlowRuleIntent.class));
    if (resultIntent instanceof FlowRuleIntent) {
        FlowRuleIntent frIntent = (FlowRuleIntent) resultIntent;
        assertThat(frIntent.flowRules(), hasSize(4));
        List<FlowRule> deviceFlowRules;
        FlowRule flowRule;
        // Of1
        deviceFlowRules = getFlowRulesByDevice(of1Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf1Selector));
        assertThat(flowRule.treatment(), is(expectOf1Treatment));
        // Of2
        deviceFlowRules = getFlowRulesByDevice(of2Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf2Selector));
        assertThat(flowRule.treatment(), is(expectOf2Treatment));
        // Of3
        deviceFlowRules = getFlowRulesByDevice(of3Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf3Selector));
        assertThat(flowRule.treatment(), is(expectOf3Treatment));
        // Of4
        deviceFlowRules = getFlowRulesByDevice(of4Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf4Selector));
        assertThat(flowRule.treatment(), is(expectOf4Treatment));
    }
    sut.deactivate();
}
Also used : TrafficSelector(org.onosproject.net.flow.TrafficSelector) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) Intent(org.onosproject.net.intent.Intent) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) LinkCollectionIntent(org.onosproject.net.intent.LinkCollectionIntent) FlowRule(org.onosproject.net.flow.FlowRule) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) Link(org.onosproject.net.Link) DefaultLink(org.onosproject.net.DefaultLink) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) Test(org.junit.Test)

Example 88 with FlowRuleIntent

use of org.onosproject.net.intent.FlowRuleIntent in project onos by opennetworkinglab.

the class LinkCollectionIntentCompilerTest method nonTrivialTranslationForSp.

/**
 * Single point to multi point without filtered connect point case.
 * Scenario is the follow:
 *
 * -1 of1 2-1 of2 2--1 of3 2-
 *             3
 *             `-1 of4 2-
 *
 * We test the proper compilation of sp2mp with non trivial selector,
 * non trivial treatment and simple connect points.
 */
@Test
public void nonTrivialTranslationForSp() {
    sut.activate();
    Set<Link> testLinks = ImmutableSet.of(DefaultLink.builder().providerId(PID).src(of1p2).dst(of2p1).type(DIRECT).build(), DefaultLink.builder().providerId(PID).src(of2p2).dst(of3p1).type(DIRECT).build(), DefaultLink.builder().providerId(PID).src(of2p3).dst(of4p1).type(DIRECT).build());
    TrafficSelector expectOf1Selector = DefaultTrafficSelector.builder(ipPrefixSelector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf1Treatment = DefaultTrafficTreatment.builder().setOutput(PortNumber.portNumber(2)).build();
    TrafficSelector expectOf2Selector = DefaultTrafficSelector.builder(ipPrefixSelector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf2Treatment = DefaultTrafficTreatment.builder().setOutput(PortNumber.portNumber(2)).setOutput(PortNumber.portNumber(3)).build();
    TrafficSelector expectOf3Selector = DefaultTrafficSelector.builder(ipPrefixSelector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf3Treatment = DefaultTrafficTreatment.builder(ethDstTreatment).setOutput(PortNumber.portNumber(2)).build();
    TrafficSelector expectOf4Selector = DefaultTrafficSelector.builder(ipPrefixSelector).matchInPort(PortNumber.portNumber(1)).build();
    TrafficTreatment expectOf4Treatment = DefaultTrafficTreatment.builder(ethDstTreatment).setOutput(PortNumber.portNumber(2)).build();
    Set<FilteredConnectPoint> ingress = ImmutableSet.of(new FilteredConnectPoint(of1p1));
    Set<FilteredConnectPoint> egress = ImmutableSet.of(new FilteredConnectPoint(of3p2), new FilteredConnectPoint(of4p2));
    intent = LinkCollectionIntent.builder().appId(APP_ID).selector(ipPrefixSelector).treatment(ethDstTreatment).filteredIngressPoints(ingress).filteredEgressPoints(egress).applyTreatmentOnEgress(true).links(testLinks).build();
    assertThat(sut, is(notNullValue()));
    List<Intent> result = sut.compile(intent, Collections.emptyList());
    assertThat(result, is(notNullValue()));
    assertThat(result, hasSize(1));
    Intent resultIntent = result.get(0);
    assertThat(resultIntent, instanceOf(FlowRuleIntent.class));
    if (resultIntent instanceof FlowRuleIntent) {
        FlowRuleIntent frIntent = (FlowRuleIntent) resultIntent;
        assertThat(frIntent.flowRules(), hasSize(4));
        List<FlowRule> deviceFlowRules;
        FlowRule flowRule;
        // Of1
        deviceFlowRules = getFlowRulesByDevice(of1Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf1Selector));
        assertThat(flowRule.treatment(), is(expectOf1Treatment));
        // Of2
        deviceFlowRules = getFlowRulesByDevice(of2Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf2Selector));
        assertThat(flowRule.treatment(), is(expectOf2Treatment));
        // Of3
        deviceFlowRules = getFlowRulesByDevice(of3Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf3Selector));
        assertThat(flowRule.treatment(), is(expectOf3Treatment));
        // Of4
        deviceFlowRules = getFlowRulesByDevice(of4Id, frIntent.flowRules());
        assertThat(deviceFlowRules, hasSize(1));
        flowRule = deviceFlowRules.get(0);
        assertThat(flowRule.selector(), is(expectOf4Selector));
        assertThat(flowRule.treatment(), is(expectOf4Treatment));
    }
    sut.deactivate();
}
Also used : TrafficSelector(org.onosproject.net.flow.TrafficSelector) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) Intent(org.onosproject.net.intent.Intent) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) LinkCollectionIntent(org.onosproject.net.intent.LinkCollectionIntent) FlowRule(org.onosproject.net.flow.FlowRule) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) Link(org.onosproject.net.Link) DefaultLink(org.onosproject.net.DefaultLink) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) Test(org.junit.Test)

Example 89 with FlowRuleIntent

use of org.onosproject.net.intent.FlowRuleIntent in project onos by opennetworkinglab.

the class LinkCollectionOptimizationTest method testOptimizationVlanEncapMplsSelectors.

/**
 * We test the proper optimization of sp2mp with the VLAN
 * encapsulation, filtered selectors.
 */
@Test
public void testOptimizationVlanEncapMplsSelectors() {
    intent = LinkCollectionIntent.builder().appId(APP_ID).selector(selector).treatment(treatment).constraints(constraintsForVlan).links(linksForSp2Mp).filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(d3p10, mpls80Selector))).filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(d1p10, mpls100Selector), new FilteredConnectPoint(d1p11, mpls200Selector), new FilteredConnectPoint(d2p10, mpls69Selector))).build();
    sut.activate();
    /*
         * We use the FIRST_FIT to simplify tests.
         */
    LinkCollectionCompiler.labelAllocator.setLabelSelection(LABEL_SELECTION);
    List<Intent> compiled = sut.compile(intent, Collections.emptyList());
    assertThat(compiled, hasSize(1));
    Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
    assertThat(rules, hasSize(3));
    Collection<FlowRule> rulesS3 = rules.stream().filter(rule -> rule.deviceId().equals(d3p0.deviceId())).collect(Collectors.toSet());
    assertThat(rulesS3, hasSize(1));
    FlowRule ruleS3 = rulesS3.iterator().next();
    assertThat(ruleS3.selector(), is(DefaultTrafficSelector.builder(mpls80Selector).matchInPort(d3p10.port()).build()));
    assertThat(ruleS3.treatment(), is(DefaultTrafficTreatment.builder().copyTtlIn().popMpls(IPV4.ethType()).pushVlan().setVlanId(VlanId.vlanId(LABEL)).setOutput(d3p0.port()).build()));
    Collection<FlowRule> rulesS2 = rules.stream().filter(rule -> rule.deviceId().equals(d2p0.deviceId())).collect(Collectors.toSet());
    assertThat(rulesS2, hasSize(1));
    FlowRule ruleS2 = rulesS2.iterator().next();
    assertThat(ruleS2.selector(), is(DefaultTrafficSelector.builder().matchInPort(d2p1.port()).matchVlanId(VlanId.vlanId(LABEL)).build()));
    assertThat(ruleS2.treatment(), is(DefaultTrafficTreatment.builder().setVlanId(VlanId.vlanId(LABEL)).setOutput(d2p0.port()).popVlan().pushMpls().copyTtlOut().setMpls(((MplsCriterion) mpls69Selector.getCriterion(MPLS_LABEL)).label()).setOutput(d2p10.port()).build()));
    Collection<FlowRule> rulesS1 = rules.stream().filter(rule -> rule.deviceId().equals(d1p0.deviceId())).collect(Collectors.toSet());
    assertThat(rulesS1, hasSize(1));
    FlowRule ruleS1 = rulesS1.iterator().next();
    assertThat(ruleS1.selector(), is(DefaultTrafficSelector.builder().matchInPort(d1p0.port()).matchVlanId(VlanId.vlanId(LABEL)).build()));
    assertThat(ruleS1.treatment(), is(DefaultTrafficTreatment.builder().popVlan().pushMpls().copyTtlOut().setMpls(((MplsCriterion) mpls100Selector.getCriterion(MPLS_LABEL)).label()).setOutput(d1p10.port()).setMpls(((MplsCriterion) mpls200Selector.getCriterion(MPLS_LABEL)).label()).setOutput(d1p11.port()).build()));
    sut.deactivate();
}
Also used : MplsCriterion(org.onosproject.net.flow.criteria.MplsCriterion) APP_ID(org.onosproject.net.NetTestTools.APP_ID) CoreService(org.onosproject.core.CoreService) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) Ethernet(org.onlab.packet.Ethernet) DomainService(org.onosproject.net.domain.DomainService) ComponentConfigAdapter(org.onosproject.cfg.ComponentConfigAdapter) Is.is(org.hamcrest.core.Is.is) Intent(org.onosproject.net.intent.Intent) Matchers.hasSize(org.hamcrest.Matchers.hasSize) LOCAL(org.onosproject.net.domain.DomainId.LOCAL) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) MockResourceService(org.onosproject.net.resource.MockResourceService) Before(org.junit.Before) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) ImmutableSet(com.google.common.collect.ImmutableSet) MplsLabel(org.onlab.packet.MplsLabel) IntentExtensionService(org.onosproject.net.intent.IntentExtensionService) IPV4(org.onlab.packet.EthType.EtherType.IPV4) VLAN_VID(org.onosproject.net.flow.criteria.Criterion.Type.VLAN_VID) Collection(java.util.Collection) VlanId(org.onlab.packet.VlanId) Test(org.junit.Test) LinkCollectionIntent(org.onosproject.net.intent.LinkCollectionIntent) EasyMock(org.easymock.EasyMock) Collectors(java.util.stream.Collectors) List(java.util.List) FlowRule(org.onosproject.net.flow.FlowRule) VlanIdCriterion(org.onosproject.net.flow.criteria.VlanIdCriterion) ModEtherInstruction(org.onosproject.net.flow.instructions.L2ModificationInstruction.ModEtherInstruction) MPLS_LABEL(org.onosproject.net.flow.criteria.Criterion.Type.MPLS_LABEL) DeviceId(org.onosproject.net.DeviceId) Collections(java.util.Collections) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) Intent(org.onosproject.net.intent.Intent) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) LinkCollectionIntent(org.onosproject.net.intent.LinkCollectionIntent) FlowRule(org.onosproject.net.flow.FlowRule) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) Test(org.junit.Test)

Example 90 with FlowRuleIntent

use of org.onosproject.net.intent.FlowRuleIntent in project onos by opennetworkinglab.

the class LinkCollectionOptimizationTest method testCoLocatedFilteredPointsTrivialForSp.

/**
 * We test the proper optimization of sp2mp with trivial selector,
 * trivial treatment, mpls encapsulation and co-located
 * filtered ingress/egress points.
 */
@Test
public void testCoLocatedFilteredPointsTrivialForSp() {
    intent = LinkCollectionIntent.builder().appId(APP_ID).selector(selector).treatment(treatment).applyTreatmentOnEgress(true).links(linksForSp2MpCoLoc).constraints(constraintsForMPLS).filteredIngressPoints(ImmutableSet.of(new FilteredConnectPoint(d1p10, vlan100Selector))).filteredEgressPoints(ImmutableSet.of(new FilteredConnectPoint(d1p11, vlan200Selector), new FilteredConnectPoint(d2p10, vlan300Selector), new FilteredConnectPoint(d3p10, vlan69Selector))).build();
    sut.activate();
    /*
         * We use the FIRST_FIT to simplify tests.
         */
    LinkCollectionCompiler.labelAllocator.setLabelSelection(LABEL_SELECTION);
    List<Intent> compiled = sut.compile(intent, Collections.emptyList());
    assertThat(compiled, hasSize(1));
    Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
    assertThat(rules, hasSize(3));
    Collection<FlowRule> rulesS1 = rules.stream().filter(rule -> rule.deviceId().equals(d1p0.deviceId())).collect(Collectors.toSet());
    assertThat(rulesS1, hasSize(1));
    FlowRule ruleS1 = rulesS1.iterator().next();
    assertThat(ruleS1.selector(), is(DefaultTrafficSelector.builder(vlan100Selector).matchInPort(d1p10.port()).build()));
    assertThat(ruleS1.treatment(), is(DefaultTrafficTreatment.builder().popVlan().pushMpls().copyTtlOut().setMpls(MplsLabel.mplsLabel(LABEL)).setOutput(d1p0.port()).copyTtlIn().popMpls(IPV4.ethType()).pushVlan().setVlanId(((VlanIdCriterion) vlan200Selector.getCriterion(VLAN_VID)).vlanId()).setOutput(d1p11.port()).build()));
    Collection<FlowRule> rulesS2 = rules.stream().filter(rule -> rule.deviceId().equals(d2p0.deviceId())).collect(Collectors.toSet());
    assertThat(rulesS2, hasSize(1));
    FlowRule ruleS2 = rulesS2.iterator().next();
    assertThat(ruleS2.selector(), is(DefaultTrafficSelector.builder().matchInPort(d2p0.port()).matchEthType(Ethernet.MPLS_UNICAST).matchMplsLabel(MplsLabel.mplsLabel(LABEL)).build()));
    assertThat(ruleS2.treatment(), is(DefaultTrafficTreatment.builder().setMpls(MplsLabel.mplsLabel(LABEL)).setOutput(d2p1.port()).copyTtlIn().popMpls(IPV4.ethType()).pushVlan().setVlanId(((VlanIdCriterion) vlan300Selector.getCriterion(VLAN_VID)).vlanId()).setOutput(d2p10.port()).build()));
    Collection<FlowRule> rulesS3 = rules.stream().filter(rule -> rule.deviceId().equals(d3p1.deviceId())).collect(Collectors.toSet());
    assertThat(rulesS3, hasSize(1));
    FlowRule ruleS3 = rulesS3.iterator().next();
    assertThat(ruleS3.selector(), is(DefaultTrafficSelector.builder().matchInPort(d3p0.port()).matchEthType(Ethernet.MPLS_UNICAST).matchMplsLabel(MplsLabel.mplsLabel(LABEL)).build()));
    assertThat(ruleS3.treatment(), is(DefaultTrafficTreatment.builder().copyTtlIn().popMpls(IPV4.ethType()).pushVlan().setVlanId(((VlanIdCriterion) vlan69Selector.getCriterion(VLAN_VID)).vlanId()).setOutput(d3p10.port()).build()));
    sut.deactivate();
}
Also used : MplsCriterion(org.onosproject.net.flow.criteria.MplsCriterion) APP_ID(org.onosproject.net.NetTestTools.APP_ID) CoreService(org.onosproject.core.CoreService) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) Ethernet(org.onlab.packet.Ethernet) DomainService(org.onosproject.net.domain.DomainService) ComponentConfigAdapter(org.onosproject.cfg.ComponentConfigAdapter) Is.is(org.hamcrest.core.Is.is) Intent(org.onosproject.net.intent.Intent) Matchers.hasSize(org.hamcrest.Matchers.hasSize) LOCAL(org.onosproject.net.domain.DomainId.LOCAL) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DefaultTrafficSelector(org.onosproject.net.flow.DefaultTrafficSelector) MockResourceService(org.onosproject.net.resource.MockResourceService) Before(org.junit.Before) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) ImmutableSet(com.google.common.collect.ImmutableSet) MplsLabel(org.onlab.packet.MplsLabel) IntentExtensionService(org.onosproject.net.intent.IntentExtensionService) IPV4(org.onlab.packet.EthType.EtherType.IPV4) VLAN_VID(org.onosproject.net.flow.criteria.Criterion.Type.VLAN_VID) Collection(java.util.Collection) VlanId(org.onlab.packet.VlanId) Test(org.junit.Test) LinkCollectionIntent(org.onosproject.net.intent.LinkCollectionIntent) EasyMock(org.easymock.EasyMock) Collectors(java.util.stream.Collectors) List(java.util.List) FlowRule(org.onosproject.net.flow.FlowRule) VlanIdCriterion(org.onosproject.net.flow.criteria.VlanIdCriterion) ModEtherInstruction(org.onosproject.net.flow.instructions.L2ModificationInstruction.ModEtherInstruction) MPLS_LABEL(org.onosproject.net.flow.criteria.Criterion.Type.MPLS_LABEL) DeviceId(org.onosproject.net.DeviceId) Collections(java.util.Collections) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) Intent(org.onosproject.net.intent.Intent) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) LinkCollectionIntent(org.onosproject.net.intent.LinkCollectionIntent) FlowRule(org.onosproject.net.flow.FlowRule) FilteredConnectPoint(org.onosproject.net.FilteredConnectPoint) FlowRuleIntent(org.onosproject.net.intent.FlowRuleIntent) Test(org.junit.Test)

Aggregations

FlowRuleIntent (org.onosproject.net.intent.FlowRuleIntent)111 Intent (org.onosproject.net.intent.Intent)103 FlowRule (org.onosproject.net.flow.FlowRule)91 Test (org.junit.Test)89 DefaultTrafficSelector (org.onosproject.net.flow.DefaultTrafficSelector)67 DefaultTrafficTreatment (org.onosproject.net.flow.DefaultTrafficTreatment)67 List (java.util.List)58 DeviceId (org.onosproject.net.DeviceId)58 Collection (java.util.Collection)57 Collectors (java.util.stream.Collectors)55 LinkCollectionIntent (org.onosproject.net.intent.LinkCollectionIntent)55 VlanId (org.onlab.packet.VlanId)54 Before (org.junit.Before)52 Collections (java.util.Collections)51 CoreService (org.onosproject.core.CoreService)50 FilteredConnectPoint (org.onosproject.net.FilteredConnectPoint)50 EasyMock (org.easymock.EasyMock)49 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)49 ComponentConfigAdapter (org.onosproject.cfg.ComponentConfigAdapter)49 IntentExtensionService (org.onosproject.net.intent.IntentExtensionService)49