Package org.jclouds.cloudstack.domain

Examples of org.jclouds.cloudstack.domain.Domain


   @Test
   public void testListDomainChildren() {
      skipIfNotDomainAdmin();

      Set<Domain> domains = domainAdminClient.getDomainClient().listDomains();
      Domain root = findRootOfVisibleTree(domains);
      if (domains.size() > 1) {
         assertTrue(root.hasChild());
      }

      Set<Domain> children = domainAdminClient.getDomainClient()
         .listDomainChildren(parentDomainId(root.getId()).isRecursive(true));
      assertEquals(domains.size() - 1, children.size());
      assertTrue(Sets.difference(domains, children).contains(root));
   }
View Full Code Here


   @Test(expectedExceptions = IllegalStateException.class)
   public void testCreateUpdateDeleteDomain() throws InterruptedException {
      skipIfNotDomainAdmin();

      Domain domain = null;
      try {
         domain = domainClient.createDomain(prefix + "-domain");
         checkDomain(domain, rootDomain, prefix + "-domain");

         Domain updated = domainClient.updateDomain(domain.getId(), name(prefix + "-domain-2"));
         checkDomain(updated, rootDomain, prefix + "-domain-2");
         assertEquals(updated.getId(), domain.getId());

      } finally {
         if (domain != null) {
            domainClient.deleteDomainAndAttachedResources(domain.getId());
         }
View Full Code Here

   @Test
   public void testCreateUpdateDeleteDomain() {
      skipIfNotDomainAdmin();

      Domain domain = null;
      try {
         domain = domainClient.createDomain(prefix + "-domain");
         checkDomain(domain, rootDomain, prefix + "-domain");

         Domain updated = domainClient.updateDomain(domain.getId(), name(prefix + "-domain-2"));
         checkDomain(updated, rootDomain, prefix + "-domain-2");
         assertEquals(updated.getId(), domain.getId());

      } finally {
         if (domain != null) {
            domainClient.deleteDomainAndAttachedResources(domain.getId());
         }
View Full Code Here

   @Test(expectedExceptions = IllegalStateException.class)
   public void testCreateUpdateDeleteDomain() throws InterruptedException {
      skipIfNotDomainAdmin();

      Domain domain = null;
      try {
         domain = domainClient.createDomain(prefix + "-domain");
         checkDomain(domain, rootDomain, prefix + "-domain");

         Domain updated = domainClient.updateDomain(domain.getId(), name(prefix + "-domain-2"));
         checkDomain(updated, rootDomain, prefix + "-domain-2");
         assertEquals(updated.getId(), domain.getId());

      } finally {
         if (domain != null) {
            domainClient.deleteDomainAndAttachedResources(domain.getId());
         }
View Full Code Here

   @Test
   public void testListDomainChildren() {
      skipIfNotDomainAdmin();

      Set<Domain> domains = domainAdminClient.getDomainClient().listDomains();
      Domain root = findRootOfVisibleTree(domains);
      if (domains.size() > 1) {
         assertTrue(root.hasChild());
      }

      Set<Domain> children = domainAdminClient.getDomainClient()
         .listDomainChildren(parentDomainId(root.getId()).isRecursive(true));
      assertEquals(domains.size() - 1, children.size());
      assertTrue(Sets.difference(domains, children).contains(root));
   }
View Full Code Here

   @Test
   public void testListDomainChildren() {
      skipIfNotDomainAdmin();

      Set<Domain> domains = domainAdminClient.getDomainClient().listDomains();
      Domain root = findRootOfVisibleTree(domains);
      if (domains.size() > 1) {
         assertTrue(root.hasChild());
      }

      Set<Domain> children = domainAdminClient.getDomainClient()
         .listDomainChildren(parentDomainId(root.getId()).isRecursive(true));
      assertEquals(domains.size() - 1, children.size());
      assertTrue(Sets.difference(domains, children).contains(root));
   }
View Full Code Here

   @Test
   public void testCreateUpdateDeleteDomain() {
      skipIfNotDomainAdmin();

      Domain domain = null;
      try {
         domain = domainClient.createDomain(prefix + "-domain");
         checkDomain(domain, rootDomain, prefix + "-domain");

         Domain updated = domainClient.updateDomain(domain.getId(), name(prefix + "-domain-2"));
         checkDomain(updated, rootDomain, prefix + "-domain-2");
         assertEquals(updated.getId(), domain.getId());

      } finally {
         if (domain != null) {
            domainClient.deleteDomainAndAttachedResources(domain.getId());
         }
View Full Code Here

   @Test
   public void testListDomainChildren() {
      skipIfNotDomainAdmin();

      Set<Domain> domains = domainAdminClient.getDomainClient().listDomains();
      Domain root = findRootOfVisibleTree(domains);
      if (domains.size() > 1) {
         assertTrue(root.hasChild());
      }

      Set<Domain> children = domainAdminClient.getDomainClient()
         .listDomainChildren(parentDomainId(root.getId()).isRecursive(true));
      assertEquals(domains.size() - 1, children.size());
      assertTrue(Sets.difference(domains, children).contains(root));
   }
View Full Code Here

   @Test(expectedExceptions = IllegalStateException.class)
   public void testCreateUpdateDeleteDomain() throws InterruptedException {
      skipIfNotDomainAdmin();

      Domain domain = null;
      try {
         domain = domainClient.createDomain(prefix + "-domain");
         checkDomain(domain, rootDomain, prefix + "-domain");

         Domain updated = domainClient.updateDomain(domain.getId(), name(prefix + "-domain-2"));
         checkDomain(updated, rootDomain, prefix + "-domain-2");
         assertEquals(updated.getId(), domain.getId());

      } finally {
         if (domain != null) {
            domainClient.deleteDomainAndAttachedResources(domain.getId());
         }
View Full Code Here

TOP

Related Classes of org.jclouds.cloudstack.domain.Domain

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.