Package org.jclouds.ec2.predicates

Examples of org.jclouds.ec2.predicates.InstanceStateRunning


   public void setupContext() {
      super.setupContext();
      Injector injector = view.utils().injector();
      client = injector.getInstance(EC2Client.class);
      sshFactory = injector.getInstance(SshClient.Factory.class);
      runningTester = retry(new InstanceStateRunning(client), 180, 5,SECONDS);
      hasIpTester = retry(new InstanceHasIpAddress(client), 180, 5, SECONDS);
      SocketOpen socketOpen = injector.getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 180, 1, SECONDS);
   }
View Full Code Here


      snapshotTester = retry(snapshotCompleted, 120, 3, SECONDS);

      VolumeAttached volumeAttached = injector.getInstance(VolumeAttached.class);
      attachTester = retry(volumeAttached, 60, 1, SECONDS);

      runningTester = retry(new InstanceStateRunning(client), 180, 5, SECONDS);

      InstanceStateStopped instanceStateStopped = injector.getInstance(InstanceStateStopped.class);
      stoppedTester = retry(instanceStateStopped, 60, 1, SECONDS);

      InstanceStateTerminated instanceStateTerminated = injector.getInstance(InstanceStateTerminated.class);
View Full Code Here

      snapshotTester = retry(snapshotCompleted, 120, 3, SECONDS);

      VolumeAttached volumeAttached = injector.getInstance(VolumeAttached.class);
      attachTester = retry(volumeAttached, 60, 1, SECONDS);

      runningTester = retry(new InstanceStateRunning(client), 180, 5, SECONDS);

      InstanceStateStopped instanceStateStopped = injector.getInstance(InstanceStateStopped.class);
      stoppedTester = retry(instanceStateStopped, 60, 1, SECONDS);

      InstanceStateTerminated instanceStateTerminated = injector.getInstance(InstanceStateTerminated.class);
View Full Code Here

   public void setupContext() {
      super.setupContext();
      Injector injector = view.utils().injector();
      client = injector.getInstance(EC2Api.class);
      sshFactory = injector.getInstance(SshClient.Factory.class);
      runningTester = retry(new InstanceStateRunning(client), 180, 5,SECONDS);
      hasIpTester = retry(new InstanceHasIpAddress(client), 180, 5, SECONDS);
      SocketOpen socketOpen = injector.getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 180, 1, SECONDS);
   }
View Full Code Here

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setupContext() {
      super.setupContext();
      ec2Api = view.unwrapApi(EC2Api.class);
      runningTester = retry(new InstanceStateRunning(ec2Api), 600, 5, SECONDS);

      client = ec2Api.getAMIApi().get();
      if (ebsTemplate != null) {
         Template template = view.getComputeService().templateBuilder().from(ebsTemplate).build();
         regionId = template.getLocation().getId();
View Full Code Here

   }

   static RunningInstance blockUntilInstanceRunning(EC2Client client, RunningInstance instance) throws TimeoutException {
      // create utilities that wait for the instance to finish
      RetryablePredicate<RunningInstance> runningTester = new RetryablePredicate<RunningInstance>(
               new InstanceStateRunning(client), 180, 5, TimeUnit.SECONDS);

      System.out.printf("%d: %s awaiting instance to run %n", System.currentTimeMillis(), instance.getId());
      if (!runningTester.apply(instance))
         throw new TimeoutException("timeout waiting for instance to run: " + instance.getId());
View Full Code Here

   public void setupContext() {
      super.setupContext();
      Injector injector = view.utils().injector();
      client = injector.getInstance(EC2Client.class);
      sshFactory = injector.getInstance(SshClient.Factory.class);
      runningTester = retry(new InstanceStateRunning(client), 180, 5,SECONDS);
      hasIpTester = retry(new InstanceHasIpAddress(client), 180, 5, SECONDS);
      SocketOpen socketOpen = injector.getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 180, 1, SECONDS);
   }
View Full Code Here

      snapshotTester = retry(snapshotCompleted, 120, 3, SECONDS);

      VolumeAttached volumeAttached = injector.getInstance(VolumeAttached.class);
      attachTester = retry(volumeAttached, 60, 1, SECONDS);

      runningTester = retry(new InstanceStateRunning(client), 180, 5, SECONDS);

      InstanceStateStopped instanceStateStopped = injector.getInstance(InstanceStateStopped.class);
      stoppedTester = retry(instanceStateStopped, 60, 1, SECONDS);

      InstanceStateTerminated instanceStateTerminated = injector.getInstance(InstanceStateTerminated.class);
View Full Code Here

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setupContext() {
      super.setupContext();
      ec2Client = view.unwrap(EC2ApiMetadata.CONTEXT_TOKEN).getApi();
      runningTester = retry(new InstanceStateRunning(ec2Client), 600, 5, SECONDS);

      client = ec2Client.getAMIServices();
      if (ebsTemplate != null) {
         Template template = view.getComputeService().templateBuilder().from(ebsTemplate).build();
         regionId = template.getLocation().getId();
View Full Code Here

   }

   static RunningInstance blockUntilInstanceRunning(EC2Client client, RunningInstance instance) throws TimeoutException {
      // create utilities that wait for the instance to finish
      RetryablePredicate<RunningInstance> runningTester = new RetryablePredicate<RunningInstance>(
               new InstanceStateRunning(client), 180, 5, TimeUnit.SECONDS);

      System.out.printf("%d: %s awaiting instance to run %n", System.currentTimeMillis(), instance.getId());
      if (!runningTester.apply(instance))
         throw new TimeoutException("timeout waiting for instance to run: " + instance.getId());
View Full Code Here

TOP

Related Classes of org.jclouds.ec2.predicates.InstanceStateRunning

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.