Examples of OperatingSystemSection


Examples of org.jclouds.ovf.OperatingSystemSection

public class OperatingSystemSectionHandlerTest {
   public void test() {
      InputStream is = getClass().getResourceAsStream("/operatingsystemsection.xml");
      Injector injector = Guice.createInjector(new SaxParserModule());
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      OperatingSystemSection result = factory.create(injector.getInstance(OperatingSystemSectionHandler.class)).parse(
               is);
      assertEquals(result.toString(), OperatingSystemSection.builder().info("Specifies the operating system installed")
               .description("Microsoft Windows Server 2008").id(76).build().toString()

      );
   }
View Full Code Here

Examples of org.jclouds.ovf.OperatingSystemSection

public class OperatingSystemSectionHandlerTest {
   public void test() {
      InputStream is = getClass().getResourceAsStream("/operatingsystemsection.xml");
      Injector injector = Guice.createInjector(new SaxParserModule());
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      OperatingSystemSection result = factory.create(injector.getInstance(OperatingSystemSectionHandler.class)).parse(
               is);
      assertEquals(result.toString(), OperatingSystemSection.builder().info("Specifies the operating system installed")
               .description("Microsoft Windows Server 2008").id(76).build().toString()

      );
   }
View Full Code Here

Examples of org.jclouds.ovf.OperatingSystemSection

public class OperatingSystemSectionHandlerTest {
   public void test() {
      InputStream is = getClass().getResourceAsStream("/operatingsystemsection.xml");
      Injector injector = Guice.createInjector(new SaxParserModule());
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      OperatingSystemSection result = factory.create(injector.getInstance(OperatingSystemSectionHandler.class)).parse(
               is);
      assertEquals(result.toString(), OperatingSystemSection.builder().info("Specifies the operating system installed")
               .description("Microsoft Windows Server 2008").id(76).build().toString()

      );
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection

      return section;
   }

   public static OperatingSystemSection getOperatingSystemSection() {
      OperatingSystemSection section = OperatingSystemSection.builder()
            .build();

      return section;
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection

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

    OperatingSystemSection expected = getOperatingSystemSection();

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

Examples of org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection

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

      OperatingSystemSection section = getOperatingSystemSection().toBuilder()
          .build();

    Task expected = editOperatingSystemSectionTask();

    assertEquals(api.getVmApi().editOperatingSystemSection(vmURI, section), expected);
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection

      return section;
   }

   public static OperatingSystemSection getOperatingSystemSection() {
      OperatingSystemSection section = OperatingSystemSection.builder()
            .build();

      return section;
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection

  }

   @Test(description = "GET /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetVm" })
   public void testGetOperatingSystemSection() {
      // The method under test
      OperatingSystemSection section = vmApi.getOperatingSystemSection(vmUrn);

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

Examples of org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection

   @Test(description = "PUT /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetOperatingSystemSection",
            "testEditVirtualHardwareSection" })
   public void testEditOperatingSystemSection() {
      // Create new OperatingSystemSection
      OperatingSystemSection newSection = OperatingSystemSection.builder().info("") // NOTE Required
                                                                                    // OVF field,
                                                                                    // ignored
               .id(OSType.RHEL_64.getCode()).osType("rhel5_64Guest").build();

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

      // Retrieve the modified section
      OperatingSystemSection modified = vmApi.getOperatingSystemSection(vmUrn);

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

      // Check the modified section fields are set correctly
      assertEquals(modified.getId(), newSection.getId());
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection

      return section;
   }

   public static OperatingSystemSection getOperatingSystemSection() {
      OperatingSystemSection section = OperatingSystemSection.builder()
            .build();

      return section;
   }
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.