Examples of InstanceStateChange


Examples of io.fathom.cloud.compute.api.aws.ec2.model.InstanceStateChange

        }

        asyncTasks.stopInstances(stopInstances);
        for (InstanceData instance : stopInstances) {
            // This is a very abbreviated state
            InstanceStateChange instanceStateChange = new InstanceStateChange();
            instanceStateChange.instanceId = toEc2InstanceId(instance.getId());

            instanceStateChange.currentState = buildInstanceState(instance);
            instanceStateChange.previousState = buildInstanceState(CloudModel.InstanceState.STOPPING);
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

         }
      } else if (qName.equals("item")) {
         String region = AWSUtils.findRegionInArgsOrNull(getRequest());
         if (region == null)
            region = defaultRegion.get();
         instances.add(new InstanceStateChange(region, instanceId, shutdownState, previousState));
         this.instanceId = null;
         this.shutdownState = null;
         this.previousState = null;
      }
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

         }
      } else if (qName.equals("item")) {
         String region = AWSUtils.findRegionInArgsOrNull(getRequest());
         if (region == null)
            region = defaultRegion.get();
         instances.add(new InstanceStateChange(region, instanceId, shutdownState, previousState));
         this.instanceId = null;
         this.shutdownState = null;
         this.previousState = null;
      }
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

   public void testTerminate() {

      InputStream is = getClass().getResourceAsStream("/terminate_instances.xml");

      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
               "i-3ea74257", InstanceState.SHUTTING_DOWN, InstanceState.RUNNING));

      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
      addDefaultRegionToHandler(handler);
      Set<InstanceStateChange> result = factory.create(handler).parse(is);
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

   public void testStart() {

      InputStream is = getClass().getResourceAsStream("/start_instances.xml");

      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
               "i-10a64379", InstanceState.PENDING, InstanceState.STOPPED));
      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
      addDefaultRegionToHandler(handler);
      Set<InstanceStateChange> result = factory.create(handler).parse(is);
      assertEquals(result, expected);
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

   public void testStop() {

      InputStream is = getClass().getResourceAsStream("/stop_instances.xml");

      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
               "i-10a64379", InstanceState.STOPPING, InstanceState.RUNNING));

      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
      addDefaultRegionToHandler(handler);
      Set<InstanceStateChange> result = factory.create(handler).parse(is);
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

         }
      } else if (qName.equals("item")) {
         String region = AWSUtils.findRegionInArgsOrNull(getRequest());
         if (region == null)
            region = defaultRegion.get();
         instances.add(new InstanceStateChange(region, instanceId, shutdownState, previousState));
         this.instanceId = null;
         this.shutdownState = null;
         this.previousState = null;
      }
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

         }
      } else if (qName.equals("item")) {
         String region = AWSUtils.findRegionInArgsOrNull(getRequest());
         if (region == null)
            region = defaultRegion.get();
         instances.add(new InstanceStateChange(region, instanceId, shutdownState, previousState));
         this.instanceId = null;
         this.shutdownState = null;
         this.previousState = null;
      }
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

   public void testTerminate() {

      InputStream is = getClass().getResourceAsStream("/terminate_instances.xml");

      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
               "i-3ea74257", InstanceState.SHUTTING_DOWN, InstanceState.RUNNING));

      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
      addDefaultRegionToHandler(handler);
      Set<InstanceStateChange> result = factory.create(handler).parse(is);
View Full Code Here

Examples of org.jclouds.ec2.domain.InstanceStateChange

   public void testStart() {

      InputStream is = getClass().getResourceAsStream("/start_instances.xml");

      Set<InstanceStateChange> expected = ImmutableSet.of(new InstanceStateChange(defaultRegion,
               "i-10a64379", InstanceState.PENDING, InstanceState.STOPPED));
      InstanceStateChangeHandler handler = injector.getInstance(InstanceStateChangeHandler.class);
      addDefaultRegionToHandler(handler);
      Set<InstanceStateChange> result = factory.create(handler).parse(is);
      assertEquals(result, expected);
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.