cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [24/50] [abbrv] git commit: updated refs/heads/marvin_refactor to 7c439fe
Date Mon, 29 Apr 2013 13:14:02 GMT
CLOUDSTACK-2196 and CLOUDSTACK-2126: fix missing async job status in
listXXX api and incorrect async job status in other async api.

Conflicts:
	server/src/com/cloud/api/query/vo/AccountJoinVO.java


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

Branch: refs/heads/marvin_refactor
Commit: efb4471dc9b8204fd97e2f053fca0dfe1e9d922b
Parents: 64635ab
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Apr 25 17:40:18 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Apr 25 17:40:18 2013 -0700

----------------------------------------------------------------------
 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/efb4471d/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/efb4471d/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 796ae54..528bdac 100644
--- a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
@@ -203,8 +203,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/efb4471d/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 25cd62f..125db17 100644
--- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
@@ -158,8 +158,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/efb4471d/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 c678f2f..c1c2839 100644
--- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -183,8 +183,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/efb4471d/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/efb4471d/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 260ff4d..e401f44 100644
--- a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
@@ -103,8 +103,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/efb4471d/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 43b3a2d..390f28c 100644
--- a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
@@ -83,8 +83,10 @@ public class UserAccountJoinDaoImpl extends GenericDaoBase<UserAccountJoinVO,
Lo
         userResponse.setIsDefault(usr.isDefault());
 
         // 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/efb4471d/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 2bb7ee9..6513ef5 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -134,8 +134,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/efb4471d/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 a7a0bf0..a09c4a0 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -197,8 +197,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/efb4471d/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 800da78..fbcc934 100644
--- a/server/src/com/cloud/api/query/vo/AccountJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/AccountJoinVO.java
@@ -177,7 +177,7 @@ public class AccountJoinVO extends BaseViewVO implements InternalIdentity,
Ident
     private Long secondaryStorageTotal;
 
     @Column(name="job_id")
-    private long jobId;
+    private Long jobId;
 
     @Column(name="job_uuid")
     private String jobUuid;
@@ -645,12 +645,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/efb4471d/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 5f2b500..83e1547 100644
--- a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
@@ -210,7 +210,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;
@@ -781,14 +781,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/efb4471d/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 4aa45e5..4b70cfc 100644
--- a/server/src/com/cloud/api/query/vo/HostJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/HostJoinVO.java
@@ -168,7 +168,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;
@@ -427,11 +427,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/efb4471d/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/efb4471d/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 da06227..d86726c 100644
--- a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
@@ -121,7 +121,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;
@@ -342,11 +342,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/efb4471d/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 d85392f..c44027b 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;
@@ -324,11 +324,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/efb4471d/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 a50906d..d7b516c 100644
--- a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
@@ -332,7 +332,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;
@@ -1608,14 +1608,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/efb4471d/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 8a4bfe5..2d7b1d5 100644
--- a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
@@ -206,7 +206,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;
@@ -817,13 +817,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