Package org.jclouds.ec2.domain

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


   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

   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

   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

         }
      } 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

         }
      } 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

   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

   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

   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

         }
      } 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

TOP

Related Classes of org.jclouds.ec2.domain.InstanceStateChange

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.