Package org.jclouds.vcloud.director.v1_5.user

Examples of org.jclouds.vcloud.director.v1_5.user.VCloudDirectorApi


            .payload(payloadFromResourceWithContentType("/catalog/catalogMetadataValue.xml", METADATA_VALUE))
            .build();

   @Test
   public void testGetCatalogMetadataEntryHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, getMetadataValue, getMetadataValueResponse);
      assertEquals(api.getMetadataApi(catalogHref).get("KEY"), "VALUE");
   }
View Full Code Here


            .payload(payloadFromResourceWithContentType("/catalog/catalogItem.xml", CATALOG_ITEM))
            .build();
     
   @Test
   public void testGetCatalogItemHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, getItem, getItemResponse);
      assertEquals(api.getCatalogApi().getItem(itemHref), catalogItem());
   }
View Full Code Here

      assertEquals(api.getCatalogApi().getItem(itemHref), catalogItem());
   }
  
   @Test
   public void testGetCatalogItemUrn() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, resolveItem, resolveItemResponse, getItem, getItemResponse);
      assertEquals(api.getCatalogApi().getItem(itemUrn), catalogItem());
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/catalog/editCatalogItem.xml", CATALOG_ITEM + ";version=1.5"))
            .build();

   @Test
   public void testEditCatalogItemHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, editItem, editItemResponse);
      assertEquals(api.getCatalogApi().editItem(itemHref, catalogItem()), catalogItem());
   }
View Full Code Here

      assertEquals(api.getCatalogApi().editItem(itemHref, catalogItem()), catalogItem());
   }
  
   @Test
   public void testEditCatalogItemUrn() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, resolveItem, resolveItemResponse, editItem, editItemResponse);
      assertEquals(api.getCatalogApi().editItem(itemUrn, catalogItem()), catalogItem());
   }
View Full Code Here

            .statusCode(200)
            .build();
     
   @Test
   public void testRemoveCatalogItemHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, removeItem, removeItemResponse);
      api.getCatalogApi().removeItem(itemHref);
   }
View Full Code Here

      api.getCatalogApi().removeItem(itemHref);
   }

   @Test
   public void testRemoveCatalogItemUrn() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, resolveItem, resolveItemResponse, removeItem, removeItemResponse);
      api.getCatalogApi().removeItem(itemUrn);
   }
View Full Code Here

   public void before() {
   }

   @Test(enabled = false)//TODO
   public void testGetVapp() {
      VCloudDirectorApi api = orderedRequestsSendResponses(loginRequest, sessionResponse,
            new VcloudHttpRequestPrimer()
               .apiCommand("GET", vAppId)
               .acceptMedia(VCloudDirectorMediaType.VAPP)
               .httpRequestBuilder().build(),
            new VcloudHttpResponsePrimer()
               .xmlFilePayload("/vApp/vApp.xml", VCloudDirectorMediaType.VAPP)
               .httpResponseBuilder().build());

      VApp expected = getVApp();

      assertEquals(api.getVAppApi().get(vAppURI), expected);
   }
View Full Code Here

      assertEquals(api.getVAppApi().get(vAppURI), expected);
   }

   @Test(enabled = false)
   public void testEditVApp() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("PUT", vAppId)
            .xmlFilePayload("/vApp/editVApp.xml", VCloudDirectorMediaType.VAPP)
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/modifiedVapp.xml", VCloudDirectorMediaType.VAPP)
            .httpResponseBuilder().build());

    VApp modified = getVApp();
    modified.setName("new-name");
    modified.setDescription("New Description");

    Task expected = editVAppTask();

    assertEquals(api.getVAppApi().edit(vAppURI, modified), expected);
   }
View Full Code Here

    assertEquals(api.getVAppApi().edit(vAppURI, modified), expected);
   }

   @Test(enabled = false)
   public void testRemoveVApp() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse,
         new VcloudHttpRequestPrimer()
            .apiCommand("DELETE", vAppId)
            .acceptAnyMedia()
            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/removeVAppTask.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

    Task expected = removeVAppTask();

    assertEquals(api.getVAppApi().remove(vAppURI), expected);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.user.VCloudDirectorApi

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.