Package com.cloud.api.response

Examples of com.cloud.api.response.BigSwitchVnsDeviceResponse


            ListResponse<BigSwitchVnsDeviceResponse> response = new ListResponse<BigSwitchVnsDeviceResponse>();
            List<BigSwitchVnsDeviceResponse> bigswitchDevicesResponse = new ArrayList<BigSwitchVnsDeviceResponse>();

            if (bigswitchDevices != null && !bigswitchDevices.isEmpty()) {
                for (BigSwitchVnsDeviceVO bigswitchDeviceVO : bigswitchDevices) {
      BigSwitchVnsDeviceResponse bigswitchDeviceResponse =
        _bigswitchVnsElementService.createBigSwitchVnsDeviceResponse(bigswitchDeviceVO);
                    bigswitchDevicesResponse.add(bigswitchDeviceResponse);
                }
            }
View Full Code Here


    @Override
    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
        try {
            BigSwitchVnsDeviceVO bigswitchVnsDeviceVO = _bigswitchVnsElementService.addBigSwitchVnsDevice(this);
            if (bigswitchVnsDeviceVO != null) {
                BigSwitchVnsDeviceResponse response = _bigswitchVnsElementService.createBigSwitchVnsDeviceResponse(bigswitchVnsDeviceVO);
                response.setObjectName("bigswitchvnsdevice");
                response.setResponseName(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add BigSwitch VNS device due to internal error.");
            }
        }  catch (InvalidParameterValueException invalidParamExcp) {
View Full Code Here

    public BigSwitchVnsDeviceResponse createBigSwitchVnsDeviceResponse(
            BigSwitchVnsDeviceVO bigswitchVnsDeviceVO) {
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDeviceVO.getHostId());
        _hostDao.loadDetails(bigswitchVnsHost);

        BigSwitchVnsDeviceResponse response = new BigSwitchVnsDeviceResponse();
        response.setDeviceName(bigswitchVnsDeviceVO.getDeviceName());
        PhysicalNetwork pnw = ApiDBUtils.findPhysicalNetworkById(bigswitchVnsDeviceVO.getPhysicalNetworkId());
        if (pnw != null) {
            response.setPhysicalNetworkId(pnw.getUuid());
        }
    response.setId(bigswitchVnsDeviceVO.getUuid());
        response.setProviderName(bigswitchVnsDeviceVO.getProviderName());
        response.setHostName(bigswitchVnsHost.getDetail("ip"));
        response.setObjectName("bigswitchvnsdevice");
        return response;
    }
View Full Code Here

            ListResponse<BigSwitchVnsDeviceResponse> response = new ListResponse<BigSwitchVnsDeviceResponse>();
            List<BigSwitchVnsDeviceResponse> bigswitchDevicesResponse = new ArrayList<BigSwitchVnsDeviceResponse>();

            if (bigswitchDevices != null && !bigswitchDevices.isEmpty()) {
                for (BigSwitchVnsDeviceVO bigswitchDeviceVO : bigswitchDevices) {
                    BigSwitchVnsDeviceResponse bigswitchDeviceResponse = _bigswitchVnsElementService.createBigSwitchVnsDeviceResponse(bigswitchDeviceVO);
                    bigswitchDevicesResponse.add(bigswitchDeviceResponse);
                }
            }

            response.setResponses(bigswitchDevicesResponse);
View Full Code Here

    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
        ResourceAllocationException {
        try {
            BigSwitchVnsDeviceVO bigswitchVnsDeviceVO = _bigswitchVnsElementService.addBigSwitchVnsDevice(this);
            if (bigswitchVnsDeviceVO != null) {
                BigSwitchVnsDeviceResponse response = _bigswitchVnsElementService.createBigSwitchVnsDeviceResponse(bigswitchVnsDeviceVO);
                response.setObjectName("bigswitchvnsdevice");
                response.setResponseName(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add BigSwitch VNS device due to internal error.");
            }
        } catch (InvalidParameterValueException invalidParamExcp) {
View Full Code Here

    @Override
    public BigSwitchVnsDeviceResponse createBigSwitchVnsDeviceResponse(BigSwitchVnsDeviceVO bigswitchVnsDeviceVO) {
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDeviceVO.getHostId());
        _hostDao.loadDetails(bigswitchVnsHost);

        BigSwitchVnsDeviceResponse response = new BigSwitchVnsDeviceResponse();
        response.setDeviceName(bigswitchVnsDeviceVO.getDeviceName());
        PhysicalNetwork pnw = ApiDBUtils.findPhysicalNetworkById(bigswitchVnsDeviceVO.getPhysicalNetworkId());
        if (pnw != null) {
            response.setPhysicalNetworkId(pnw.getUuid());
        }
        response.setId(bigswitchVnsDeviceVO.getUuid());
        response.setProviderName(bigswitchVnsDeviceVO.getProviderName());
        response.setHostName(bigswitchVnsHost.getDetail("ip"));
        response.setObjectName("bigswitchvnsdevice");
        return response;
    }
View Full Code Here

    @Override
    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
        try {
            BigSwitchVnsDeviceVO bigswitchVnsDeviceVO = _bigswitchVnsElementService.addBigSwitchVnsDevice(this);
            if (bigswitchVnsDeviceVO != null) {
                BigSwitchVnsDeviceResponse response = _bigswitchVnsElementService.createBigSwitchVnsDeviceResponse(bigswitchVnsDeviceVO);
                response.setObjectName("bigswitchvnsdevice");
                response.setResponseName(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add BigSwitch VNS device due to internal error.");
            }
        }  catch (InvalidParameterValueException invalidParamExcp) {
View Full Code Here

    public BigSwitchVnsDeviceResponse createBigSwitchVnsDeviceResponse(
            BigSwitchVnsDeviceVO bigswitchVnsDeviceVO) {
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDeviceVO.getHostId());
        _hostDao.loadDetails(bigswitchVnsHost);

        BigSwitchVnsDeviceResponse response = new BigSwitchVnsDeviceResponse();
        response.setDeviceName(bigswitchVnsDeviceVO.getDeviceName());
        PhysicalNetwork pnw = ApiDBUtils.findPhysicalNetworkById(bigswitchVnsDeviceVO.getPhysicalNetworkId());
        if (pnw != null) {
            response.setPhysicalNetworkId(pnw.getUuid());
        }
        response.setId(bigswitchVnsDeviceVO.getUuid());
        response.setProviderName(bigswitchVnsDeviceVO.getProviderName());
        response.setHostName(bigswitchVnsHost.getDetail("ip"));
        response.setObjectName("bigswitchvnsdevice");
        return response;
    }
View Full Code Here

            ListResponse<BigSwitchVnsDeviceResponse> response = new ListResponse<BigSwitchVnsDeviceResponse>();
            List<BigSwitchVnsDeviceResponse> bigswitchDevicesResponse = new ArrayList<BigSwitchVnsDeviceResponse>();

            if (bigswitchDevices != null && !bigswitchDevices.isEmpty()) {
                for (BigSwitchVnsDeviceVO bigswitchDeviceVO : bigswitchDevices) {
      BigSwitchVnsDeviceResponse bigswitchDeviceResponse =
        _bigswitchVnsElementService.createBigSwitchVnsDeviceResponse(bigswitchDeviceVO);
                    bigswitchDevicesResponse.add(bigswitchDeviceResponse);
                }
            }
View Full Code Here

    public BigSwitchVnsDeviceResponse createBigSwitchVnsDeviceResponse(
            BigSwitchVnsDeviceVO bigswitchVnsDeviceVO) {
        HostVO bigswitchVnsHost = _hostDao.findById(bigswitchVnsDeviceVO.getHostId());
        _hostDao.loadDetails(bigswitchVnsHost);

        BigSwitchVnsDeviceResponse response = new BigSwitchVnsDeviceResponse();
        response.setDeviceName(bigswitchVnsDeviceVO.getDeviceName());
        PhysicalNetwork pnw = ApiDBUtils.findPhysicalNetworkById(bigswitchVnsDeviceVO.getPhysicalNetworkId());
        if (pnw != null) {
            response.setPhysicalNetworkId(pnw.getUuid());
        }
    response.setId(bigswitchVnsDeviceVO.getUuid());
        response.setProviderName(bigswitchVnsDeviceVO.getProviderName());
        response.setHostName(bigswitchVnsHost.getDetail("ip"));
        response.setObjectName("bigswitchvnsdevice");
        return response;
    }
View Full Code Here

TOP

Related Classes of com.cloud.api.response.BigSwitchVnsDeviceResponse

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.