class Layer1Node implements Comparable<Layer1Node> {

  public @Nullable Layer1Node toLogicalNode(NetworkConfigurations networkConfigurations) {
    Optional<Interface> optIface = networkConfigurations.getInterface(_hostname, _interfaceName);
    checkArgument(
        optIface.isPresent(),
        "Unable to create logical node for missing interface %s[%s]",
        _hostname,
        _interfaceName);
    Interface iface = optIface.get();
    if (iface.getChannelGroup() == null) {
      return this;
    }
    return networkConfigurations
        .getInterface(_hostname, iface.getChannelGroup())
        .filter(Interface::getActive)
        .map(c -> new Layer1Node(_hostname, c.getName()))
        .orElse(null);
  }

  public  Layer1Node(String hostname, String interfaceName);

}