Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.EndpointInfo


    // String requireLdapGroup = "cn=Git,ou=Groups,dc=com,dc=fathomscale";

    int port = 389;
    List<EndpointInfo> endpoints = EndpointInfo.findEndpoints(ldapService.getTags(), port);

    EndpointInfo ldapEndpoint = EndpointChooser.preferIpv4().choose(endpoints);

    if (ldapEndpoint == null) {
      throw new OpsException("Cannot find suitable LDAP endpoint");
    }
View Full Code Here


    UntypedItem untypedItem = client.getItemUntyped(key, getFormat());
    List<EndpointInfo> endpointList = EndpointInfo.getEndpoints(untypedItem.getTags());

    Set<EndpointInfo> endpoints = Sets.newHashSet(endpointList);

    EndpointInfo bestEndpoint = null;
    for (EndpointInfo candidate : endpoints) {
      if (bestEndpoint == null) {
        bestEndpoint = candidate;
      } else {
        throw new IllegalArgumentException("Cannot choose between: " + bestEndpoint + " and " + candidate);
View Full Code Here

          String address = ingress.getPublicAddress();
          if (Strings.isNullOrEmpty(address)) {
            throw new IllegalStateException();
          }

          EndpointInfo endpoint = new EndpointInfo(address, model.publicPort);
          tagChanges.addTags.add(endpoint.toTag());

          return tagChanges;
        }
      };
View Full Code Here

          if (socketAddress.getPort() != publicPort) {
            throw new IllegalStateException();
          }

          EndpointInfo endpoint = new EndpointInfo(socketAddress);
          tagChanges.addTags.add(endpoint.toTag());
          return tagChanges;
        }
      };

      for (ItemBase tagItem : tagItems) {
View Full Code Here

  public void handler(OpsTarget target, ZookeeperServer zookeeperServer) throws OpsException {
    if (OpsContext.isConfigure() || OpsContext.isValidate()) {
      int port = ZookeeperConstants.ZK_PUBLIC_PORT;
      List<EndpointInfo> endpoints = EndpointInfo.findEndpoints(zookeeperServer.getTags(), port);

      EndpointInfo endpoint = EndpointChooser.any().choose(endpoints);
      if (endpoint == null) {
        throw new OpsException("Cannot find endpoint for zookeeper");
      }

      InetSocketAddress socketAddress = endpoint.asSocketAddress();

      {
        ZookeeperResponse response;
        try {
          // IPV6 requires ipsec; use the IPV4 loopback instead
View Full Code Here

          if (publicAddress == null) {
            throw new OpsException("Cannot find address for instance: " + model.instance);
          }

          TagChanges tagChanges = new TagChanges();
          EndpointInfo endpoint = new EndpointInfo(publicAddress, model.publicPort);
          tagChanges.addTags.add(endpoint.toTag());

          return tagChanges;
        }
      };
      tagger.platformLayerKey = model.getKey();
View Full Code Here

          String address = ingress.getPublicAddress();
          if (Strings.isNullOrEmpty(address)) {
            throw new IllegalStateException();
          }

          EndpointInfo endpoint = new EndpointInfo(address, model.publicPort);
          tagChanges.addTags.add(endpoint.toTag());

          return tagChanges;
        }
      };
View Full Code Here

TOP

Related Classes of org.platformlayer.core.model.EndpointInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.