Package com.cloud.api.response

Examples of com.cloud.api.response.InstanceGroupResponse


    public void execute(){
        List<? extends InstanceGroup> groups = _mgr.searchForVmGroups(this);
        ListResponse<InstanceGroupResponse> response = new ListResponse<InstanceGroupResponse>();
        List<InstanceGroupResponse> responses = new ArrayList<InstanceGroupResponse>();
        for (InstanceGroup group : groups) {
            InstanceGroupResponse groupResponse = _responseGenerator.createInstanceGroupResponse(group);
            groupResponse.setObjectName("instancegroup");
            responses.add(groupResponse);
        }

        response.setResponses(responses);
        response.setResponseName(getCommandName());
View Full Code Here


    @Override
    public void execute() {
        InstanceGroup result = _userVmService.createVmGroup(this);
        if (result != null) {
            InstanceGroupResponse response = _responseGenerator.createInstanceGroupResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to create vm instance group");
        }
    }
View Full Code Here

        return volResponse;
    }

    @Override
    public InstanceGroupResponse createInstanceGroupResponse(InstanceGroup group) {
        InstanceGroupResponse groupResponse = new InstanceGroupResponse();
        groupResponse.setId(group.getId());
        groupResponse.setName(group.getName());
        groupResponse.setCreated(group.getCreated());

        populateOwner(groupResponse, group);

        groupResponse.setObjectName("instancegroup");
        return groupResponse;
    }
View Full Code Here

    @Override
    public void execute(){
        InstanceGroup result = _mgr.updateVmGroup(this);
        if (result != null){
            InstanceGroupResponse response = _responseGenerator.createInstanceGroupResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update vm instance group");
        }
    }
View Full Code Here

TOP

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

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.