Package org.jclouds.vcloud.domain

Examples of org.jclouds.vcloud.domain.Org


@Test(groups = "live", enabled = true, singleThreaded = true, testName = "VAppTemplateApiLiveTest")
public class VAppTemplateApiLiveTest extends BaseVCloudApiLiveTest {
   @Test
   public void testGetVAppTemplate() throws Exception {
      Org org = getVCloudApi().getOrgApi().findOrgNamed(null);
      for (ReferenceType cat : org.getCatalogs().values()) {
         Catalog response = getVCloudApi().getCatalogApi().getCatalog(cat.getHref());
         for (ReferenceType resource : response.values()) {
            if (resource.getType().equals(VCloudMediaType.CATALOGITEM_XML)) {
               CatalogItem item = getVCloudApi().getCatalogApi().getCatalogItem(resource.getHref());
               if (item.getEntity().getType().equals(VCloudMediaType.VAPPTEMPLATE_XML)) {
View Full Code Here


      }
   }

   @Test
   public void testGetOvfEnvelopeForVAppTemplate() throws Exception {
      Org org = getVCloudApi().getOrgApi().findOrgNamed(null);
      for (ReferenceType cat : org.getCatalogs().values()) {
         Catalog response = getVCloudApi().getCatalogApi().getCatalog(cat.getHref());
         for (ReferenceType resource : response.values()) {
            if (resource.getType().equals(VCloudMediaType.CATALOGITEM_XML)) {
               CatalogItem item = getVCloudApi().getCatalogApi().getCatalogItem(resource.getHref());
               if (item.getEntity().getType().equals(VCloudMediaType.VAPPTEMPLATE_XML)) {
View Full Code Here

      }
   }

   @Test
   public void testFindVAppTemplate() throws Exception {
      Org org = getVCloudApi().getOrgApi().findOrgNamed(null);
      for (ReferenceType cat : org.getCatalogs().values()) {
         Catalog response = getVCloudApi().getCatalogApi().getCatalog(cat.getHref());
         for (ReferenceType resource : response.values()) {
            if (resource.getType().equals(VCloudMediaType.CATALOGITEM_XML)) {
               CatalogItem item = getVCloudApi().getCatalogApi().getCatalogItem(resource.getHref());
               if (item.getEntity().getType().equals(VCloudMediaType.VAPPTEMPLATE_XML)) {
                  VAppTemplate template = getVCloudApi().getVAppTemplateApi().findVAppTemplateInOrgCatalogNamed(
                           org.getName(), response.getName(), item.getEntity().getName());
                  if (template != null) {
                     // the UUID in the href is the only way to actually link templates
                     assertEquals(template.getHref(), item.getEntity().getHref());
                  } else {
                     // null can be no longer available or auth exception
View Full Code Here

      this.nameToOrg = checkNotNull(nameToOrg, "nameToOrg");
   }

   @Override
   public ReferenceType apply(ReferenceType defaultOrg) {
      Org org = nameToOrg.get().get(defaultOrg.getName());
      checkState(org != null, "could not retrieve Org at %s", defaultOrg);
      return selector.apply(org.getCatalogs().values());
   }
View Full Code Here

      this.nameToOrg = checkNotNull(nameToOrg, "nameToOrg");
   }

   @Override
   public ReferenceType apply(ReferenceType defaultOrg) {
      Org org = nameToOrg.get().get(defaultOrg.getName());
      checkState(org != null, "could not retrieve Org at %s", defaultOrg);
      return selector.apply(org.getVDCs().values());
   }
View Full Code Here

@Test(groups = "live", enabled = true, singleThreaded = true, testName = "CatalogApiLiveTest")
public class CatalogApiLiveTest extends BaseVCloudApiLiveTest {
   @Test
   public void testGetCatalog() throws Exception {
      Org org = getVCloudApi().getOrgApi().findOrgNamed(null);
      for (ReferenceType catalog : org.getCatalogs().values()) {
         assertEquals(catalog.getType(), VCloudMediaType.CATALOG_XML);
         assertNotNull(getVCloudApi().getCatalogApi().getCatalog(catalog.getHref()));
      }
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.domain.Org

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.