@Test public void testExpandInterfaceRanges() { LogicalSystem ls = new LogicalSystem("ls"); Interface iface = new Interface("xe-0/0/0"); iface.setMtu(9000); ls.getInterfaces().put("xe-0/0/0", iface); InterfaceRange irange = ls.getInterfaceRanges().computeIfAbsent("irange", i -> new InterfaceRange("irange")); irange.getMembers().add(new InterfaceRangeMember("xe-0/0/0")); irange.getMembers().add(new InterfaceRangeMember("xe-0/0/1")); irange.setMtu(8000); ls.expandInterfaceRanges(); org.batfish.representation.juniper.Interface xe000 = ls.getInterfaces().get("xe-0/0/0"); assertThat(xe000.getMtu(), equalTo(9000)); org.batfish.representation.juniper.Interface xe001 = ls.getInterfaces().get("xe-0/0/1"); assertThat(xe001.getMtu(), equalTo(8000)); }
public void expandInterfaceRanges() { _interfaceRanges.values().stream().forEach(this::expandInterfaceRange); }
LogicalSystem implements Serializable { public void expandInterfaceRanges() { _interfaceRanges.values().stream().forEach(this::expandInterfaceRange); } }
LogicalSystem implements Serializable { public void expandInterfaceRanges() { _interfaceRanges.values().stream().forEach(this::expandInterfaceRange); } LogicalSystem(String name); }
LogicalSystem implements Serializable { public void expandInterfaceRanges() { _interfaceRanges.values().stream().forEach(this::expandInterfaceRange); } LogicalSystem(String name); void expandInterfaceRanges(); Map<String, AddressBook> getAddressBooks(); Map<String, BaseApplication> getApplications(); Map<String, ApplicationSet> getApplicationSets(); @Nonnull Map<String, AsPath> getAsPaths(); Map<String, AsPathGroup> getAsPathGroups(); Map<String, JuniperAuthenticationKeyChain> getAuthenticationKeyChains(); Map<String, NamedCommunity> getNamedCommunities(); boolean getDefaultAddressSelection(); LineAction getDefaultCrossZoneAction(); LineAction getDefaultInboundAction(); RoutingInstance getDefaultRoutingInstance(); NavigableSet<String> getDnsServers(); Map<String, FirewallFilter> getFirewallFilters(); Map<String, ConcreteFirewallFilter> getSecurityPolicies(); @Nonnull AddressBook getGlobalAddressBook(); Interface getGlobalMasterInterface(); String getHostname(); Map<String, Screen> getScreens(); Map<String, IkeGateway> getIkeGateways(); Map<String, IkePolicy> getIkePolicies(); Map<String, IkeProposal> getIkeProposals(); Map<String, InterfaceRange> getInterfaceRanges(); Map<String, Interface> getInterfaces(); Map<String, Zone> getInterfaceZones(); Map<String, IpsecPolicy> getIpsecPolicies(); Map<String, IpsecProposal> getIpsecProposals(); Map<String, IpsecVpn> getIpsecVpns(); JuniperFamily getJf(); @Nonnull String getName(); Nat getNatDestination(); Nat getNatSource(); Nat getNatStatic(); NavigableSet<String> getNtpServers(); Nat getOrCreateNat(Nat.Type natType); Zone getOrCreateZone(String zoneName); Map<String, PolicyStatement> getPolicyStatements(); Map<String, PrefixList> getPrefixLists(); @Nonnull Map<String, RibGroup> getRibGroups(); Map<String, RouteFilter> getRouteFilters(); Map<String, RoutingInstance> getRoutingInstances(); NavigableSet<String> getSyslogHosts(); NavigableSet<String> getTacplusServers(); Map<String, Vlan> getNamedVlans(); Map<String, Zone> getZones(); void setDefaultAddressSelection(boolean defaultAddressSelection); void setDefaultCrossZoneAction(LineAction defaultCrossZoneAction); void setDefaultInboundAction(LineAction defaultInboundAction); void setDefaultRoutingInstance(RoutingInstance defaultRoutingInstance); void setHostname(String hostname); void setNatDestination(Nat natDestination); void setNatSource(Nat natSource); void setNatStatic(Nat natStatic); void setSyslogHosts(NavigableSet<String> syslogHosts); }
LogicalSystem implements Serializable { public void expandInterfaceRanges() { _interfaceRanges.values().stream().forEach(this::expandInterfaceRange); } LogicalSystem(String name); void expandInterfaceRanges(); Map<String, AddressBook> getAddressBooks(); Map<String, BaseApplication> getApplications(); Map<String, ApplicationSet> getApplicationSets(); @Nonnull Map<String, AsPath> getAsPaths(); Map<String, AsPathGroup> getAsPathGroups(); Map<String, JuniperAuthenticationKeyChain> getAuthenticationKeyChains(); Map<String, NamedCommunity> getNamedCommunities(); boolean getDefaultAddressSelection(); LineAction getDefaultCrossZoneAction(); LineAction getDefaultInboundAction(); RoutingInstance getDefaultRoutingInstance(); NavigableSet<String> getDnsServers(); Map<String, FirewallFilter> getFirewallFilters(); Map<String, ConcreteFirewallFilter> getSecurityPolicies(); @Nonnull AddressBook getGlobalAddressBook(); Interface getGlobalMasterInterface(); String getHostname(); Map<String, Screen> getScreens(); Map<String, IkeGateway> getIkeGateways(); Map<String, IkePolicy> getIkePolicies(); Map<String, IkeProposal> getIkeProposals(); Map<String, InterfaceRange> getInterfaceRanges(); Map<String, Interface> getInterfaces(); Map<String, Zone> getInterfaceZones(); Map<String, IpsecPolicy> getIpsecPolicies(); Map<String, IpsecProposal> getIpsecProposals(); Map<String, IpsecVpn> getIpsecVpns(); JuniperFamily getJf(); @Nonnull String getName(); Nat getNatDestination(); Nat getNatSource(); Nat getNatStatic(); NavigableSet<String> getNtpServers(); Nat getOrCreateNat(Nat.Type natType); Zone getOrCreateZone(String zoneName); Map<String, PolicyStatement> getPolicyStatements(); Map<String, PrefixList> getPrefixLists(); @Nonnull Map<String, RibGroup> getRibGroups(); Map<String, RouteFilter> getRouteFilters(); Map<String, RoutingInstance> getRoutingInstances(); NavigableSet<String> getSyslogHosts(); NavigableSet<String> getTacplusServers(); Map<String, Vlan> getNamedVlans(); Map<String, Zone> getZones(); void setDefaultAddressSelection(boolean defaultAddressSelection); void setDefaultCrossZoneAction(LineAction defaultCrossZoneAction); void setDefaultInboundAction(LineAction defaultInboundAction); void setDefaultRoutingInstance(RoutingInstance defaultRoutingInstance); void setHostname(String hostname); void setNatDestination(Nat natDestination); void setNatSource(Nat natSource); void setNatStatic(Nat natStatic); void setSyslogHosts(NavigableSet<String> syslogHosts); static final String GLOBAL_ADDRESS_BOOK_NAME; }