@Test public void testToAddressGroupVirtualAddress() { VirtualAddress v1 = new VirtualAddress("v1"); v1.setAddress(Ip.parse("1.1.1.1")); assertThat( toAddressGroup(v1), equalTo(new AddressGroup(ImmutableSortedSet.of("1.1.1.1"), v1.getName()))); }
@VisibleForTesting static AddressGroup toAddressGroup(Pool pool) { return new AddressGroup( pool.getMembers().values().stream() .map(PoolMember::getAddress) .filter(Objects::nonNull) .map(Objects::toString) .collect(ImmutableSortedSet.toImmutableSortedSet(Comparator.naturalOrder())), pool.getName()); }
F5BigipConfiguration extends VendorConfiguration { @VisibleForTesting static AddressGroup toAddressGroup(Pool pool) { return new AddressGroup( pool.getMembers().values().stream() .map(PoolMember::getAddress) .filter(Objects::nonNull) .map(Objects::toString) .collect(ImmutableSortedSet.toImmutableSortedSet(Comparator.naturalOrder())), pool.getName()); } }
F5BigipConfiguration extends VendorConfiguration { @VisibleForTesting static AddressGroup toAddressGroup(Pool pool) { return new AddressGroup( pool.getMembers().values().stream() .map(PoolMember::getAddress) .filter(Objects::nonNull) .map(Objects::toString) .collect(ImmutableSortedSet.toImmutableSortedSet(Comparator.naturalOrder())), pool.getName()); } F5BigipConfiguration(); }
F5BigipConfiguration extends VendorConfiguration { @VisibleForTesting static AddressGroup toAddressGroup(Pool pool) { return new AddressGroup( pool.getMembers().values().stream() .map(PoolMember::getAddress) .filter(Objects::nonNull) .map(Objects::toString) .collect(ImmutableSortedSet.toImmutableSortedSet(Comparator.naturalOrder())), pool.getName()); } F5BigipConfiguration(); static @Nonnull String computeAccessListRouteFilterName(String aclName); @VisibleForTesting static @Nonnull String computeBgpCommonExportPolicyName(String bgpProcessName); @VisibleForTesting static @Nonnull String computeBgpPeerExportPolicyName(
      String bgpProcessName, Ip peerAddress); @VisibleForTesting static @Nonnull String computeInterfaceIncomingFilterName(String vlanName); Map<String, AccessList> getAccessLists(); @Nonnull Map<String, BgpProcess> getBgpProcesses(); @Nonnull Map<String, Device> getDevices(); @Nonnull Map<String, DeviceGroup> getDeviceGroups(); @Nonnull Map<String, HaGroup> getHaGroups(); @Override String getHostname(); boolean getImish(); @Nonnull Map<String, ImishInterface> getImishInterfaces(); @Nonnull Map<String, Interface> getInterfaces(); @Nonnull Map<String, Node> getNodes(); @Nonnull Map<String, OspfProcess> getOspfProcesses(); @Nonnull Map<String, Pool> getPools(); @Nonnull Map<String, PrefixList> getPrefixLists(); @Nonnull Map<String, RouteMap> getRouteMaps(); @Nonnull Map<String, Route> getRoutes(); @Nonnull Map<String, Self> getSelves(); @Nonnull Map<String, SnatPool> getSnatPools(); @Nonnull Map<String, Snat> getSnats(); @Nonnull Map<String, SnatTranslation> getSnatTranslations(); @Nonnull Map<String, TrafficGroup> getTrafficGroups(); @Nonnull Map<String, Trunk> getTrunks(); @Nonnull Map<String, VirtualAddress> getVirtualAddresses(); @Nonnull Map<String, Virtual> getVirtuals(); @Nonnull Map<String, Vlan> getVlans(); @Override void setHostname(String hostname); void setImish(boolean imish); void setNtpServers(List<String> ntpServers); @Override void setVendor(ConfigurationFormat format); @Override @Nonnull List<Configuration> toVendorIndependentConfigurations(); }
F5BigipConfiguration extends VendorConfiguration { @VisibleForTesting static AddressGroup toAddressGroup(Pool pool) { return new AddressGroup( pool.getMembers().values().stream() .map(PoolMember::getAddress) .filter(Objects::nonNull) .map(Objects::toString) .collect(ImmutableSortedSet.toImmutableSortedSet(Comparator.naturalOrder())), pool.getName()); } F5BigipConfiguration(); static @Nonnull String computeAccessListRouteFilterName(String aclName); @VisibleForTesting static @Nonnull String computeBgpCommonExportPolicyName(String bgpProcessName); @VisibleForTesting static @Nonnull String computeBgpPeerExportPolicyName(
      String bgpProcessName, Ip peerAddress); @VisibleForTesting static @Nonnull String computeInterfaceIncomingFilterName(String vlanName); Map<String, AccessList> getAccessLists(); @Nonnull Map<String, BgpProcess> getBgpProcesses(); @Nonnull Map<String, Device> getDevices(); @Nonnull Map<String, DeviceGroup> getDeviceGroups(); @Nonnull Map<String, HaGroup> getHaGroups(); @Override String getHostname(); boolean getImish(); @Nonnull Map<String, ImishInterface> getImishInterfaces(); @Nonnull Map<String, Interface> getInterfaces(); @Nonnull Map<String, Node> getNodes(); @Nonnull Map<String, OspfProcess> getOspfProcesses(); @Nonnull Map<String, Pool> getPools(); @Nonnull Map<String, PrefixList> getPrefixLists(); @Nonnull Map<String, RouteMap> getRouteMaps(); @Nonnull Map<String, Route> getRoutes(); @Nonnull Map<String, Self> getSelves(); @Nonnull Map<String, SnatPool> getSnatPools(); @Nonnull Map<String, Snat> getSnats(); @Nonnull Map<String, SnatTranslation> getSnatTranslations(); @Nonnull Map<String, TrafficGroup> getTrafficGroups(); @Nonnull Map<String, Trunk> getTrunks(); @Nonnull Map<String, VirtualAddress> getVirtualAddresses(); @Nonnull Map<String, Virtual> getVirtuals(); @Nonnull Map<String, Vlan> getVlans(); @Override void setHostname(String hostname); void setImish(boolean imish); void setNtpServers(List<String> ntpServers); @Override void setVendor(ConfigurationFormat format); @Override @Nonnull List<Configuration> toVendorIndependentConfigurations();  }