mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2196 and CLOUDSTACK-2126: fix missing async job status in listXXX api and incorrect async job status in other async api.
This commit is contained in:
parent
3eeaff03ec
commit
6dbf3e7b35
|
|
@ -133,6 +133,7 @@ public class AsyncJobVO implements AsyncJob {
|
|||
this.callbackType = CALLBACK_POLLING;
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
this.instanceId = instanceId;
|
||||
this.instanceType = instanceType;
|
||||
}
|
||||
|
||||
public AsyncJobVO(long userId, long accountId, String cmd, String cmdInfo,
|
||||
|
|
|
|||
|
|
@ -167,8 +167,10 @@ public class AccountJoinDaoImpl extends GenericDaoBase<AccountJoinVO, Long> impl
|
|||
accountResponse.setObjectName("account");
|
||||
|
||||
// set async job
|
||||
accountResponse.setJobId(account.getJobUuid());
|
||||
accountResponse.setJobStatus(account.getJobStatus());
|
||||
if (account.getJobId() != null) {
|
||||
accountResponse.setJobId(account.getJobUuid());
|
||||
accountResponse.setJobStatus(account.getJobStatus());
|
||||
}
|
||||
return accountResponse;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,8 +157,10 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase<DomainRouterJoinVO,
|
|||
routerResponse.setVpcId(router.getVpcUuid());
|
||||
|
||||
// set async job
|
||||
routerResponse.setJobId(router.getJobUuid());
|
||||
routerResponse.setJobStatus(router.getJobStatus());
|
||||
if (router.getJobId() != null) {
|
||||
routerResponse.setJobId(router.getJobUuid());
|
||||
routerResponse.setJobStatus(router.getJobStatus());
|
||||
}
|
||||
|
||||
routerResponse.setObjectName("router");
|
||||
|
||||
|
|
|
|||
|
|
@ -181,8 +181,10 @@ public class HostJoinDaoImpl extends GenericDaoBase<HostJoinVO, Long> implements
|
|||
hostResponse.setResourceState(host.getResourceState().toString());
|
||||
|
||||
// set async job
|
||||
hostResponse.setJobId(host.getJobUuid());
|
||||
hostResponse.setJobStatus(host.getJobStatus());
|
||||
if (host.getJobId() != null) {
|
||||
hostResponse.setJobId(host.getJobUuid());
|
||||
hostResponse.setJobStatus(host.getJobStatus());
|
||||
}
|
||||
|
||||
hostResponse.setObjectName("host");
|
||||
|
||||
|
|
|
|||
|
|
@ -117,8 +117,10 @@ public class SecurityGroupJoinDaoImpl extends GenericDaoBase<SecurityGroupJoinVO
|
|||
}
|
||||
|
||||
// set async job
|
||||
sgResponse.setJobId(vsg.getJobUuid());
|
||||
sgResponse.setJobStatus(vsg.getJobStatus());
|
||||
if (vsg.getJobId() != null) {
|
||||
sgResponse.setJobId(vsg.getJobUuid());
|
||||
sgResponse.setJobStatus(vsg.getJobStatus());
|
||||
}
|
||||
|
||||
sgResponse.setObjectName("securitygroup");
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,10 @@ public class StoragePoolJoinDaoImpl extends GenericDaoBase<StoragePoolJoinVO, Lo
|
|||
poolResponse.setTags(pool.getTag());
|
||||
|
||||
// set async job
|
||||
poolResponse.setJobId(pool.getJobUuid());
|
||||
poolResponse.setJobStatus(pool.getJobStatus());
|
||||
if (pool.getJobId() != null) {
|
||||
poolResponse.setJobId(pool.getJobUuid());
|
||||
poolResponse.setJobStatus(pool.getJobStatus());
|
||||
}
|
||||
|
||||
poolResponse.setObjectName("storagepool");
|
||||
return poolResponse;
|
||||
|
|
|
|||
|
|
@ -82,8 +82,10 @@ public class UserAccountJoinDaoImpl extends GenericDaoBase<UserAccountJoinVO, Lo
|
|||
userResponse.setSecretKey(usr.getSecretKey());
|
||||
|
||||
// set async job
|
||||
userResponse.setJobId(usr.getJobUuid());
|
||||
userResponse.setJobStatus(usr.getJobStatus());
|
||||
if (usr.getJobId() != null) {
|
||||
userResponse.setJobId(usr.getJobUuid());
|
||||
userResponse.setJobStatus(usr.getJobStatus());
|
||||
}
|
||||
|
||||
userResponse.setObjectName("user");
|
||||
|
||||
|
|
|
|||
|
|
@ -132,8 +132,10 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
|
|||
}
|
||||
}
|
||||
userVmResponse.setPassword(userVm.getPassword());
|
||||
userVmResponse.setJobId(userVm.getJobUuid());
|
||||
userVmResponse.setJobStatus(userVm.getJobStatus());
|
||||
if (userVm.getJobId() != null) {
|
||||
userVmResponse.setJobId(userVm.getJobUuid());
|
||||
userVmResponse.setJobStatus(userVm.getJobStatus());
|
||||
}
|
||||
//userVmResponse.setForVirtualNetwork(userVm.getForVirtualNetwork());
|
||||
|
||||
userVmResponse.setPublicIpId(userVm.getPublicIpUuid());
|
||||
|
|
|
|||
|
|
@ -196,8 +196,10 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
|
|||
volResponse.setExtractable(isExtractable);
|
||||
|
||||
// set async job
|
||||
volResponse.setJobId(volume.getJobUuid());
|
||||
volResponse.setJobStatus(volume.getJobStatus());
|
||||
if (volume.getJobId() != null) {
|
||||
volResponse.setJobId(volume.getJobUuid());
|
||||
volResponse.setJobStatus(volume.getJobStatus());
|
||||
}
|
||||
|
||||
volResponse.setObjectName("volume");
|
||||
return volResponse;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public class AccountJoinVO extends BaseViewVO implements InternalIdentity, Ident
|
|||
private Long vpcTotal;
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -536,12 +536,12 @@ public class AccountJoinVO extends BaseViewVO implements InternalIdentity, Ident
|
|||
}
|
||||
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
|
|||
private String projectName;
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -769,14 +769,14 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
|
|||
}
|
||||
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
|
|||
private long cpuReservedCapacity;
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -416,11 +416,11 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
|
|||
this.osCategoryName = osCategoryName;
|
||||
}
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class SecurityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
|
|||
private String projectName;
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -269,11 +269,11 @@ public class SecurityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
|
|||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
|
|||
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -312,11 +312,11 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
|
|||
this.reservedCapacity = reservedCapacity;
|
||||
}
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class UserAccountJoinVO extends BaseViewVO implements InternalIdentity, I
|
|||
private String domainPath = null;
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -321,11 +321,11 @@ public class UserAccountJoinVO extends BaseViewVO implements InternalIdentity, I
|
|||
this.loginAttempts = loginAttempts;
|
||||
}
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
|
|||
private String keypairName;
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -1583,14 +1583,14 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
|
|||
|
||||
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
|||
private Storage.TemplateType templateType;
|
||||
|
||||
@Column(name="job_id")
|
||||
private long jobId;
|
||||
private Long jobId;
|
||||
|
||||
@Column(name="job_uuid")
|
||||
private String jobUuid;
|
||||
|
|
@ -814,13 +814,13 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
|||
|
||||
|
||||
|
||||
public long getJobId() {
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue