Package org.jclouds.rds.domain

Examples of org.jclouds.rds.domain.SecurityGroup


public class GetSecurityGroupResponseTest extends BaseHandlerTest {

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

      SecurityGroup expected = expected();

      SecurityGroupHandler handler = injector.getInstance(SecurityGroupHandler.class);
      SecurityGroup result = factory.create(handler).parse(is);

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


   private SecurityGroup securityGroup;

   public void testCreateSecurityGroup() {

      SecurityGroup newSecurityGroup = api().createWithNameAndDescription(SECURITYGROUP, "jclouds");

      securityGroup = newSecurityGroup;
      Logger.getAnonymousLogger().info("created securityGroup: " + securityGroup);

      assertEquals(securityGroup.getName(), SECURITYGROUP);
View Full Code Here

      for (SecurityGroup securityGroup : response) {
         checkSecurityGroup(securityGroup);
      }

      if (Iterables.size(response) > 0) {
         SecurityGroup securityGroup = response.iterator().next();
         Assert.assertEquals(api().get(securityGroup.getName()), securityGroup);
      }

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

                     });
                  }
               }, 30000, 100, 500, MILLISECONDS);

      try {
         SecurityGroup securityGroup = sgApi().createWithNameAndDescription(name, "jclouds");

         Logger.getAnonymousLogger().info("created securityGroup: " + securityGroup);

         // we could look up our IP address alternatively
         securityGroup = sgApi().authorizeIngressToIPRange(name, "0.0.0.0/0");

         assertTrue(ipRangesAuthorized.apply(securityGroup), securityGroup.toString());

         securityGroup = sgApi().get(securityGroup.getName());
         Logger.getAnonymousLogger().info("ip range authorized: " + securityGroup);
         return securityGroup;
      } catch (RuntimeException e) {
         sgApi().delete(name);
         throw e;
View Full Code Here

   private SecurityGroup securityGroup;

   public void testCreateSecurityGroup() {

      SecurityGroup newSecurityGroup = api().createWithNameAndDescription(SECURITYGROUP, "jclouds");

      securityGroup = newSecurityGroup;
      Logger.getAnonymousLogger().info("created securityGroup: " + securityGroup);

      assertEquals(securityGroup.getName(), SECURITYGROUP);
View Full Code Here

      for (SecurityGroup securityGroup : response) {
         checkSecurityGroup(securityGroup);
      }

      if (Iterables.size(response) > 0) {
         SecurityGroup securityGroup = response.iterator().next();
         Assert.assertEquals(api().get(securityGroup.getName()), securityGroup);
      }

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

                     });
                  }
               }, 30000, 100, 500, MILLISECONDS);

      try {
         SecurityGroup securityGroup = sgApi().createWithNameAndDescription(name, "jclouds");

         Logger.getAnonymousLogger().info("created securityGroup: " + securityGroup);

         // we could look up our IP address alternatively
         securityGroup = sgApi().authorizeIngressToIPRange(name, "0.0.0.0/0");

         assertTrue(ipRangesAuthorized.apply(securityGroup), securityGroup.toString());

         securityGroup = sgApi().get(securityGroup.getName());
         Logger.getAnonymousLogger().info("ip range authorized: " + securityGroup);
         return securityGroup;
      } catch (RuntimeException e) {
         sgApi().delete(name);
         throw e;
View Full Code Here

public class GetSecurityGroupResponseTest extends BaseHandlerTest {

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

      SecurityGroup expected = expected();

      SecurityGroupHandler handler = injector.getInstance(SecurityGroupHandler.class);
      SecurityGroup result = factory.create(handler).parse(is);

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

TOP

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

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.