Examples of GuestOSHypervisor


Examples of com.cloud.storage.GuestOSHypervisor

        return Account.ACCOUNT_ID_SYSTEM;
    }

    @Override
    public void create() {
        GuestOSHypervisor guestOsMapping = _mgr.addGuestOsMapping(this);
        if (guestOsMapping != null) {
            setEntityId(guestOsMapping.getId());
            setEntityUuid(guestOsMapping.getUuid());
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add guest OS mapping entity");
        }
    }
View Full Code Here

Examples of com.cloud.storage.GuestOSHypervisor

        }
    }

    @Override
    public void execute() {
        GuestOSHypervisor guestOsMapping = _mgr.getAddedGuestOsMapping(getEntityId());
        if (guestOsMapping != null) {
            GuestOsMappingResponse response = _responseGenerator.createGuestOSMappingResponse(guestOsMapping);
            response.setResponseName(getCommandName());
            setResponseObject(response);
        } else {
View Full Code Here

Examples of com.cloud.storage.GuestOSHypervisor

        return osNameForHypervisor;
    }

    @Override
    public void execute() {
        GuestOSHypervisor guestOsMapping = _mgr.updateGuestOsMapping(this);
        if (guestOsMapping != null) {
            GuestOsMappingResponse response = _responseGenerator.createGuestOSMappingResponse(guestOsMapping);
            response.setResponseName(getCommandName());
            setResponseObject(response);
        }
View Full Code Here

Examples of com.cloud.storage.GuestOSHypervisor

    public GuestOSHypervisor updateGuestOsMapping(UpdateGuestOsMappingCmd cmd) {
        Long id = cmd.getId();
        String osNameForHypervisor = cmd.getOsNameForHypervisor();

        //check if mapping exists
        GuestOSHypervisor guestOsHypervisorHandle = _guestOSHypervisorDao.findById(id);
        if (guestOsHypervisorHandle == null) {
            throw new InvalidParameterValueException("Guest OS Mapping not found. Please specify a valid ID for the Guest OS Mapping");
        }

        if (!guestOsHypervisorHandle.getIsUserDefined()) {
            throw new InvalidParameterValueException("Unable to modify system defined Guest OS mapping");
        }

        GuestOSHypervisorVO guestOsHypervisor = _guestOSHypervisorDao.createForUpdate(id);
        guestOsHypervisor.setGuestOsName(osNameForHypervisor);
View Full Code Here

Examples of com.cloud.storage.GuestOSHypervisor

    @ActionEvent(eventType = EventTypes.EVENT_GUEST_OS_MAPPING_REMOVE, eventDescription = "removing guest OS mapping", async = true)
    public boolean removeGuestOsMapping(RemoveGuestOsMappingCmd cmd) {
        Long id = cmd.getId();

        //check if mapping exists
        GuestOSHypervisor guestOsHypervisorHandle = _guestOSHypervisorDao.findById(id);
        if (guestOsHypervisorHandle == null) {
            throw new InvalidParameterValueException("Guest OS Mapping not found. Please specify a valid ID for the Guest OS Mapping");
        }

        if (!guestOsHypervisorHandle.getIsUserDefined()) {
            throw new InvalidParameterValueException("Unable to remove system defined Guest OS mapping");
        }

        return _guestOSHypervisorDao.removeGuestOsMapping(id);
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.