Codota Logo
EigrpInterface.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.batfish.datamodel.eigrp.EigrpInterface
constructor

Best Java code snippets using org.batfish.datamodel.eigrp.EigrpInterface.<init> (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: batfish/batfish

private static SortedSet<VerboseEigrpEdge> getEigrpEdges(
  Map<String, Configuration> configs, Topology topology) {
 Network<EigrpInterface, EigrpEdge> eigrpTopology =
   EigrpTopology.initEigrpTopology(configs, topology);
 NetworkConfigurations nc = NetworkConfigurations.of(configs);
 SortedSet<VerboseEigrpEdge> eigrpEdges = new TreeSet<>();
 for (Configuration c : configs.values()) {
  String hostname = c.getHostname();
  for (Vrf vrf : c.getVrfs().values()) {
   eigrpEdges.addAll(
     vrf.getInterfaceNames().stream()
       .map(ifaceName -> new EigrpInterface(hostname, ifaceName, vrf.getName()))
       .filter(eigrpTopology.nodes()::contains)
       .flatMap(n -> eigrpTopology.inEdges(n).stream())
       .map(edge -> new VerboseEigrpEdge(edge, edge.toIpEdge(nc)))
       .collect(ImmutableSortedSet.toImmutableSortedSet(Comparator.naturalOrder())));
  }
 }
 return eigrpEdges;
}
origin: batfish/batfish

/** Return an {@link EigrpEdge} if there is an EIGRP adjacency on {@code edge}. */
@Nonnull
static Optional<EigrpEdge> edgeIfAdjacent(Edge edge, Map<String, Configuration> configurations) {
 // vertex1
 Configuration c1 = configurations.get(edge.getNode1());
 Interface iface1 = c1.getAllInterfaces().get(edge.getInt1());
 EigrpInterfaceSettings eigrp1 = iface1.getEigrp();
 // vertex2
 Configuration c2 = configurations.get(edge.getNode2());
 Interface iface2 = c2.getAllInterfaces().get(edge.getInt2());
 EigrpInterfaceSettings eigrp2 = iface2.getEigrp();
 if (eigrp1 == null
   || eigrp2 == null
   || !eigrp1.getEnabled()
   || !eigrp2.getEnabled()
   || eigrp1.getAsn() != eigrp2.getAsn()
   || eigrp1.getPassive()
   || eigrp2.getPassive()) {
  return empty();
 }
 return Optional.of(
   new EigrpEdge(
     new EigrpInterface(c1.getHostname(), iface1),
     new EigrpInterface(c2.getHostname(), iface2)));
}
origin: batfish/batfish

@Test
public void testEigrpToRow() {
 EigrpEdge testEdge =
   new EigrpEdge(
     new EigrpInterface("host1", "int1", "vrf1"),
     new EigrpInterface("host2", "int2", "vrf2"));
 Row row = eigrpEdgeToRow(testEdge);
 assertThat(
   row,
   allOf(
     hasColumn(
       COL_INTERFACE, equalTo(new NodeInterfacePair("host1", "int1")), Schema.INTERFACE),
     hasColumn(
       COL_REMOTE_INTERFACE,
       equalTo(new NodeInterfacePair("host2", "int2")),
       Schema.INTERFACE)));
}
origin: batfish/batfish

@Test
public void testGetEigrpEdges() {
 MutableNetwork<EigrpInterface, EigrpEdge> eigrpTopology =
   NetworkBuilder.directed().allowsParallelEdges(false).allowsSelfLoops(false).build();
 EigrpInterface eigrpInterface1 = new EigrpInterface("host1", "int1", "vrf1");
 EigrpInterface eigrpInterface2 = new EigrpInterface("host2", "int2", "vrf2");
 eigrpTopology.addEdge(
   eigrpInterface1, eigrpInterface2, new EigrpEdge(eigrpInterface1, eigrpInterface2));
 Multiset<Row> rows = getEigrpEdges(_includeNodes, _includeRemoteNodes, eigrpTopology);
 assertThat(
   rows,
   contains(
     allOf(
       hasColumn(
         COL_INTERFACE,
         equalTo(new NodeInterfacePair("host1", "int1")),
         Schema.INTERFACE),
       hasColumn(
         COL_REMOTE_INTERFACE,
         equalTo(new NodeInterfacePair("host2", "int2")),
         Schema.INTERFACE))));
}
origin: batfish/batfish

 && iface.getEigrp().getAsn() == _asn
 && iface.getEigrp().getEnabled()) {
_interfaces.add(new EigrpInterface(c.getHostname(), iface));
requireNonNull(iface.getEigrp());
Set<Prefix> allNetworkPrefixes =
origin: batfish/batfish

vedges.addAll(
  vrf.getInterfaceNames().stream()
    .map(ifaceName -> new EigrpInterface(hostname, ifaceName, vrf.getName()))
    .filter(_eigrpTopology.nodes()::contains)
    .flatMap(n -> _eigrpTopology.inEdges(n).stream())
org.batfish.datamodel.eigrpEigrpInterface<init>

Popular methods of EigrpInterface

  • getHostname
  • getInterface
  • equals
  • getInterfaceName
  • getInterfaceSettings
  • getVrf

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • JList (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now