Search in sources :

Example 1 with RuleGenerator

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

the class RuleManagerImpl method getServiceRuleGenerators.

@VisibleForTesting
List<RuleGenerator> getServiceRuleGenerators(SwitchId switchId, DataAdapter adapter) {
    List<RuleGenerator> generators = new ArrayList<>();
    generators.add(serviceRulesFactory.getTableDefaultRuleGenerator(new Cookie(DROP_RULE_COOKIE), OfTable.INPUT));
    generators.add(serviceRulesFactory.getUniCastDiscoveryRuleGenerator());
    generators.add(serviceRulesFactory.getBroadCastDiscoveryRuleGenerator());
    generators.add(serviceRulesFactory.getDropDiscoveryLoopRuleGenerator());
    generators.add(serviceRulesFactory.getBfdCatchRuleGenerator());
    generators.add(serviceRulesFactory.getRoundTripLatencyRuleGenerator());
    generators.add(serviceRulesFactory.getUnicastVerificationVxlanRuleGenerator());
    SwitchProperties switchProperties = adapter.getSwitchProperties(switchId);
    if (switchProperties.isMultiTable()) {
        generators.add(serviceRulesFactory.getTableDefaultRuleGenerator(new Cookie(MULTITABLE_INGRESS_DROP_COOKIE), OfTable.INGRESS));
        generators.add(serviceRulesFactory.getTableDefaultRuleGenerator(new Cookie(MULTITABLE_TRANSIT_DROP_COOKIE), OfTable.TRANSIT));
        generators.add(serviceRulesFactory.getTableDefaultRuleGenerator(new Cookie(MULTITABLE_POST_INGRESS_DROP_COOKIE), OfTable.POST_INGRESS));
        generators.add(serviceRulesFactory.getTablePassThroughDefaultRuleGenerator(new Cookie(MULTITABLE_EGRESS_PASS_THROUGH_COOKIE), OfTable.TRANSIT, OfTable.EGRESS));
        generators.add(serviceRulesFactory.getTablePassThroughDefaultRuleGenerator(new Cookie(MULTITABLE_PRE_INGRESS_PASS_THROUGH_COOKIE), OfTable.INGRESS, OfTable.PRE_INGRESS));
        generators.add(serviceRulesFactory.getLldpPostIngressRuleGenerator());
        generators.add(serviceRulesFactory.getLldpPostIngressVxlanRuleGenerator());
        generators.add(serviceRulesFactory.getLldpPostIngressOneSwitchRuleGenerator());
        generators.add(serviceRulesFactory.getArpPostIngressRuleGenerator());
        generators.add(serviceRulesFactory.getArpPostIngressVxlanRuleGenerator());
        generators.add(serviceRulesFactory.getArpPostIngressOneSwitchRuleGenerator());
        if (switchProperties.isSwitchLldp()) {
            generators.add(serviceRulesFactory.getLldpTransitRuleGenerator());
            generators.add(serviceRulesFactory.getLldpInputPreDropRuleGenerator());
            generators.add(serviceRulesFactory.getLldpIngressRuleGenerator());
        }
        if (switchProperties.isSwitchArp()) {
            generators.add(serviceRulesFactory.getArpTransitRuleGenerator());
            generators.add(serviceRulesFactory.getArpInputPreDropRuleGenerator());
            generators.add(serviceRulesFactory.getArpIngressRuleGenerator());
        }
        Set<Integer> islPorts = adapter.getSwitchIslPorts(switchId);
        islPorts.forEach(islPort -> {
            generators.add(serviceRulesFactory.getEgressIslVxlanRuleGenerator(islPort));
            generators.add(serviceRulesFactory.getEgressIslVlanRuleGenerator(islPort));
            generators.add(serviceRulesFactory.getTransitIslVxlanRuleGenerator(islPort));
        });
    }
    Integer server42Port = switchProperties.getServer42Port();
    Integer server42Vlan = switchProperties.getServer42Vlan();
    MacAddress server42MacAddress = switchProperties.getServer42MacAddress();
    KildaFeatureToggles featureToggles = adapter.getFeatureToggles();
    if (featureToggles.getServer42FlowRtt()) {
        generators.add(serviceRulesFactory.getServer42FlowRttTurningRuleGenerator());
        generators.add(serviceRulesFactory.getServer42FlowRttVxlanTurningRuleGenerator());
        if (switchProperties.isServer42FlowRtt()) {
            generators.add(serviceRulesFactory.getServer42FlowRttOutputVlanRuleGenerator(server42Port, server42Vlan, server42MacAddress));
            generators.add(serviceRulesFactory.getServer42FlowRttOutputVxlanRuleGenerator(server42Port, server42Vlan, server42MacAddress));
        }
    }
    if (featureToggles.getServer42IslRtt() && switchProperties.hasServer42IslRttEnabled()) {
        generators.add(serviceRulesFactory.getServer42IslRttTurningRuleGenerator());
        generators.add(serviceRulesFactory.getServer42IslRttOutputRuleGenerator(server42Port, server42Vlan, server42MacAddress));
        for (Integer islPort : adapter.getSwitchIslPorts(switchId)) {
            generators.add(serviceRulesFactory.getServer42IslRttInputRuleGenerator(server42Port, islPort));
        }
    }
    return generators;
}
Also used : Cookie(org.openkilda.model.cookie.Cookie) KildaFeatureToggles(org.openkilda.model.KildaFeatureToggles) ArrayList(java.util.ArrayList) MacAddress(org.openkilda.model.MacAddress) RuleGenerator(org.openkilda.rulemanager.factory.RuleGenerator) SwitchProperties(org.openkilda.model.SwitchProperties) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Example 2 with RuleGenerator

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

