cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: updated refs/heads/4.1 to 6dbf3e7
Date Thu, 25 Apr 2013 23:58:00 GMT
Updated Branches:
  refs/heads/4.1 3eeaff03e -> 6dbf3e7b3


CLOUDSTACK-2196 and CLOUDSTACK-2126: fix missing async job status in listXXX api and incorrect
async job status in other async api.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6dbf3e7b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6dbf3e7b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6dbf3e7b

Branch: refs/heads/4.1
Commit: 6dbf3e7b35f92eadbe6f47a8df9e465a8373d7ac
Parents: 3eeaff0
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Apr 25 16:16:13 2013 -0700
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Fri Apr 26 00:56:01 2013 +0100

----------------------------------------------------------------------
 core/src/com/cloud/async/AsyncJobVO.java           |    1 +
 .../cloud/api/query/dao/AccountJoinDaoImpl.java    |    6 ++++--
 .../api/query/dao/DomainRouterJoinDaoImpl.java     |    6 ++++--
 .../com/cloud/api/query/dao/HostJoinDaoImpl.java   |    6 ++++--
 .../api/query/dao/SecurityGroupJoinDaoImpl.java    |    6 ++++--
 .../api/query/dao/StoragePoolJoinDaoImpl.java      |    6 ++++--
 .../api/query/dao/UserAccountJoinDaoImpl.java      |    6 ++++--
 .../com/cloud/api/query/dao/UserVmJoinDaoImpl.java |    6 ++++--
 .../com/cloud/api/query/dao/VolumeJoinDaoImpl.java |    6 ++++--
 .../src/com/cloud/api/query/vo/AccountJoinVO.java  |    6 +++---
 .../com/cloud/api/query/vo/DomainRouterJoinVO.java |    6 +++---
 server/src/com/cloud/api/query/vo/HostJoinVO.java  |    6 +++---
 .../cloud/api/query/vo/SecurityGroupJoinVO.java    |    6 +++---
 .../com/cloud/api/query/vo/StoragePoolJoinVO.java  |    6 +++---
 .../com/cloud/api/query/vo/UserAccountJoinVO.java  |    6 +++---
 .../src/com/cloud/api/query/vo/UserVmJoinVO.java   |    6 +++---
 .../src/com/cloud/api/query/vo/VolumeJoinVO.java   |    6 +++---
 17 files changed, 57 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/core/src/com/cloud/async/AsyncJobVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/async/AsyncJobVO.java b/core/src/com/cloud/async/AsyncJobVO.java
index ad482b0..c40fc98 100644
--- a/core/src/com/cloud/async/AsyncJobVO.java
+++ b/core/src/com/cloud/async/AsyncJobVO.java
@@ -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,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
index 22b807c..d81115e 100644
--- a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
index 488c4e4..11e9672 100644
--- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
@@ -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");
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
index 1adff40..164b596 100644
--- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -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");
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
index 3e579c1..2a6afca 100644
--- a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java
@@ -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");
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
index 66aecc2..f7e3108 100644
--- a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
index 7072324..c4eea16 100644
--- a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
@@ -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");
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
index 8b6abf8..936b2b7 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -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());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
index 495c0eb..fe42e8b 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/AccountJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/AccountJoinVO.java b/server/src/com/cloud/api/query/vo/AccountJoinVO.java
index 6d37f4d..345434b 100644
--- a/server/src/com/cloud/api/query/vo/AccountJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/AccountJoinVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
index b04120a..7556bec 100644
--- a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/HostJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/HostJoinVO.java b/server/src/com/cloud/api/query/vo/HostJoinVO.java
index 0b8f672..cf3cfdc 100644
--- a/server/src/com/cloud/api/query/vo/HostJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/HostJoinVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java b/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
index 922e130..258b613 100644
--- a/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
index 89e79e5..f9a828c 100644
--- a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java b/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
index 44637db..59faf95 100644
--- a/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
index 33c49cd..b3f4343 100644
--- a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dbf3e7b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
index 4f6b35b..edce9d6 100644
--- a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
@@ -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;
     }
 


Mime
View raw message