Examples of IPSocket


Examples of org.jclouds.net.IPSocket

  public void testHttpAvailable() throws Exception {

    // check that the http server started
    for (Instance instance : cluster.getInstances()) {
      // first, check the socket
      IPSocket socket = new IPSocket(instance.getPublicAddress().getHostAddress(), 80);
      assert socketTester.apply(socket) : instance;
     
      // then, try a GET
      URI httpUrl = URI.create("http://" + instance.getPublicAddress().getHostAddress());
      Strings2.toStringAndClose(httpUrl.toURL().openStream());
View Full Code Here

Examples of org.jclouds.net.IPSocket

                     .getProviderId(), template.getImage().getId(), group);
            // run only a single node
            NodeMetadata node = Iterables.getOnlyElement(compute.createNodesInGroup(group, 1, template));

            System.out.printf("<< running node(%s)%n", node.getId());
            IPSocket socket = new IPSocket(Iterables.get(node.getPublicAddresses(), 0), node.getLoginPort());
            if (socketTester.apply(socket)) {
               System.out.printf("<< socket ready [%s] node(%s)%n", socket, node.getId());
               System.out.printf("ssh to node with the following command:%n ssh %s@%s%n",
                        node.getCredentials().identity, socket.getAddress());
               System.exit(0);
            } else {
               System.out.printf("<< socket not ready [%s] node(%s)%n", socket, node.getId());
            }
         } else if (command.equals("destroy")) {
View Full Code Here

Examples of org.jclouds.net.IPSocket

      assertBeginState(instance, GROUP);
      assertIpHostNullAndStatusNEW(instance);
      blockUntilRunning(instance);
      instance = assertRunning(instance, GROUP);
      sshAndDf(new IPSocket(instance.getPrimaryIP().getIP(), 22), new Credentials("idcuser", key.getKeyMaterial()));
   }
View Full Code Here

Examples of org.jclouds.net.IPSocket

      assertEquals(volume.getInstanceId(), instance2.getId());

      refreshIpAndReturnAllAddresses();
      assertEquals(ip.getInstanceId(), instance2.getId());
      assertEquals(ip.getIP(), instance2.getPrimaryIP().getIP());
      sshAndDf(new IPSocket(instance2.getPrimaryIP().getIP(), 22), new Credentials("idcuser", keyPair.get("private")));
   }
View Full Code Here

Examples of org.jclouds.net.IPSocket

                     .getProviderId(), template.getImage().getId(), group);
            // run only a single node
            NodeMetadata node = Iterables.getOnlyElement(compute.createNodesInGroup(group, 1, template));

            System.out.printf("<< running node(%s)%n", node.getId());
            IPSocket socket = new IPSocket(Iterables.get(node.getPublicAddresses(), 0), node.getLoginPort());
            if (socketTester.apply(socket)) {
               System.out.printf("<< socket ready [%s] node(%s)%n", socket, node.getId());
               System.out.printf("ssh to node with the following command:%n ssh %s@%s%n",
                        node.getCredentials().identity, socket.getAddress());
               System.exit(0);
            } else {
               System.out.printf("<< socket not ready [%s] node(%s)%n", socket, node.getId());
            }
         } else if (command.equals("destroy")) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.