Search in sources :

Example 1 with CreateCmdResponse

use of com.cloud.api.response.CreateCmdResponse in project CloudStack-archive by CloudStack-extras.

the class BaseAsyncCreateCmd method getResponse.

public String getResponse(long jobId, long objectId, String objectEntityTable) {
    CreateCmdResponse response = new CreateCmdResponse();
    response.setJobId(jobId);
    response.setId(objectId);
    response.setIdEntityTable(objectEntityTable);
    response.setResponseName(getCommandName());
    return _responseGenerator.toSerializedString(response, getResponseType());
}
Also used : CreateCmdResponse(com.cloud.api.response.CreateCmdResponse)

Example 2 with CreateCmdResponse

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

the class ApiServer method getBaseAsyncCreateResponse.

private String getBaseAsyncCreateResponse(final long jobId, final BaseAsyncCreateCmd cmd, final String objectUuid) {
    final CreateCmdResponse response = new CreateCmdResponse();
    final AsyncJob job = _entityMgr.findById(AsyncJob.class, jobId);
    response.setJobId(job.getUuid());
    response.setId(objectUuid);
    response.setResponseName(cmd.getCommandName());
    return ApiResponseSerializer.toSerializedString(response, cmd.getResponseType());
}
Also used : CreateCmdResponse(com.cloud.api.response.CreateCmdResponse) AsyncJob(com.cloud.framework.jobs.AsyncJob)

Aggregations

CreateCmdResponse (com.cloud.api.response.CreateCmdResponse)2 AsyncJob (com.cloud.framework.jobs.AsyncJob)1