the class RuleManagerImpl method buildIngressYFlowCommands.

private List<SpeakerData> buildIngressYFlowCommands(FlowPath flowPath, FlowPath altFlowPath, DataAdapter adapter) {
    Flow flow = adapter.getFlow(flowPath.getPathId());
    Flow altFlow = adapter.getFlow(altFlowPath.getPathId());
    if (flow.isProtectedPath(flowPath.getPathId()) || altFlow.isProtectedPath(altFlowPath.getPathId())) {
        return Collections.emptyList();
    }
    YFlow yFlow = adapter.getYFlow(flowPath.getPathId());
    if (yFlow == null) {
        return Collections.emptyList();
    }
    SwitchId sharedSwitchId = yFlow.getSharedEndpoint().getSwitchId();
    Switch sharedSwitch = adapter.getSwitch(sharedSwitchId);
    if (sharedSwitch == null || !sharedSwitchId.equals(flowPath.getSrcSwitchId()) || !sharedSwitchId.equals(altFlowPath.getSrcSwitchId())) {
        return Collections.emptyList();
    }
    FlowTransitEncapsulation encapsulation = getFlowTransitEncapsulation(flowPath.getPathId(), flow, adapter);
    FlowTransitEncapsulation altEncapsulation = getFlowTransitEncapsulation(altFlowPath.getPathId(), altFlow, adapter);
    MeterId sharedMeterId = yFlow.getSharedEndpointMeterId();
    RuleGenerator generator = flowRulesFactory.getIngressYRuleGenerator(flowPath, flow, encapsulation, new HashSet<>(), altFlowPath, altFlow, altEncapsulation, new HashSet<>(), sharedMeterId);
    return generator.generateCommands(sharedSwitch);
}
Also used : YFlow(org.openkilda.model.YFlow) Switch(org.openkilda.model.Switch) FlowTransitEncapsulation(org.openkilda.model.FlowTransitEncapsulation) SwitchId(org.openkilda.model.SwitchId) RuleGenerator(org.openkilda.rulemanager.factory.RuleGenerator) Flow(org.openkilda.model.Flow) YFlow(org.openkilda.model.YFlow) MeterId(org.openkilda.model.MeterId)

Example 3 with RuleGenerator

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

the class RuleManagerImpl method buildTransitYFlowCommands.

