@Test public void testToOspfNetworkType() { assertThat( CiscoConversions.toOspfNetworkType(null, new Warnings()), equalTo(org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST)); }
@VisibleForTesting @Nullable static org.batfish.datamodel.ospf.OspfNetworkType toOspfNetworkType( @Nullable OspfNetworkType type, Warnings warnings) { if (type == null) { return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; } switch (type) { case BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; case POINT_TO_POINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_POINT; case NON_BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.NON_BROADCAST_MULTI_ACCESS; case POINT_TO_MULTIPOINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_MULTIPOINT; default: warnings.redFlag( String.format( "Conversion of Cisco OSPF network type '%s' is not handled.", type.toString())); return null; } }
CiscoConversions { @VisibleForTesting @Nullable static org.batfish.datamodel.ospf.OspfNetworkType toOspfNetworkType( @Nullable OspfNetworkType type, Warnings warnings) { if (type == null) { return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; } switch (type) { case BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; case POINT_TO_POINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_POINT; case NON_BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.NON_BROADCAST_MULTI_ACCESS; case POINT_TO_MULTIPOINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_MULTIPOINT; default: warnings.redFlag( String.format( "Conversion of Cisco OSPF network type '%s' is not handled.", type.toString())); return null; } } }
CiscoConversions { @VisibleForTesting @Nullable static org.batfish.datamodel.ospf.OspfNetworkType toOspfNetworkType( @Nullable OspfNetworkType type, Warnings warnings) { if (type == null) { return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; } switch (type) { case BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; case POINT_TO_POINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_POINT; case NON_BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.NON_BROADCAST_MULTI_ACCESS; case POINT_TO_MULTIPOINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_MULTIPOINT; default: warnings.redFlag( String.format( "Conversion of Cisco OSPF network type '%s' is not handled.", type.toString())); return null; } } private  CiscoConversions(); }
CiscoConversions { @VisibleForTesting @Nullable static org.batfish.datamodel.ospf.OspfNetworkType toOspfNetworkType( @Nullable OspfNetworkType type, Warnings warnings) { if (type == null) { return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; } switch (type) { case BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; case POINT_TO_POINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_POINT; case NON_BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.NON_BROADCAST_MULTI_ACCESS; case POINT_TO_MULTIPOINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_MULTIPOINT; default: warnings.redFlag( String.format( "Conversion of Cisco OSPF network type '%s' is not handled.", type.toString())); return null; } } private  CiscoConversions(); static CommunityList toCommunityList(StandardCommunityList scList); }
CiscoConversions { @VisibleForTesting @Nullable static org.batfish.datamodel.ospf.OspfNetworkType toOspfNetworkType( @Nullable OspfNetworkType type, Warnings warnings) { if (type == null) { return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; } switch (type) { case BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST; case POINT_TO_POINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_POINT; case NON_BROADCAST: return org.batfish.datamodel.ospf.OspfNetworkType.NON_BROADCAST_MULTI_ACCESS; case POINT_TO_MULTIPOINT: return org.batfish.datamodel.ospf.OspfNetworkType.POINT_TO_MULTIPOINT; default: warnings.redFlag( String.format( "Conversion of Cisco OSPF network type '%s' is not handled.", type.toString())); return null; } } private  CiscoConversions(); static CommunityList toCommunityList(StandardCommunityList scList);  }