Package org.jclouds.rds.domain

Examples of org.jclouds.rds.domain.Instance


   protected final DateService dateService = new SimpleDateFormatDateService();

   public void test() {
      InputStream is = getClass().getResourceAsStream("/get_instance.xml");

      Instance expected = expected();

      InstanceHandler handler = injector.getInstance(InstanceHandler.class);
      Instance result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
  }
View Full Code Here


   private Instance instance;

   public void testCreateInstance() {

      Instance newInstance = api().create(
               INSTANCE,
               InstanceRequest.builder()
                              .instanceClass("db.t1.micro")
                              .allocatedStorageGB(5)
                              .securityGroup(securityGroup.getName())
                              .name("jclouds")
                              .engine("mysql")
                              .masterUsername("master").masterPassword("Password01")
                              .backupRetentionPeriod(0).build());

      instance = newInstance;
      Logger.getAnonymousLogger().info("created instance: " + instance);

      assertEquals(instance.getId(), INSTANCE);
      assertEquals(instance.getName().get(), "jclouds");

      checkInstance(newInstance);

      assertTrue(instanceAvailable.apply(newInstance), newInstance.toString());
      instance = api().get(newInstance.getId());
      Logger.getAnonymousLogger().info("instance available: " + instance);

   }
View Full Code Here

      for (Instance instance : response) {
         checkInstance(instance);
      }

      if (Iterables.size(response) > 0) {
         Instance instance = response.iterator().next();
         Assert.assertEquals(api().get(instance.getId()), instance);
      }

      // Test with a Marker, even if it's null
      response = api().list(ListInstancesOptions.Builder.afterMarker(response.nextMarker().orNull()));
      for (Instance instance : response) {
View Full Code Here

   private Instance instance;

   public void testCreateInstance() {

      Instance newInstance = api().create(
               INSTANCE,
               InstanceRequest.builder()
                              .instanceClass("db.t1.micro")
                              .allocatedStorageGB(5)
                              .securityGroup(securityGroup.getName())
                              .name("jclouds")
                              .engine("mysql")
                              .masterUsername("master").masterPassword("Password01")
                              .backupRetentionPeriod(0).build());

      instance = newInstance;
      Logger.getAnonymousLogger().info("created instance: " + instance);

      assertEquals(instance.getId(), INSTANCE);
      assertEquals(instance.getName().get(), "jclouds");

      checkInstance(newInstance);

      assertTrue(instanceAvailable.apply(newInstance), newInstance.toString());
      instance = api().get(newInstance.getId());
      Logger.getAnonymousLogger().info("instance available: " + instance);

   }
View Full Code Here

      for (Instance instance : response) {
         checkInstance(instance);
      }

      if (Iterables.size(response) > 0) {
         Instance instance = response.iterator().next();
         Assert.assertEquals(api().get(instance.getId()), instance);
      }

      // Test with a Marker, even if it's null
      response = api().list(ListInstancesOptions.Builder.afterMarker(response.nextMarker().orNull()));
      for (Instance instance : response) {
View Full Code Here

   protected final DateService dateService = new SimpleDateFormatDateService();

   public void test() {
      InputStream is = getClass().getResourceAsStream("/get_instance.xml");

      Instance expected = expected();

      InstanceHandler handler = injector.getInstance(InstanceHandler.class);
      Instance result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
  }
View Full Code Here

TOP

Related Classes of org.jclouds.rds.domain.Instance

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.