Package com.cloud.uservm

Examples of com.cloud.uservm.UserVm


        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        UserVm userVM = _userVmService.getUserVm(vmId);
        return userVM.getAccountId();
    }
View Full Code Here


        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        UserVm userVm = _entityMgr.findById(UserVm.class, getVirtualMachineId());
        if (userVm != null) {
            return userVm.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }
View Full Code Here

        if (getHostId() != null && getStoragePoolId() != null) {
            throw new InvalidParameterValueException("only one of hostId and storageId can be specified");
        }

        UserVm userVm = _userVmService.getUserVm(getVirtualMachineId());
        if (userVm == null) {
            throw new InvalidParameterValueException("Unable to find the VM by id=" + getVirtualMachineId());
        }

        Host destinationHost = null;
View Full Code Here

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        UserVm userVm = _entityMgr.findById(UserVm.class, getVirtualMachineId());
        if (userVm != null) {
            return userVm.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM;
    }
View Full Code Here

        return  "Attempting to migrate VM Id: " + getVirtualMachineId() + " to host Id: "+ getHostId();
    }

    @Override
    public void execute(){
        UserVm userVm = _userVmService.getUserVm(getVirtualMachineId());
        if (userVm == null) {
            throw new InvalidParameterValueException("Unable to find the VM by id=" + getVirtualMachineId());
        }

        Host destinationHost = _resourceService.getHost(getHostId());
View Full Code Here

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        UserVm userVm = _entityMgr.findById(UserVm.class, getId());
        if (userVm != null) {
            return userVm.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }
View Full Code Here

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }

    @Override
    public void execute() throws ResourceAllocationException{
        UserVm result = _userVmService.recoverVirtualMachine(this);
        if (result != null){
            UserVmResponse recoverVmResponse = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0);
            recoverVmResponse.setResponseName(getCommandName());
            this.setResponseObject(recoverVmResponse);
        } else {
View Full Code Here

    }

    @Override
    public void execute(){
        try {
           UserVm userVm = _userVmService.moveVMToUser(this);
           if (userVm == null){
               throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to move vm");
           }
           UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", userVm).get(0);
           response.setResponseName(DeployVMCmd.getResultObjectName());
View Full Code Here

    }

    @Override
    public long getEntityOwnerId() {
        UserVm vm = _responseGenerator.findUserVmById(getVmId());
        if (vm != null) {
            return vm.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }
View Full Code Here

    @Override
    public void execute() throws  ResourceUnavailableException, InsufficientCapacityException, ResourceAllocationException, ConcurrentOperationException {
        UserContext.current().setEventDetails(
                "vmsnapshot id: " + getVmSnapShotId());
        UserVm result = _vmSnapshotService.revertToSnapshot(getVmSnapShotId());
        if (result != null) {
            UserVmResponse response = _responseGenerator.createUserVmResponse(
                    "virtualmachine", result).get(0);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
View Full Code Here

TOP

Related Classes of com.cloud.uservm.UserVm

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.