Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.CIMOperatingSystem$Builder


public class VMAsyncApiTest extends BaseVPDCAsyncApiTest<VMAsyncApi> {

   public void testAddVMIntoVDCURI() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "addVMIntoVDC", URI.class, VMSpec.class);

      CIMOperatingSystem os = Iterables.find(injector.getInstance(Key.get(new TypeLiteral<Set<CIMOperatingSystem>>() {
      })), new Predicate<CIMOperatingSystem>() {

         @Override
         public boolean apply(CIMOperatingSystem arg0) {
            return arg0.getOsType() == OSType.RHEL_64;
View Full Code Here


   }

   public void testAddVMIntoVDC() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "addVMIntoVDC", String.class, String.class, VMSpec.class);

      CIMOperatingSystem os = Iterables.find(injector.getInstance(Key.get(new TypeLiteral<Set<CIMOperatingSystem>>() {
      })), new Predicate<CIMOperatingSystem>() {

         @Override
         public boolean apply(CIMOperatingSystem arg0) {
            return arg0.getOsType() == OSType.RHEL_64;
View Full Code Here

   }
  
   public void testAddMultipleVMsIntoVDCURI() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "addMultipleVMsIntoVDC", URI.class, Iterable.class);

      CIMOperatingSystem os = Iterables.find(injector.getInstance(Key.get(new TypeLiteral<Set<CIMOperatingSystem>>() {
      })), new Predicate<CIMOperatingSystem>() {

         @Override
         public boolean apply(CIMOperatingSystem arg0) {
            return arg0.getOsType() == OSType.RHEL_64;
View Full Code Here

   }

   public void testAddMultipleVMsIntoVDC() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "addMultipleVMsIntoVDC", String.class, String.class, Iterable.class);

      CIMOperatingSystem os = Iterables.find(injector.getInstance(Key.get(new TypeLiteral<Set<CIMOperatingSystem>>() {
      })), new Predicate<CIMOperatingSystem>() {

         @Override
         public boolean apply(CIMOperatingSystem arg0) {
            return arg0.getOsType() == OSType.RHEL_64;
View Full Code Here

*/
@Test(groups = "unit")
public class BindVMSpecsToXmlPayloadTest {

   public void test() throws IOException {
      CIMOperatingSystem os = Iterables.find(new Gson().<Set<CIMOperatingSystem>> fromJson(Strings2
               .toStringAndClose(getClass()
                        .getResourceAsStream("/savvis-symphonyvpdc/predefined_operatingsystems.json")),
               new TypeLiteral<Set<CIMOperatingSystem>>() {
               }.getType()), new Predicate<CIMOperatingSystem>() {

View Full Code Here

* @author danikov
*/
public class VCloudDirectorComputeUtils {
  
   public static OperatingSystem toComputeOs(VApp vApp, OperatingSystem defaultOs) {
      CIMOperatingSystem cimOs = toComputeOs(vApp);
      return cimOs != null ? cimOs : defaultOs;
   }
View Full Code Here

   public static CIMOperatingSystem toComputeOs(Vm vm) {
      return toComputeOs(findOperatingSystemSectionForVApp.apply(vm));
   }
  
   public static CIMOperatingSystem toComputeOs(OperatingSystemSection os) {
      return new CIMOperatingSystem(OSType.fromValue(os.getId()), "", null, os.getDescription());
   }
View Full Code Here

      builder.name(from.getName());
      builder.hostname(from.getName());
      Location vdcLocation = findLocationForResourceInVDC.apply(from.getVDC());
      builder.location(vdcLocation);
      if (from.getOsType() != null && OSType.fromValue(from.getOsType()) != OSType.UNRECOGNIZED) {
         builder.operatingSystem(new CIMOperatingSystem(OSType.fromValue(from.getOsType()), "", null, from
                  .getOperatingSystemDescription()));
      } else if (from.getOperatingSystemDescription() != null) {
         OperatingSystem.Builder osBuilder = new OperatingSystem.Builder();
         if (from.getOsType() != null)
            osBuilder.name(from.getOsType() + "");
View Full Code Here

import com.google.inject.Inject;

public class VCloudDirectorComputeUtils {
  
   public static OperatingSystem toComputeOs(VApp vApp, OperatingSystem defaultOs) {
      CIMOperatingSystem cimOs = toComputeOs(vApp);
      return cimOs != null ? cimOs : defaultOs;
   }
View Full Code Here

   public static CIMOperatingSystem toComputeOs(Vm vm) {
      return toComputeOs(findOperatingSystemSectionForVApp.apply(vm));
   }
  
   public static CIMOperatingSystem toComputeOs(OperatingSystemSection os) {
      return new CIMOperatingSystem(OSType.fromValue(os.getId()), "", null, os.getDescription());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.compute.domain.CIMOperatingSystem$Builder

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.