private List<SpeakerData> buildTransitYFlowCommands(FlowPath flowPath, FlowPath altFlowPath, DataAdapter adapter) {
    Flow flow = adapter.getFlow(flowPath.getPathId());
    Flow altFlow = adapter.getFlow(altFlowPath.getPathId());
    YFlow yFlow = adapter.getYFlow(flowPath.getPathId());
    if (yFlow == null) {
        return Collections.emptyList();
    }
    SwitchId sharedSwitchId = yFlow.getSharedEndpoint().getSwitchId();
    if (sharedSwitchId.equals(flowPath.getSrcSwitchId()) || sharedSwitchId.equals(altFlowPath.getSrcSwitchId())) {
        return Collections.emptyList();
    }
    SwitchId yPointSwitchId = yFlow.getYPoint();
    MeterId yPointMeterId = yFlow.getMeterId();
    if (flow.isProtectedPath(flowPath.getPathId()) && altFlow.isProtectedPath(altFlowPath.getPathId())) {
        yPointSwitchId = yFlow.getProtectedPathYPoint();
        yPointMeterId = yFlow.getProtectedPathMeterId();
    }
    Switch yPointSwitch = adapter.getSwitch(yPointSwitchId);
    if (yPointSwitch == null) {
        return Collections.emptyList();
    }
    FlowTransitEncapsulation encapsulation = getFlowTransitEncapsulation(flowPath.getPathId(), flow, adapter);
    FlowTransitEncapsulation altEncapsulation = getFlowTransitEncapsulation(altFlowPath.getPathId(), altFlow, adapter);
    SwitchPathSegments switchPathSegments = findPathSegmentsForSwitch(yPointSwitchId, flowPath.getSegments());
    SwitchPathSegments altSwitchPathSegments = findPathSegmentsForSwitch(yPointSwitchId, altFlowPath.getSegments());
    if (switchPathSegments == null || altSwitchPathSegments == null) {
        return Collections.emptyList();
    }
    RuleGenerator generator = flowRulesFactory.getTransitYRuleGenerator(flowPath, encapsulation, switchPathSegments.getFirstPathSegment(), switchPathSegments.getSecondPathSegment(), altFlowPath, altEncapsulation, altSwitchPathSegments.getFirstPathSegment(), altSwitchPathSegments.getSecondPathSegment(), yPointMeterId);
    return generator.generateCommands(yPointSwitch);
}
Also used : YFlow(org.openkilda.model.YFlow) Switch(org.openkilda.model.Switch) FlowTransitEncapsulation(org.openkilda.model.FlowTransitEncapsulation) SwitchId(org.openkilda.model.SwitchId) RuleGenerator(org.openkilda.rulemanager.factory.RuleGenerator) Flow(org.openkilda.model.Flow) YFlow(org.openkilda.model.YFlow) MeterId(org.openkilda.model.MeterId)

Example 4 with RuleGenerator

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

the class RuleManagerImpl method buildIngressCommands.

private List<SpeakerData> buildIngressCommands(Switch sw, FlowPath flowPath, Flow flow, FlowTransitEncapsulation encapsulation, Set<FlowSideAdapter> overlappingIngressAdapters, SwitchProperties switchProperties, KildaFeatureToggles featureToggles) {
    List<SpeakerData> ingressCommands = flowRulesFactory.getIngressRuleGenerator(flowPath, flow, encapsulation, overlappingIngressAdapters).generateCommands(sw);
    UUID ingressMeterCommandUuid = Utils.getCommand(MeterSpeakerData.class, ingressCommands).map(SpeakerData::getUuid).orElse(null);
    List<RuleGenerator> generators = new ArrayList<>();
    if (featureToggles.getServer42FlowRtt()) {
        generators.add(flowRulesFactory.getServer42IngressRuleGenerator(flowPath, flow, encapsulation, switchProperties));
    }
    generators.add(flowRulesFactory.getInputLldpRuleGenerator(flowPath, flow, overlappingIngressAdapters));
    generators.add(flowRulesFactory.getInputArpRuleGenerator(flowPath, flow, overlappingIngressAdapters));
    if (flow.isLooped() && sw.getSwitchId().equals(flow.getLoopSwitchId())) {
        generators.add(flowRulesFactory.getIngressLoopRuleGenerator(flowPath, flow));
    }
    if (flowPath.getFlowMirrorPointsSet() != null && !flowPath.getFlowMirrorPointsSet().isEmpty()) {
        generators.add(flowRulesFactory.getIngressMirrorRuleGenerator(flowPath, flow, encapsulation, ingressMeterCommandUuid));
    }
    ingressCommands.addAll(generateRules(sw, generators));
    return ingressCommands;
}
Also used : ArrayList(java.util.ArrayList) UUID(java.util.UUID) RuleGenerator(org.openkilda.rulemanager.factory.RuleGenerator)

Example 5 with RuleGenerator

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

the class RuleManagerServiceRulesTest method shouldUseCorrectServiceRuleGeneratorsForSwitchInSingleTableMode.

