Examples of InstanceProfile


Examples of org.jclouds.iam.domain.InstanceProfile

   String name = System.getProperty("user.name").replace('.', '-') + ".instanceProfile.iamtest.jclouds.org.";

   @Test
   public void testCreateInstanceProfile() {
      InstanceProfile newInstanceProfile = api().create(name);
      getAnonymousLogger().info("created instanceProfile: " + newInstanceProfile);
      checkInstanceProfile(newInstanceProfile);
      assertEquals(newInstanceProfile.getName(), name);
   }
View Full Code Here

Examples of org.jclouds.iam.domain.InstanceProfile

   @Test(dependsOnMethods = "testCreateInstanceProfile")
   public void testAddRoleRemoveRoleFromInstanceProfile() {
      try {
         createRoleWithPolicy(name);
         api().addRole(name, name);
         InstanceProfile updated = api().get(name);
         RoleApiLiveTest.checkRole(updated.getRoles().get(0));

         api().removeRole(name, name);
         updated = api().get(name);
         assertEquals(updated.getRoles(), ImmutableList.of());
      } finally {
         tearDownRoleWithPolicy(name);
      }
   }
View Full Code Here

Examples of org.jclouds.iam.domain.InstanceProfile

public class GetInstanceProfileResponseTest extends BaseHandlerTest {

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

      InstanceProfile expected = expected();

      InstanceProfileHandler handler = injector.getInstance(InstanceProfileHandler.class);
      InstanceProfile result = factory.create(handler).parse(is);

      assertEquals(result, expected);
      assertEquals(result.getPath(), expected.getPath());
      assertEquals(result.getName(), expected.getName());
      assertEquals(result.getCreateDate(), expected.getCreateDate());
      assertEquals(result.getRoles(), expected.getRoles());
   }
View Full Code Here

Examples of org.jclouds.iam.domain.InstanceProfile

   String name = System.getProperty("user.name").replace('.', '-') + ".instanceProfile.iamtest.jclouds.org.";

   @Test
   public void testCreateInstanceProfile() {
      InstanceProfile newInstanceProfile = api().create(name);
      getAnonymousLogger().info("created instanceProfile: " + newInstanceProfile);
      checkInstanceProfile(newInstanceProfile);
      assertEquals(newInstanceProfile.getName(), name);
   }
View Full Code Here

Examples of org.jclouds.iam.domain.InstanceProfile

   @Test(dependsOnMethods = "testCreateInstanceProfile")
   public void testAddRoleRemoveRoleFromInstanceProfile() {
      try {
         createRoleWithPolicy(name);
         api().addRole(name, name);
         InstanceProfile updated = api().get(name);
         RoleApiLiveTest.checkRole(updated.getRoles().get(0));

         api().removeRole(name, name);
         updated = api().get(name);
         assertEquals(updated.getRoles(), ImmutableList.of());
      } finally {
         tearDownRoleWithPolicy(name);
      }
   }
View Full Code Here

Examples of org.jclouds.iam.domain.InstanceProfile

public class GetInstanceProfileResponseTest extends BaseHandlerTest {

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

      InstanceProfile expected = expected();

      InstanceProfileHandler handler = injector.getInstance(InstanceProfileHandler.class);
      InstanceProfile result = factory.create(handler).parse(is);

      assertEquals(result, expected);
      assertEquals(result.getPath(), expected.getPath());
      assertEquals(result.getName(), expected.getName());
      assertEquals(result.getCreateDate(), expected.getCreateDate());
      assertEquals(result.getRoles(), expected.getRoles());
   }
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.