cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject git commit: updated refs/heads/master to fc4dcea
Date Thu, 13 Nov 2014 11:45:16 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 890f9eeb5 -> fc4dceaa9


CLOUDSTACK-7582: Update Storage Pool API does not update tags correctly


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

Branch: refs/heads/master
Commit: fc4dceaa991ecacf0d248725decd5370622ea0ed
Parents: 890f9ee
Author: Saksham Srivastava <saksham.srivastava@citrix.com>
Authored: Wed Oct 22 13:53:41 2014 +0530
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Thu Nov 13 17:01:06 2014 +0530

----------------------------------------------------------------------
 .../cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java  | 3 +++
 server/src/com/cloud/storage/StorageManagerImpl.java              | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fc4dceaa/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
index 0c372a5..ae2287e 100644
--- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
@@ -435,6 +435,9 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase<StoragePoolVO,
Long>
                 detailsVO.add(new StoragePoolDetailVO(poolId, key, details.get(key), true));
             }
             _detailsDao.saveDetails(detailsVO);
+            if(details.size() == 0) {
+                _detailsDao.removeDetails(poolId);
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fc4dceaa/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 297f1ce..1184320 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -799,7 +799,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
             }
         }
 
-        if (updatedDetails.size() > 0) {
+        if (updatedDetails.size() >= 0) {
             _storagePoolDao.updateDetails(id, updatedDetails);
         }
 


Mime
View raw message