@Test
public void shouldUseCorrectServiceRuleGeneratorsForSwitchInSingleTableMode() {
    Switch sw = buildSwitch("OF_13", Collections.emptySet());
    SwitchId switchId = sw.getSwitchId();
    SwitchProperties switchProperties = buildSwitchProperties(sw, false);
    List<RuleGenerator> generators = ruleManager.getServiceRuleGenerators(switchId, buildAdapter(switchId, switchProperties, new HashSet<>(), false));
    assertEquals(7, generators.size());
    assertTrue(generators.stream().anyMatch(g -> g instanceof TableDefaultRuleGenerator));
    assertTrue(generators.stream().anyMatch(g -> g instanceof BroadCastDiscoveryRuleGenerator));
    assertTrue(generators.stream().anyMatch(g -> g instanceof UniCastDiscoveryRuleGenerator));
    assertTrue(generators.stream().anyMatch(g -> g instanceof DropDiscoveryLoopRuleGenerator));
    assertTrue(generators.stream().anyMatch(g -> g instanceof BfdCatchRuleGenerator));
    assertTrue(generators.stream().anyMatch(g -> g instanceof RoundTripLatencyRuleGenerator));
    assertTrue(generators.stream().anyMatch(g -> g instanceof UnicastVerificationVxlanRuleGenerator));
}
Also used : LldpPostIngressOneSwitchRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpPostIngressOneSwitchRuleGenerator) UniCastDiscoveryRuleGenerator(org.openkilda.rulemanager.factory.generator.service.UniCastDiscoveryRuleGenerator) InMemoryDataAdapter(org.openkilda.rulemanager.adapter.InMemoryDataAdapter) LldpPostIngressVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpPostIngressVxlanRuleGenerator) ArpTransitRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpTransitRuleGenerator) Utils.buildSwitchProperties(org.openkilda.rulemanager.Utils.buildSwitchProperties) Server42IslRttOutputRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42IslRttOutputRuleGenerator) KildaFeatureToggles(org.openkilda.model.KildaFeatureToggles) Map(java.util.Map) Utils.buildSwitch(org.openkilda.rulemanager.Utils.buildSwitch) LldpTransitRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpTransitRuleGenerator) SwitchProperties(org.openkilda.model.SwitchProperties) ArpPostIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpPostIngressRuleGenerator) BfdCatchRuleGenerator(org.openkilda.rulemanager.factory.generator.service.BfdCatchRuleGenerator) Set(java.util.Set) Server42FlowRttOutputVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttOutputVxlanRuleGenerator) Server42FlowRttOutputVlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttOutputVlanRuleGenerator) Sets(com.google.common.collect.Sets) List(java.util.List) Server42FlowRttTurningRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttTurningRuleGenerator) RoundTripLatencyRuleGenerator(org.openkilda.rulemanager.factory.generator.service.noviflow.RoundTripLatencyRuleGenerator) Mockito.mock(org.mockito.Mockito.mock) BroadCastDiscoveryRuleGenerator(org.openkilda.rulemanager.factory.generator.service.BroadCastDiscoveryRuleGenerator) ArpPostIngressVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpPostIngressVxlanRuleGenerator) HashMap(java.util.HashMap) Server42IslRttInputRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42IslRttInputRuleGenerator) HashSet(java.util.HashSet) Server42FlowRttVxlanTurningRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttVxlanTurningRuleGenerator) ArpIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpIngressRuleGenerator) RttState(org.openkilda.model.SwitchProperties.RttState) Server42IslRttTurningRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42IslRttTurningRuleGenerator) TableDefaultRuleGenerator(org.openkilda.rulemanager.factory.generator.service.TableDefaultRuleGenerator) Before(org.junit.Before) Switch(org.openkilda.model.Switch) LldpInputPreDropRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpInputPreDropRuleGenerator) DropDiscoveryLoopRuleGenerator(org.openkilda.rulemanager.factory.generator.service.DropDiscoveryLoopRuleGenerator) UnicastVerificationVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.UnicastVerificationVxlanRuleGenerator) ArpPostIngressOneSwitchRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpPostIngressOneSwitchRuleGenerator) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) TablePassThroughDefaultRuleGenerator(org.openkilda.rulemanager.factory.generator.service.TablePassThroughDefaultRuleGenerator) LldpIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpIngressRuleGenerator) SwitchId(org.openkilda.model.SwitchId) RuleGenerator(org.openkilda.rulemanager.factory.RuleGenerator) ArpInputPreDropRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpInputPreDropRuleGenerator) LldpPostIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpPostIngressRuleGenerator) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) BroadCastDiscoveryRuleGenerator(org.openkilda.rulemanager.factory.generator.service.BroadCastDiscoveryRuleGenerator) BfdCatchRuleGenerator(org.openkilda.rulemanager.factory.generator.service.BfdCatchRuleGenerator) SwitchId(org.openkilda.model.SwitchId) TableDefaultRuleGenerator(org.openkilda.rulemanager.factory.generator.service.TableDefaultRuleGenerator) UniCastDiscoveryRuleGenerator(org.openkilda.rulemanager.factory.generator.service.UniCastDiscoveryRuleGenerator) RoundTripLatencyRuleGenerator(org.openkilda.rulemanager.factory.generator.service.noviflow.RoundTripLatencyRuleGenerator) DropDiscoveryLoopRuleGenerator(org.openkilda.rulemanager.factory.generator.service.DropDiscoveryLoopRuleGenerator) Utils.buildSwitch(org.openkilda.rulemanager.Utils.buildSwitch) Switch(org.openkilda.model.Switch) UnicastVerificationVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.UnicastVerificationVxlanRuleGenerator) Utils.buildSwitchProperties(org.openkilda.rulemanager.Utils.buildSwitchProperties) SwitchProperties(org.openkilda.model.SwitchProperties) LldpPostIngressOneSwitchRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpPostIngressOneSwitchRuleGenerator) UniCastDiscoveryRuleGenerator(org.openkilda.rulemanager.factory.generator.service.UniCastDiscoveryRuleGenerator) LldpPostIngressVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpPostIngressVxlanRuleGenerator) ArpTransitRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpTransitRuleGenerator) Server42IslRttOutputRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42IslRttOutputRuleGenerator) LldpTransitRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpTransitRuleGenerator) ArpPostIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpPostIngressRuleGenerator) BfdCatchRuleGenerator(org.openkilda.rulemanager.factory.generator.service.BfdCatchRuleGenerator) Server42FlowRttOutputVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttOutputVxlanRuleGenerator) Server42FlowRttOutputVlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttOutputVlanRuleGenerator) Server42FlowRttTurningRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttTurningRuleGenerator) RoundTripLatencyRuleGenerator(org.openkilda.rulemanager.factory.generator.service.noviflow.RoundTripLatencyRuleGenerator) BroadCastDiscoveryRuleGenerator(org.openkilda.rulemanager.factory.generator.service.BroadCastDiscoveryRuleGenerator) ArpPostIngressVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpPostIngressVxlanRuleGenerator) Server42IslRttInputRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42IslRttInputRuleGenerator) Server42FlowRttVxlanTurningRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42FlowRttVxlanTurningRuleGenerator) ArpIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpIngressRuleGenerator) Server42IslRttTurningRuleGenerator(org.openkilda.rulemanager.factory.generator.service.server42.Server42IslRttTurningRuleGenerator) TableDefaultRuleGenerator(org.openkilda.rulemanager.factory.generator.service.TableDefaultRuleGenerator) LldpInputPreDropRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpInputPreDropRuleGenerator) DropDiscoveryLoopRuleGenerator(org.openkilda.rulemanager.factory.generator.service.DropDiscoveryLoopRuleGenerator) UnicastVerificationVxlanRuleGenerator(org.openkilda.rulemanager.factory.generator.service.UnicastVerificationVxlanRuleGenerator) ArpPostIngressOneSwitchRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpPostIngressOneSwitchRuleGenerator) TablePassThroughDefaultRuleGenerator(org.openkilda.rulemanager.factory.generator.service.TablePassThroughDefaultRuleGenerator) LldpIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpIngressRuleGenerator) RuleGenerator(org.openkilda.rulemanager.factory.RuleGenerator) ArpInputPreDropRuleGenerator(org.openkilda.rulemanager.factory.generator.service.arp.ArpInputPreDropRuleGenerator) LldpPostIngressRuleGenerator(org.openkilda.rulemanager.factory.generator.service.lldp.LldpPostIngressRuleGenerator) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

RuleGenerator (org.openkilda.rulemanager.factory.RuleGenerator)8 Switch (org.openkilda.model.Switch)6 SwitchId (org.openkilda.model.SwitchId)6 KildaFeatureToggles (org.openkilda.model.KildaFeatureToggles)5 SwitchProperties (org.openkilda.model.SwitchProperties)5 Sets (com.google.common.collect.Sets)4 Collections (java.util.Collections)4 HashMap (java.util.HashMap)4 HashSet (java.util.HashSet)4 List (java.util.List)4 Map (java.util.Map)4 Set (java.util.Set)4 Assert.assertEquals (org.junit.Assert.assertEquals)4 Assert.assertTrue (org.junit.Assert.assertTrue)4 Before (org.junit.Before)4 Test (org.junit.Test)4 Mockito.mock (org.mockito.Mockito.mock)4 Mockito.when (org.mockito.Mockito.when)4 RttState (org.openkilda.model.SwitchProperties.RttState)4 Utils.buildSwitch (org.openkilda.rulemanager.Utils.buildSwitch)4