Examples of deleteVMSnapshot()


Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

        if (vmSnapshot.getState() == VMSnapshot.State.Allocated) {
            return _vmSnapshotDao.remove(vmSnapshot.getId());
        } else {
            try {
                VMSnapshotStrategy strategy = findVMSnapshotStrategy(vmSnapshot);
                return strategy.deleteVMSnapshot(vmSnapshot);
            } catch (Exception e) {
                s_logger.debug("Failed to delete vm snapshot: " + vmSnapshotId, e);
                return false;
            }
        }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

        for (VMSnapshotVO snapshot : listVmSnapshots) {
            VMSnapshotVO target = _vmSnapshotDao.findById(snapshot.getId());
            if (type != null && target.getType() != type)
                continue;
            VMSnapshotStrategy strategy = findVMSnapshotStrategy(target);
            if (!strategy.deleteVMSnapshot(target)) {
                result = false;
                break;
            }
        }
        return result;
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

            List<VMSnapshotVO> vmSnapshotsInExpungingStates = _vmSnapshotDao.listByInstanceId(vm.getId(), VMSnapshot.State.Expunging, VMSnapshot.State.Reverting, VMSnapshot.State.Creating);
            for (VMSnapshotVO vmSnapshotVO : vmSnapshotsInExpungingStates) {
                VMSnapshotStrategy strategy = findVMSnapshotStrategy(vmSnapshotVO);
                if(vmSnapshotVO.getState() == VMSnapshot.State.Expunging){
                    return strategy.deleteVMSnapshot(vmSnapshotVO);
                }else if(vmSnapshotVO.getState() == VMSnapshot.State.Creating){
                    return strategy.takeVMSnapshot(vmSnapshotVO) != null;
                }else if(vmSnapshotVO.getState() == VMSnapshot.State.Reverting){
                    return strategy.revertVMSnapshot(vmSnapshotVO);
                }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

        if (vmSnapshot.getState() == VMSnapshot.State.Allocated) {
            return _vmSnapshotDao.remove(vmSnapshot.getId());
        } else {
            try {
                VMSnapshotStrategy strategy = findVMSnapshotStrategy(vmSnapshot);
                return strategy.deleteVMSnapshot(vmSnapshot);
            } catch (Exception e) {
                s_logger.debug("Failed to delete vm snapshot: " + vmSnapshotId, e);
                return false;
            }
        }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

        for (VMSnapshotVO snapshot : listVmSnapshots) {
            VMSnapshotVO target = _vmSnapshotDao.findById(snapshot.getId());
            if (type != null && target.getType() != type)
                continue;
            VMSnapshotStrategy strategy = findVMSnapshotStrategy(target);
            if (!strategy.deleteVMSnapshot(target)) {
                result = false;
                break;
            }
        }
        return result;
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

            List<VMSnapshotVO> vmSnapshotsInExpungingStates = _vmSnapshotDao.listByInstanceId(vm.getId(), VMSnapshot.State.Expunging, VMSnapshot.State.Reverting, VMSnapshot.State.Creating);
            for (VMSnapshotVO vmSnapshotVO : vmSnapshotsInExpungingStates) {
                VMSnapshotStrategy strategy = findVMSnapshotStrategy(vmSnapshotVO);
                if (vmSnapshotVO.getState() == VMSnapshot.State.Expunging) {
                    return strategy.deleteVMSnapshot(vmSnapshotVO);
                } else if (vmSnapshotVO.getState() == VMSnapshot.State.Creating) {
                    return strategy.takeVMSnapshot(vmSnapshotVO) != null;
                } else if (vmSnapshotVO.getState() == VMSnapshot.State.Reverting) {
                    return strategy.revertVMSnapshot(vmSnapshotVO);
                }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

        if (vmSnapshot.getState() == VMSnapshot.State.Allocated) {
            return _vmSnapshotDao.remove(vmSnapshot.getId());
        } else {
            try {
                VMSnapshotStrategy strategy = findVMSnapshotStrategy(vmSnapshot);
                return strategy.deleteVMSnapshot(vmSnapshot);
            } catch (Exception e) {
                s_logger.debug("Failed to delete vm snapshot: " + vmSnapshotId, e);
                return false;
            }
        }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

        for (VMSnapshotVO snapshot : listVmSnapshots) {
            VMSnapshotVO target = _vmSnapshotDao.findById(snapshot.getId());
            if (type != null && target.getType() != type)
                continue;
            VMSnapshotStrategy strategy = findVMSnapshotStrategy(target);
            if (!strategy.deleteVMSnapshot(target)) {
                result = false;
                break;
            }
        }
        return result;
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotStrategy.deleteVMSnapshot()

            List<VMSnapshotVO> vmSnapshotsInExpungingStates = _vmSnapshotDao.listByInstanceId(vm.getId(), VMSnapshot.State.Expunging, VMSnapshot.State.Reverting, VMSnapshot.State.Creating);
            for (VMSnapshotVO vmSnapshotVO : vmSnapshotsInExpungingStates) {
                VMSnapshotStrategy strategy = findVMSnapshotStrategy(vmSnapshotVO);
                if(vmSnapshotVO.getState() == VMSnapshot.State.Expunging){
                    return strategy.deleteVMSnapshot(vmSnapshotVO);
                }else if(vmSnapshotVO.getState() == VMSnapshot.State.Creating){
                    return strategy.takeVMSnapshot(vmSnapshotVO) != null;
                }else if(vmSnapshotVO.getState() == VMSnapshot.State.Reverting){
                    return strategy.revertVMSnapshot(vmSnapshotVO);
                }
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.