Tabnine Logo
IsisInterfaceSettings.getLevel2
Code IndexAdd Tabnine to your IDE (free)

How to use
getLevel2
method
in
org.batfish.datamodel.isis.IsisInterfaceSettings

Best Java code snippets using org.batfish.datamodel.isis.IsisInterfaceSettings.getLevel2 (Showing top 7 results out of 315)

origin: batfish/batfish

 @Override
 protected IsisInterfaceLevelSettings featureValueOf(IsisInterfaceSettings actual) {
  return actual.getLevel2();
 }
}
origin: batfish/batfish

@Nullable
private static IsisLevel interfaceSettingsLevel(IsisInterfaceSettings settings) {
 return union(
   settings.getLevel1() != null ? LEVEL_1 : null,
   settings.getLevel2() != null ? LEVEL_2 : null);
}
origin: batfish/batfish

/**
 * Generate IS-IS L1/L2 routes from a given interface and merge them into appropriate L1/L2 RIBs.
 */
private void generateAllIsisInterfaceRoutes(
  Builder<IsisRoute> d1,
  Builder<IsisRoute> d2,
  int l1Admin,
  int l2Admin,
  @Nullable IsisLevelSettings l1Settings,
  @Nullable IsisLevelSettings l2Settings,
  IsisRoute.Builder routeBuilder,
  Interface iface) {
 IsisInterfaceSettings ifaceSettings = iface.getIsis();
 if (ifaceSettings == null) {
  return;
 }
 IsisInterfaceLevelSettings ifaceL1Settings = ifaceSettings.getLevel1();
 IsisInterfaceLevelSettings ifaceL2Settings = ifaceSettings.getLevel2();
 if (ifaceL1Settings != null && l1Settings != null) {
  generateIsisInterfaceRoutesPerLevel(l1Admin, routeBuilder, iface, IsisLevel.LEVEL_1)
    .forEach(r -> d1.from(_isisL1Rib.mergeRouteGetDelta(r)));
 }
 if (ifaceL2Settings != null && l2Settings != null) {
  generateIsisInterfaceRoutesPerLevel(l2Admin, routeBuilder, iface, IsisLevel.LEVEL_2)
    .forEach(r -> d2.from(_isisL2Rib.mergeRouteGetDelta(r)));
 }
}
origin: batfish/batfish

/**
 * Generate IS-IS from a given interface for a given level (with a given metric/admin cost) and
 * merge them into the appropriate RIB.
 */
private static Set<IsisRoute> generateIsisInterfaceRoutesPerLevel(
  int adminCost, IsisRoute.Builder routeBuilder, Interface iface, IsisLevel level) {
 IsisInterfaceLevelSettings ifaceLevelSettings =
   level == IsisLevel.LEVEL_1 ? iface.getIsis().getLevel1() : iface.getIsis().getLevel2();
 RoutingProtocol isisProtocol =
   level == IsisLevel.LEVEL_1 ? RoutingProtocol.ISIS_L1 : RoutingProtocol.ISIS_L2;
 long metric =
   ifaceLevelSettings.getMode() == IsisInterfaceMode.PASSIVE
     ? 0L
     : firstNonNull(ifaceLevelSettings.getCost(), IsisRoute.DEFAULT_METRIC);
 routeBuilder.setAdmin(adminCost).setLevel(level).setMetric(metric).setProtocol(isisProtocol);
 return iface.getAllAddresses().stream()
   .map(
     address ->
       routeBuilder.setNetwork(address.getPrefix()).setNextHopIp(address.getIp()).build())
   .collect(ImmutableSet.toImmutableSet());
}
origin: batfish/batfish

IsisInterfaceMode l2Mode =
  ifaceSettings != null
    ? ifaceSettings.getLevel2() != null
      ? ifaceSettings.getLevel2().getMode()
      : UNSET
    : UNSET;
origin: batfish/batfish

IsisInterfaceLevelSettings level2Settings = iface.getIsis().getLevel2();
IsisLevel activeLevels = null;
if (level1Settings != null && level1Settings.getMode() == IsisInterfaceMode.ACTIVE) {
origin: batfish/batfish

routeLevel == IsisLevel.LEVEL_1
  ? iface.getIsis().getLevel1()
  : iface.getIsis().getLevel2();
org.batfish.datamodel.isisIsisInterfaceSettingsgetLevel2

Popular methods of IsisInterfaceSettings

  • getLevel1
  • <init>
  • builder
  • getBfdLivenessDetectionMinimumInterval
  • getBfdLivenessDetectionMultiplier
  • getIsoAddress
  • getPointToPoint

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now