Package org.jclouds.vcloud.director.v1_5.domain

Examples of org.jclouds.vcloud.director.v1_5.domain.AdminCatalog


               String.format(NOT_EMPTY_OBJECT_FMT, "CatalogRecord", "QueryResultRecords"));
   }

   @Test(description = "GET /catalogs/query?format=references", dependsOnMethods = { "testQueryAllCatalogs" })
   public void testQueryAllCatalogReferences() {
      CatalogReferences catalogReferences = queryApi.catalogReferencesQueryAll();
      assertFalse(catalogReferences.getReferences().isEmpty(),
               String.format(NOT_EMPTY_OBJECT_FMT, "CatalogReference", "CatalogReferences"));
   }
View Full Code Here


   }

   @Test(description = "GET /query")
   public void testQuery() {
      VAppTemplate vAppTemplate = lazyGetVAppTemplate();
      QueryResultRecords queryResult = queryApi
               .query("vAppTemplate", String.format("name==%s", vAppTemplate.getName()));
      Set<URI> hrefs = toHrefs(queryResult);

      assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP_TEMPLATE, null),
               QueryResultVAppTemplateRecord.class);
View Full Code Here

               + vAppTemplate.getHref() + "; but only has " + hrefs);
   }

   @Test(description = "GET /catalogs/query")
   public void testQueryAllCatalogs() {
      QueryResultRecords catalogRecords = queryApi.catalogsQueryAll();
      assertFalse(catalogRecords.getRecords().isEmpty(),
               String.format(NOT_EMPTY_OBJECT_FMT, "CatalogRecord", "QueryResultRecords"));
   }
View Full Code Here

               String.format(NOT_EMPTY_OBJECT_FMT, "CatalogReference", "CatalogReferences"));
   }

   @Test(description = "GET /vAppTemplates/query")
   public void testQueryAllVAppTemplates() {
      QueryResultRecords queryResult = queryApi.vAppTemplatesQueryAll();
      Set<URI> hrefs = toHrefs(queryResult);

      assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP_TEMPLATE, null),
               QueryResultVAppTemplateRecord.class);
      assertTrue(hrefs.contains(lazyGetVAppTemplate().getHref()), "VAppTemplates query result should include vAppTemplate "
View Full Code Here

   }

   @Test(description = "GET /vAppTemplates/query?filter")
   public void testQueryVAppTemplatesWithFilter() {
      VAppTemplate vAppTemplate = lazyGetVAppTemplate();
      QueryResultRecords queryResult = queryApi.vAppTemplatesQuery(String.format("name==%s", vAppTemplate.getName()));
      Set<URI> hrefs = toHrefs(queryResult);

      assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP_TEMPLATE, null),
               QueryResultVAppTemplateRecord.class);
      assertTrue(hrefs.contains(vAppTemplate.getHref()), "VAppTemplates query result should have found vAppTemplate "
View Full Code Here

   }

   @Test(description = "GET /vApps/query")
   public void testQueryAllVApps() {
      vApp = instantiateVApp();
      QueryResultRecords queryResult = queryApi.vAppsQueryAll();
      Set<URI> hrefs = toHrefs(queryResult);

      assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP, null), QueryResultVAppRecord.class);
      assertTrue(hrefs.contains(vApp.getHref()), "VApp query result should include vapp " + vApp.getHref()
               + "; but only has " + hrefs);
View Full Code Here

               + "; but only has " + hrefs);
   }

  @Test(description = "GET /vApps/query?filter", dependsOnMethods = { "testQueryAllVApps" })
  public void testQueryVAppsWithFilter() {
    QueryResultRecords queryResult = queryApi.vAppsQuery(String.format(
        "name==%s", vApp.getName()));
    Set<URI> hrefs = toHrefs(queryResult);

    assertRecordTypes(queryResult,
        Arrays.asList(VCloudDirectorMediaType.VAPP, null),
View Full Code Here

      vApp = vAppApi.get(vApp.getId()); // reload, so it has the VMs
      List<Vm> vms = vApp.getChildren().getVms();
      Set<URI> vmHrefs = toHrefs(vms);

      // Method under test: do the query
      QueryResultRecords queryResult = queryApi.vmsQueryAll();
      Set<URI> hrefs = toHrefs(queryResult);

      assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VM, null), QueryResultVMRecord.class);
      assertTrue(hrefs.containsAll(vmHrefs), "VMs query result should include vms " + vmHrefs + "; but only has "
               + hrefs);
View Full Code Here

  @Test(description = "GET /vms/query?filter", dependsOnMethods = { "testQueryAllVms" })
  public void testQueryAllVmsWithFilter() {
    List<Vm> vms = vApp.getChildren().getVms();
    Set<URI> vmHrefs = toHrefs(vms);

    QueryResultRecords queryResult = queryApi.vmsQuery(String.format(
        "containerName==%s", vApp.getName()));
    Set<URI> hrefs = toHrefs(queryResult);

    assertRecordTypes(queryResult,
        Arrays.asList(VCloudDirectorMediaType.VM, null),
View Full Code Here

        message);
  }

   @Test(description = "GET /mediaList/query")
   public void testQueryAllMedia() {
      QueryResultRecords queryResult = queryApi.mediaListQueryAll();

      assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP, null), QueryResultMediaRecord.class);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.AdminCatalog

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.