Search in sources :

Example 1 with UpgradeRouterTemplateResponse

use of com.cloud.api.response.UpgradeRouterTemplateResponse in project cosmic by MissionCriticalCloud.

the class ApiResponseHelper method createUpgradeRouterTemplateResponse.

@Override
public ListResponse<UpgradeRouterTemplateResponse> createUpgradeRouterTemplateResponse(final List<Long> jobIds) {
    final ListResponse<UpgradeRouterTemplateResponse> response = new ListResponse<>();
    final List<UpgradeRouterTemplateResponse> responses = new ArrayList<>();
    for (final Long jobId : jobIds) {
        final UpgradeRouterTemplateResponse routerResponse = new UpgradeRouterTemplateResponse();
        final 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(com.cloud.api.response.UpgradeRouterTemplateResponse) ListResponse(com.cloud.api.response.ListResponse) ArrayList(java.util.ArrayList) AsyncJob(com.cloud.framework.jobs.AsyncJob)

Aggregations

ListResponse (com.cloud.api.response.ListResponse)1 UpgradeRouterTemplateResponse (com.cloud.api.response.UpgradeRouterTemplateResponse)1 AsyncJob (com.cloud.framework.jobs.AsyncJob)1 ArrayList (java.util.ArrayList)1