@Test public void testRequiredTransitNodes_noTransitNodesConstraint() throws IOException { SortedMap<String, Configuration> configs = makeRequiredTransitNodesNetwork(); Batfish batfish = getBatfish(configs, temp); batfish.computeDataPlane(batfish.getSnapshot()); DataPlane dataPlane = batfish.loadDataPlane(batfish.getSnapshot()); BidirectionalReachabilityAnalysis analysis = new BidirectionalReachabilityAnalysis( PKT, configs, dataPlane.getForwardingAnalysis(), new IpsRoutedOutInterfacesFactory(dataPlane.getFibs()), IpSpaceAssignment.builder().assign(RTN_START_LOC, RTN_START_IPS).build(), TRUE, ImmutableSet.of(), ImmutableSet.of(), ImmutableSet.of(RTN_DST), ImmutableSet.of(ACCEPTED)); BidirectionalReachabilityResult result = analysis.getResult(); IpSpaceToBDD dst = PKT.getDstIpSpaceToBDD(); BDD dstIps = dst.toBDD(RTN_TRANSIT_DST_IP).or(dst.toBDD(RTN_OTHER_DST_IP)); IpSpaceToBDD src = PKT.getSrcIpSpaceToBDD(); BDD successSrcIps = src.toBDD(RTN_TRANSIT_SRC_IP).or(src.toBDD(RTN_OTHER_SRC_IP)); BDD failureSrcIps = src.toBDD(RTN_TRANSIT_RETURN_IP).or(src.toBDD(RTN_OTHER_RETURN_IP)); assertThat( result.getStartLocationReturnPassSuccessBdds(), equalTo(ImmutableMap.of(RTN_START_LOC, successSrcIps.and(dstIps)))); assertThat( result.getStartLocationReturnPassFailureBdds(), equalTo(ImmutableMap.of(RTN_START_LOC, failureSrcIps.and(dstIps)))); }
public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } BidirectionalReachabilityAnalysis(
      BDDPacket bddPacket,
      Map<String, Configuration> configs,
      ForwardingAnalysis forwardingAnalysis,
      IpsRoutedOutInterfacesFactory ipsRoutedOutInterfacesFactory,
      IpSpaceAssignment srcIpSpaceAssignment,
      AclLineMatchExpr initialForwardHeaderSpace,
      Set<String> forbiddenTransitNodes,
      Set<String> requiredTransitNodes,
      Set<String> forwardPassFinalNodes,
      Set<FlowDisposition> forwardPassActions); }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } BidirectionalReachabilityAnalysis(
      BDDPacket bddPacket,
      Map<String, Configuration> configs,
      ForwardingAnalysis forwardingAnalysis,
      IpsRoutedOutInterfacesFactory ipsRoutedOutInterfacesFactory,
      IpSpaceAssignment srcIpSpaceAssignment,
      AclLineMatchExpr initialForwardHeaderSpace,
      Set<String> forbiddenTransitNodes,
      Set<String> requiredTransitNodes,
      Set<String> forwardPassFinalNodes,
      Set<FlowDisposition> forwardPassActions); BidirectionalReachabilityResult getResult(); }
BidirectionalReachabilityAnalysis { public BidirectionalReachabilityResult getResult() { return new BidirectionalReachabilityResult( _forwardPassStartLocationToReturnPassSuccessBdds.get(), _forwardPassStartLocationToReturnPassFailureBdds.get()); } BidirectionalReachabilityAnalysis(
      BDDPacket bddPacket,
      Map<String, Configuration> configs,
      ForwardingAnalysis forwardingAnalysis,
      IpsRoutedOutInterfacesFactory ipsRoutedOutInterfacesFactory,
      IpSpaceAssignment srcIpSpaceAssignment,
      AclLineMatchExpr initialForwardHeaderSpace,
      Set<String> forbiddenTransitNodes,
      Set<String> requiredTransitNodes,
      Set<String> forwardPassFinalNodes,
      Set<FlowDisposition> forwardPassActions); BidirectionalReachabilityResult getResult();  }