cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/4] git commit: updated refs/heads/4.5 to 45ebdf3
Date Tue, 20 Jan 2015 10:20:23 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 31a651740 -> 45ebdf34a


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

(cherry picked from commit fc4dceaa991ecacf0d248725decd5370622ea0ed)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/4.5
Commit: 45108fdbadaf0e0b8d6a98a730a27ab00bcca3b7
Parents: 31a6517
Author: Saksham Srivastava <saksham.srivastava@citrix.com>
Authored: Wed Oct 22 13:53:41 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Jan 20 14:38:03 2015 +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/45108fdb/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/45108fdb/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 7de4ea0..5ea44a2 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -803,7 +803,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