Examples of ProductSectionList


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

   }

   @Test(groups = { "live", "user" }, description = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVApp" })
   public void testGetProductSections() {
      // The method under test
      ProductSectionList sectionList = vAppApi.getProductSections(vAppUrn);

      // Check the retrieved object is well formed
      checkProductSectionList(sectionList);
   }
View Full Code Here

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

   }

   @Test(groups = { "live", "user" }, description = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" })
   public void testEditProductSections() {
      // Copy existing section and edit fields
      ProductSectionList oldSections = vAppApi.getProductSections(vAppUrn);
      ProductSectionList newSections = oldSections
               .toBuilder()
               .productSection(
                        ProductSection.builder().info("Information about the installed software")
                                 // Default ovf:Info text
                                 .required().product(MsgType.builder().value("jclouds").build())
                                 .vendor(MsgType.builder().value("jclouds Inc.").build())
                                 // NOTE other ProductSection elements not returned by vCloud
                                 .build()).build();

      // The method under test
      Task editProductSections = vAppApi.editProductSections(vAppUrn, newSections);
      assertTrue(retryTaskSuccess.apply(editProductSections),
               String.format(TASK_COMPLETE_TIMELY, "editProductSections"));

      // Retrieve the modified section
      ProductSectionList modified = vAppApi.getProductSections(vAppUrn);

      // Check the retrieved object is well formed
      checkProductSectionList(modified);

      // Check the modified object has an extra ProductSection
      assertEquals(modified.getProductSections().size(), oldSections.getProductSections().size() + 1);

      // Check the section was modified correctly
      assertEquals(modified, newSections);
   }
View Full Code Here

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

      checkCustomizationSection(customizationSection);
   }

   @Test(description = "GET /vAppTemplate/{id}/productSections")
   public void testGetProductSections() {
      ProductSectionList productSectionList = vAppTemplateApi.getProductSections(vAppTemplateUrn);

      checkProductSectionList(productSectionList);
   }
View Full Code Here

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

            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getProductSections.xml", VCloudDirectorMediaType.PRODUCT_SECTION_LIST)
            .httpResponseBuilder().build());

         ProductSectionList expected = getProductSections();

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

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

      return task;
   }

   public static ProductSectionList getProductSections() {
      ProductSectionList sectionItems = ProductSectionList.builder()
            .build();

      return sectionItems;
   }
View Full Code Here

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

            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getProductSections.xml", VCloudDirectorMediaType.PRODUCT_SECTION_LIST)
            .httpResponseBuilder().build());

         ProductSectionList expected = getProductSections();

         assertEquals(api.getVmApi().getProductSections(vmURI), expected);
   }
View Full Code Here

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

      return task;
   }

   public static ProductSectionList getProductSections() {
      ProductSectionList sectionItems = ProductSectionList.builder()
            .build();

      return sectionItems;
   }
View Full Code Here

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

   }

   @Test(description = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVm" })
   public void testGetProductSections() {
      // The method under test
      ProductSectionList sectionList = vmApi.getProductSections(vmUrn);

      // Check the retrieved object is well formed
      checkProductSectionList(sectionList);
   }
View Full Code Here

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

   @Test(description = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" })
   public void testEditProductSections() {
      powerOffVm(vmUrn);
      // Copy existing section and edit fields
      ProductSectionList oldSections = vmApi.getProductSections(vmUrn);
      ProductSectionList newSections = oldSections
               .toBuilder()
               .productSection(
                        ProductSection.builder().info("Information about the installed software")
                                 // Default ovf:Info text
                                 .required().product(MsgType.builder().value("jclouds").build())
                                 .vendor(MsgType.builder().value("jclouds Inc.").build())
                                 // NOTE other ProductSection elements not returned by vCloud
                                 .build()).build();

      // The method under test
      Task editProductSections = vmApi.editProductSections(vmUrn, newSections);
      assertTrue(retryTaskSuccess.apply(editProductSections),
               String.format(TASK_COMPLETE_TIMELY, "editProductSections"));

      // Retrieve the modified section
      ProductSectionList modified = vmApi.getProductSections(vmUrn);

      // Check the retrieved object is well formed
      checkProductSectionList(modified);

      // Check the modified object has an extra ProductSection
      assertEquals(modified.getProductSections().size(), oldSections.getProductSections().size() + 1);

      // Check the section was modified correctly
      assertEquals(modified, newSections);
   }
View Full Code Here

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

      return task;
   }

   public static ProductSectionList getProductSections() {
      ProductSectionList sectionItems = ProductSectionList.builder()
            .build();

      return sectionItems;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.