Package com.abiquo.server.core.cloud

Examples of com.abiquo.server.core.cloud.VirtualMachineWithNodeExtendedDto


    * @param id
    *           The id of the virtual machine.
    * @return The requested virtual machine.
    */
   public VirtualMachine getVirtualMachine(final Integer id) {
      VirtualMachineWithNodeExtendedDto vm = context.getApi().getCloudApi().getVirtualMachine(target, id);
      return wrap(context, VirtualMachine.class, vm);
   }
View Full Code Here


         this.virtualAppliance = virtualAppliance;
         return this;
      }

      public VirtualMachine build() {
         VirtualMachineWithNodeExtendedDto dto = new VirtualMachineWithNodeExtendedDto();
         dto.setNodeName(checkNotNull(nameLabel, ValidationErrors.MISSING_REQUIRED_FIELD + "nameLabel"));
         dto.setDescription(description);
         dto.setHdInBytes(template.getHdRequired());
         dto.setVdrpIP(vncAddress);

         if (cpu != null) {
            dto.setCpu(cpu);
         }

         if (ram != null) {
            dto.setRam(ram);
         }

         if (vncPort != null) {
            dto.setVdrpPort(vncPort);
         }

         if (idState != null) {
            dto.setIdState(idState);
         }

         if (idType != null) {
            dto.setIdType(idType);
         }

         if (internalName != null) {
            dto.setName(internalName);
         }

         dto.setPassword(password);
         dto.setKeymap(keymap);
         dto.setUuid(uuid);

         // DVD
         if (dvd) {
            DvdManagementDto dvd = new DvdManagementDto();
            RESTLink link = new RESTLink("image", "");
            dvd.addLink(link);
            dto.setDvd(dvd);
         }

         VirtualMachine virtualMachine = new VirtualMachine(context, dto);
         virtualMachine.virtualAppliance = virtualAppliance;
         virtualMachine.template = template;
View Full Code Here

            .listVirtualMachinesByMachine(target, options);
      return wrap(context, VirtualMachine.class, vms.getCollection());
   }

   public VirtualMachine getVirtualMachine(final Integer virtualMachineId) {
      VirtualMachineWithNodeExtendedDto vm = context.getApi().getInfrastructureApi()
            .getVirtualMachine(target, virtualMachineId);
      return wrap(context, VirtualMachine.class, vm);
   }
View Full Code Here

   private Hardware hardware;

   @BeforeMethod
   public void setup() {
      vm = new VirtualMachineWithNodeExtendedDto();
      vm.setNodeName("VM");
      vm.setName("Internal name");
      vm.setId(5);
      vm.setVdrpPort(22);
      vm.setRam(2048);
View Full Code Here

   private static class MockVirtualMachine extends VirtualMachine {
      private VirtualMachineState state;

      @SuppressWarnings("unchecked")
      public MockVirtualMachine() {
         super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
      }
View Full Code Here

   private static class MockVirtualMachine extends VirtualMachine {
      private VirtualMachineState state;

      @SuppressWarnings("unchecked")
      public MockVirtualMachine() {
         super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
      }
View Full Code Here

   private static class MockVirtualMachine extends VirtualMachine {
      private VirtualMachineState state;

      @SuppressWarnings("unchecked")
      public MockVirtualMachine() {
         super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
      }
View Full Code Here

   private static class MockVirtualMachine extends VirtualMachine {
      private VirtualMachineState state;

      @SuppressWarnings("unchecked")
      public MockVirtualMachine() {
         super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
      }
View Full Code Here

   private static class MockVirtualMachine extends VirtualMachine {
      private VirtualMachineState state;

      @SuppressWarnings("unchecked")
      public MockVirtualMachine() {
         super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
      }
View Full Code Here

   private static class MockVirtualMachine extends VirtualMachine {
      private VirtualMachineState state;

      @SuppressWarnings("unchecked")
      public MockVirtualMachine() {
         super(EasyMock.createMock(ApiContext.class), new VirtualMachineWithNodeExtendedDto());
      }
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.cloud.VirtualMachineWithNodeExtendedDto

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.