Examples of UnregisterMachineIfExistsAndDeleteItsMedia


Examples of org.jclouds.virtualbox.functions.admin.UnregisterMachineIfExistsAndDeleteItsMedia

   @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;
      }
View Full Code Here

Examples of org.jclouds.virtualbox.functions.admin.UnregisterMachineIfExistsAndDeleteItsMedia

         int attempts = 0;
         while (attempts < 10 && !vm.getSessionState().equals(SessionState.Unlocked)) {
            attempts++;
            Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
         }
         machineUtils.applyForMachine(vmNameOrId, new UnregisterMachineIfExistsAndDeleteItsMedia(vmSpec));

      } catch (VBoxException e) {
         if (e.getMessage().contains("Could not find a registered machine named"))
            return;
      }
View Full Code Here

Examples of org.jclouds.virtualbox.functions.admin.UnregisterMachineIfExistsAndDeleteItsMedia

         int attempts = 0;
         while (attempts < 10 && !vm.getSessionState().equals(SessionState.Unlocked)) {
            attempts++;
            Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
         }
         machineUtils.applyForMachine(vmNameOrId, new UnregisterMachineIfExistsAndDeleteItsMedia(vmSpec));

      } catch (VBoxException e) {
         if (e.getMessage().contains("Could not find a registered machine named"))
            return;
      }
View Full Code Here

Examples of org.jclouds.virtualbox.functions.admin.UnregisterMachineIfExistsAndDeleteItsMedia

   @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;
      }
View Full Code Here

Examples of org.jclouds.virtualbox.functions.admin.UnregisterMachineIfExistsAndDeleteItsMedia

         int attempts = 0;
         while (attempts < 10 && !vm.getSessionState().equals(SessionState.Unlocked)) {
            attempts++;
            Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
         }
         machineUtils.applyForMachine(vmNameOrId, new UnregisterMachineIfExistsAndDeleteItsMedia(vmSpec));

      } catch (VBoxException e) {
         if (e.getMessage().contains("Could not find a registered machine named"))
            return;
      }
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.