Search in sources :

Example 1 with UpgradeRouterTemplateResponse

use of org.apache.cloudstack.api.response.UpgradeRouterTemplateResponse in project cloudstack by apache.

the class ApiResponseHelper method createUpgradeRouterTemplateResponse.

@Override
public ListResponse<UpgradeRouterTemplateResponse> createUpgradeRouterTemplateResponse(List<Long> jobIds) {
    ListResponse<UpgradeRouterTemplateResponse> response = new ListResponse<UpgradeRouterTemplateResponse>();
    List<UpgradeRouterTemplateResponse> responses = new ArrayList<UpgradeRouterTemplateResponse>();
    for (Long jobId : jobIds) {
        UpgradeRouterTemplateResponse routerResponse = new UpgradeRouterTemplateResponse();
        AsyncJob job = _entityMgr.findById(AsyncJob.class, jobId);
        routerResponse.setAsyncJobId((job.getUuid()));
        routerResponse.setObjectName("asyncjobs");
        responses.add(routerResponse);
    }
    response.setResponses(responses);
    return response;
}
Also used : UpgradeRouterTemplateResponse(org.apache.cloudstack.api.response.UpgradeRouterTemplateResponse) ListResponse(org.apache.cloudstack.api.response.ListResponse) ArrayList(java.util.ArrayList) AsyncJob(org.apache.cloudstack.framework.jobs.AsyncJob)

Aggregations

ArrayList (java.util.ArrayList)1 ListResponse (org.apache.cloudstack.api.response.ListResponse)1 UpgradeRouterTemplateResponse (org.apache.cloudstack.api.response.UpgradeRouterTemplateResponse)1 AsyncJob (org.apache.cloudstack.framework.jobs.AsyncJob)1