public @Nonnull EigrpInterfaceSettings getInterfaceSettings(@Nonnull NetworkConfigurations nc) { return requireNonNull(getInterface(nc).getEigrp()); } }
@Override @Nullable protected EigrpInterfaceSettings featureValueOf(Interface actual) { return actual.getEigrp(); } }
/** 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))); }
Interface iface = c.getAllInterfaces().get(ifaceName); if (iface.getActive() && iface.getEigrp() != null && iface.getEigrp().getAsn() == _asn && iface.getEigrp().getEnabled()) { _interfaces.add(new EigrpInterface(c.getHostname(), iface)); requireNonNull(iface.getEigrp()); Set<Prefix> allNetworkPrefixes = iface.getAllAddresses().stream() RoutingProtocol.EIGRP.getDefaultAdministrativeCost( c.getConfigurationFormat())) .setEigrpMetric(iface.getEigrp().getMetric()) .setNetwork(prefix) .setNextHopInterface(iface.getName())
.setPassive(passive) .build()); if (newIface.getEigrp() == null) { _w.redFlag("Interface: '" + iface.getName() + "' failed to set EIGRP settings");