/** * Get the {@link IpSpace} owned by the input interface. * * @param hostname The node the interface belongs to. * @param iface The name of the interface. * @return The {@link IpSpace} owned by the interface. */ default IpSpace getInterfaceOwnedIps(String hostname, String iface) { return getInterfaceOwnedIps() .getOrDefault(hostname, ImmutableMap.of()) .getOrDefault(iface, EmptyIpSpace.INSTANCE); }
@Override public IpSpace visitInterfaceLocation(InterfaceLocation interfaceLocation) { return _specifierContext.getInterfaceOwnedIps( interfaceLocation.getNodeName(), interfaceLocation.getInterfaceName()); } }