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

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


            .statusCode(200)
            .build();
     
   @Test
   public void testRemoveUserHref() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, remove, removeResponse);
      api.getUserApi().remove(userHref);
   }
View Full Code Here


      api.getUserApi().remove(userHref);
   }

   @Test
   public void testRemoveUserUrn() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse, resolveUser, resolveUserResponse, remove, removeResponse);
      api.getUserApi().remove(userUrn);
   }
View Full Code Here

         .href(URI.create(endpoint + "???"))
         .build();
  
   @Test( enabled = false )
   public void testGetVdc() {
      VCloudDirectorAdminApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("GET", "/admin/vdc/???")
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vdc/admin/vdc.xml",
                  VCloudDirectorMediaType.ADMIN_VDC)
            .httpResponseBuilder().build());

      AdminVdc expected = adminVdc();

      assertEquals(api.getVdcApi().get(vdcRef.getHref()), expected);
   }
View Full Code Here

      }
   }

   @Test(description = "POST /admin/org/{id}/catalogs")
   public void testAddCatalog() {
      AdminCatalog newCatalog = AdminCatalog.builder().name(name("Test Catalog "))
               .description("created by testAddCatalog()").build();
      catalog = catalogApi.addCatalogToOrg(newCatalog, org.getId());

      Checks.checkAdminCatalog(catalog);
View Full Code Here

   @Test(description = "DELETE /admin/catalog/{id}", dependsOnMethods = { "testAddCatalog" })
   public void testRemoveCatalog() {
      // assertEquals(catalog.getCatalogItems().getCatalogItems().size(), 0,
      // String.format(OBJ_FIELD_EMPTY_TO_DELETE, "Catalog", "CatalogItems",
      // catalog.getCatalogItems().getCatalogItems().toString()));
      AdminCatalog removeCatalog = AdminCatalog.builder().name(name("Test Catalog "))
               .description("created by testAddCatalog()").build();
      removeCatalog = catalogApi.addCatalogToOrg(removeCatalog, org.getId());
      catalogApi.remove(removeCatalog.getId());

      removeCatalog = catalogApi.get(removeCatalog.getId());
      assertNull(removeCatalog, String.format(OBJ_DEL, CATALOG, removeCatalog != null ? removeCatalog.toString() : ""));
   }
View Full Code Here

   protected void setupRequiredApis() {
      catalogApi = context.getApi().getCatalogApi();
      adminCatalogApi = adminContext.getApi().getCatalogApi();
    
      if(catalogUrn == null) {
         AdminCatalog newCatalog = AdminCatalog.builder().name(name("Test Catalog "))
                  .description("created by CatalogApiLiveTest").build();

         adminCatalog = adminCatalogApi.addCatalogToOrg(newCatalog, org.getId());
         catalogUrn = catalogApi.get(
                  find(adminCatalog.getLinks(),
View Full Code Here

    */
   private void setupAdminMembers() {
      //TODO: block until complete
      adminContext.getApi().getMetadataApi(orgUrn).put("KEY", "VALUE");

      AdminCatalog newCatalog = AdminCatalog.builder().name("Test Catalog " + getTestDateTimeStamp())
               .description("created by testOrg()").build();
      newCatalog = adminContext.getApi().getCatalogApi().addCatalogToOrg(newCatalog, orgUrn);

      catalogUrn = newCatalog.getId();

      adminMembersSet = true;
   }
View Full Code Here

   protected void setupRequiredApis() {
      catalogApi = context.getApi().getCatalogApi();
      adminCatalogApi = adminContext.getApi().getCatalogApi();
    
      if (catalogUrn == null) {
         AdminCatalog newCatalog = AdminCatalog.builder().name(name("Test Catalog "))
                  .description("created by CatalogApiLiveTest").build();

         adminCatalog = adminCatalogApi.addCatalogToOrg(newCatalog, org.getId());
         catalogUrn = catalogApi.get(
                  find(adminCatalog.getLinks(),
View Full Code Here

      }
   }

   @Test(description = "POST /admin/org/{id}/catalogs")
   public void testAddCatalog() {
      AdminCatalog newCatalog = AdminCatalog.builder().name(name("Test Catalog "))
               .description("created by testAddCatalog()").build();
      catalog = catalogApi.addCatalogToOrg(newCatalog, org.getId());

      Checks.checkAdminCatalog(catalog);
View Full Code Here

   @Test(description = "DELETE /admin/catalog/{id}", dependsOnMethods = { "testAddCatalog" })
   public void testRemoveCatalog() {
      // assertEquals(catalog.getCatalogItems().getCatalogItems().size(), 0,
      // String.format(OBJ_FIELD_EMPTY_TO_DELETE, "Catalog", "CatalogItems",
      // catalog.getCatalogItems().getCatalogItems().toString()));
      AdminCatalog removeCatalog = AdminCatalog.builder().name(name("Test Catalog "))
               .description("created by testAddCatalog()").build();
      removeCatalog = catalogApi.addCatalogToOrg(removeCatalog, org.getId());
      catalogApi.remove(removeCatalog.getId());

      removeCatalog = catalogApi.get(removeCatalog.getId());
      assertNull(removeCatalog, String.format(OBJ_DEL, CATALOG, removeCatalog != null ? removeCatalog.toString() : ""));
   }
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.