@Test public void testToOspfDeadIntervalFromHello() { CiscoConfiguration c = basicCiscoConfig(); Interface iface = new Interface("FastEthernet0/0", c); int helloInterval = 1; iface.setOspfHelloInterval(helloInterval); assertThat( toOspfDeadInterval(iface, org.batfish.datamodel.ospf.OspfNetworkType.BROADCAST), equalTo(OSPF_DEAD_INTERVAL_HELLO_MULTIPLIER * helloInterval)); }
@VisibleForTesting static int toOspfDeadInterval( Interface iface, @Nullable org.batfish.datamodel.ospf.OspfNetworkType networkType) { Integer deadInterval = iface.getOspfDeadInterval(); if (deadInterval != null) { return deadInterval; } Integer helloInterval = iface.getOspfHelloInterval(); if (helloInterval != null) { return OSPF_DEAD_INTERVAL_HELLO_MULTIPLIER * helloInterval; } if (networkType == POINT_TO_POINT || networkType == BROADCAST) { return DEFAULT_OSPF_DEAD_INTERVAL_P2P_AND_BROADCAST; } return DEFAULT_OSPF_DEAD_INTERVAL; }
CiscoConversions { @VisibleForTesting static int toOspfDeadInterval( Interface iface, @Nullable org.batfish.datamodel.ospf.OspfNetworkType networkType) { Integer deadInterval = iface.getOspfDeadInterval(); if (deadInterval != null) { return deadInterval; } Integer helloInterval = iface.getOspfHelloInterval(); if (helloInterval != null) { return OSPF_DEAD_INTERVAL_HELLO_MULTIPLIER * helloInterval; } if (networkType == POINT_TO_POINT || networkType == BROADCAST) { return DEFAULT_OSPF_DEAD_INTERVAL_P2P_AND_BROADCAST; } return DEFAULT_OSPF_DEAD_INTERVAL; } }
CiscoConversions { @VisibleForTesting static int toOspfDeadInterval( Interface iface, @Nullable org.batfish.datamodel.ospf.OspfNetworkType networkType) { Integer deadInterval = iface.getOspfDeadInterval(); if (deadInterval != null) { return deadInterval; } Integer helloInterval = iface.getOspfHelloInterval(); if (helloInterval != null) { return OSPF_DEAD_INTERVAL_HELLO_MULTIPLIER * helloInterval; } if (networkType == POINT_TO_POINT || networkType == BROADCAST) { return DEFAULT_OSPF_DEAD_INTERVAL_P2P_AND_BROADCAST; } return DEFAULT_OSPF_DEAD_INTERVAL; } private  CiscoConversions(); }
CiscoConversions { @VisibleForTesting static int toOspfDeadInterval( Interface iface, @Nullable org.batfish.datamodel.ospf.OspfNetworkType networkType) { Integer deadInterval = iface.getOspfDeadInterval(); if (deadInterval != null) { return deadInterval; } Integer helloInterval = iface.getOspfHelloInterval(); if (helloInterval != null) { return OSPF_DEAD_INTERVAL_HELLO_MULTIPLIER * helloInterval; } if (networkType == POINT_TO_POINT || networkType == BROADCAST) { return DEFAULT_OSPF_DEAD_INTERVAL_P2P_AND_BROADCAST; } return DEFAULT_OSPF_DEAD_INTERVAL; } private  CiscoConversions(); static CommunityList toCommunityList(StandardCommunityList scList); }
CiscoConversions { @VisibleForTesting static int toOspfDeadInterval( Interface iface, @Nullable org.batfish.datamodel.ospf.OspfNetworkType networkType) { Integer deadInterval = iface.getOspfDeadInterval(); if (deadInterval != null) { return deadInterval; } Integer helloInterval = iface.getOspfHelloInterval(); if (helloInterval != null) { return OSPF_DEAD_INTERVAL_HELLO_MULTIPLIER * helloInterval; } if (networkType == POINT_TO_POINT || networkType == BROADCAST) { return DEFAULT_OSPF_DEAD_INTERVAL_P2P_AND_BROADCAST; } return DEFAULT_OSPF_DEAD_INTERVAL; } private  CiscoConversions(); static CommunityList toCommunityList(StandardCommunityList scList);  }