Package org.jclouds.virtualbox.functions

Examples of org.jclouds.virtualbox.functions.IMachineToVmSpec


   @Override
   public boolean deleteImage(String id) {
      try {
         IMachine machine = manager.get().getVBox().findMachine(VIRTUALBOX_IMAGE_PREFIX + id);
         machineUtils.applyForMachine(machine.getId(), new UnregisterMachineIfExistsAndDeleteItsMedia(
                  new IMachineToVmSpec().apply(machine)));
      } catch (Exception e) {
         logger.error(e, "Could not delete machine with id %s ", id);
         return false;
      }
      return true;
View Full Code Here


   protected void undoVm(String vmNameOrId) {
      IMachine vm = null;
      try {
         vm = manager.get().getVBox().findMachine(vmNameOrId);
         VmSpec vmSpec = new IMachineToVmSpec().apply(vm);
         int attempts = 0;
         while (attempts < 10 && !vm.getSessionState().equals(SessionState.Unlocked)) {
            attempts++;
            Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
         }
View Full Code Here

   protected void undoVm(String vmNameOrId) {
      IMachine vm = null;
      try {
         vm = manager.get().getVBox().findMachine(vmNameOrId);
         VmSpec vmSpec = new IMachineToVmSpec().apply(vm);
         int attempts = 0;
         while (attempts < 10 && !vm.getSessionState().equals(SessionState.Unlocked)) {
            attempts++;
            Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
         }
View Full Code Here

   @Override
   public boolean deleteImage(String id) {
      try {
         IMachine machine = manager.get().getVBox().findMachine(VIRTUALBOX_IMAGE_PREFIX + id);
         machineUtils.applyForMachine(machine.getId(), new UnregisterMachineIfExistsAndDeleteItsMedia(
                  new IMachineToVmSpec().apply(machine)));
      } catch (Exception e) {
         logger.error(e, "Could not delete machine with id %s ", id);
         return false;
      }
      return true;
View Full Code Here

   protected void undoVm(String vmNameOrId) {
      IMachine vm = null;
      try {
         vm = manager.get().getVBox().findMachine(vmNameOrId);
         VmSpec vmSpec = new IMachineToVmSpec().apply(vm);
         int attempts = 0;
         while (attempts < 10 && !vm.getSessionState().equals(SessionState.Unlocked)) {
            attempts++;
            Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
         }
View Full Code Here

TOP

Related Classes of org.jclouds.virtualbox.functions.IMachineToVmSpec

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.