Examples of VMSnapshot


Examples of com.cloud.vm.snapshot.VMSnapshot

    public static boolean canUseForDeploy(Network network) {
        return s_networkModel.canUseForDeploy(network);
    }

    public static VMSnapshot getVMSnapshotById(Long vmSnapshotId) {
        VMSnapshot vmSnapshot = s_vmSnapshotDao.findById(vmSnapshotId);
        return vmSnapshot;
    }
View Full Code Here

Examples of com.cloud.vm.snapshot.VMSnapshot

        assertNotNull(e);
        CreateVMSnapshotAnswer answer = Mockito.mock(CreateVMSnapshotAnswer.class);
        Mockito.when(answer.getResult()).thenReturn(true);
        Mockito.when(agentMgr.send(Matchers.anyLong(), Matchers.any(Command.class))).thenReturn(answer);
        Mockito.when(vmSnapshotDao.findById(Matchers.anyLong())).thenReturn(vmSnapshot);
        VMSnapshot snapshot = null;
        snapshot = vmSnapshotStrategy.takeVMSnapshot(vmSnapshot);
        assertNotNull(snapshot);
    }
View Full Code Here

Examples of com.cloud.vm.snapshot.VMSnapshot

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        VMSnapshot vmSnapshot = _entityMgr.findById(VMSnapshot.class, getVmSnapShotId());
        if (vmSnapshot != null) {
            return vmSnapshot.getAccountId();
        }
        return Account.ACCOUNT_ID_SYSTEM;
    }
View Full Code Here

Examples of com.cloud.vm.snapshot.VMSnapshot

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        VMSnapshot vmSnapshot = _entityMgr.findById(VMSnapshot.class, getId());
        if (vmSnapshot != null) {
            return vmSnapshot.getAccountId();
        }
        return Account.ACCOUNT_ID_SYSTEM;
    }
View Full Code Here

Examples of com.cloud.vm.snapshot.VMSnapshot

        return vmId;
    }

    @Override
    public void create() throws ResourceAllocationException {
        VMSnapshot vmsnapshot = _vmSnapshotService.allocVMSnapshot(getVmId(),getDisplayName(),getDescription(),snapshotMemory());
        if (vmsnapshot != null) {
            this.setEntityId(vmsnapshot.getId());
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,
                    "Failed to create vm snapshot");
        }
    }
View Full Code Here

Examples of com.cloud.vm.snapshot.VMSnapshot

    }

    @Override
    public void execute() {
        CallContext.current().setEventDetails("VM Id: " + getVmId());
        VMSnapshot result = _vmSnapshotService.creatVMSnapshot(getVmId(),getEntityId(), getQuiescevm());
        if (result != null) {
            VMSnapshotResponse response = _responseGenerator
                    .createVMSnapshotResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
View Full Code Here

Examples of com.cloud.vm.snapshot.VMSnapshot

        assertNotNull(e);
        CreateVMSnapshotAnswer answer = Mockito.mock(CreateVMSnapshotAnswer.class);
        Mockito.when(answer.getResult()).thenReturn(true);
        Mockito.when(agentMgr.send(Mockito.anyLong(), Mockito.any(Command.class))).thenReturn(answer);
        Mockito.when(vmSnapshotDao.findById(Mockito.anyLong())).thenReturn(vmSnapshot);
        VMSnapshot snapshot = null;
        snapshot = vmSnapshotStrategy.takeVMSnapshot(vmSnapshot);
        assertNotNull(snapshot);
    }
View Full Code Here

Examples of com.cloud.vm.snapshot.VMSnapshot

    public static boolean canUseForDeploy(Network network) {
        return _networkModel.canUseForDeploy(network);
    }

    public static VMSnapshot getVMSnapshotById(Long vmSnapshotId) {
        VMSnapshot vmSnapshot = _vmSnapshotDao.findById(vmSnapshotId);
        return vmSnapshot;
    }
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.