cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject git commit: updated refs/heads/4.4-forward to 64ccf4b
Date Tue, 06 May 2014 14:57:04 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward a708d5c49 -> 64ccf4b48


CLOUDSTACK-6579: used_bytes column of storage_pool table is no longer used and should be removed
For now correctly setting used_bytes. Also fixed the corresponding simulator code


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

Branch: refs/heads/4.4-forward
Commit: 64ccf4b48e256e73805bf8c50b1012270075f2eb
Parents: a708d5c
Author: Koushik Das <koushik@apache.org>
Authored: Tue May 6 20:24:08 2014 +0530
Committer: Koushik Das <koushik@apache.org>
Committed: Tue May 6 20:24:08 2014 +0530

----------------------------------------------------------------------
 .../storage/datastore/provider/DefaultHostListener.java          | 2 +-
 .../src/com/cloud/agent/manager/MockStorageManagerImpl.java      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64ccf4b4/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
index fffd1e8..e77d548 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
@@ -81,7 +81,7 @@ public class DefaultHostListener implements HypervisorHostListener {
         }
 
         StoragePoolVO poolVO = this.primaryStoreDao.findById(poolId);
-        poolVO.setUsedBytes(mspAnswer.getPoolInfo().getAvailableBytes());
+        poolVO.setUsedBytes(mspAnswer.getPoolInfo().getCapacityBytes() - mspAnswer.getPoolInfo().getAvailableBytes());
         poolVO.setCapacityBytes(mspAnswer.getPoolInfo().getCapacityBytes());
         primaryStoreDao.update(pool.getId(), poolVO);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64ccf4b4/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
index 69d4bac..8e1aaed 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
@@ -362,7 +362,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
             txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
             txn.close();
         }
-        return new ModifyStoragePoolAnswer(cmd, storagePool.getCapacity(), 0, new HashMap<String,
TemplateProp>());
+        return new ModifyStoragePoolAnswer(cmd, storagePool.getCapacity(), storagePool.getCapacity(),
new HashMap<String, TemplateProp>());
     }
 
     @Override
@@ -964,7 +964,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
             }
         }
         return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(),
storagePool.getMountPoint(),
-            storagePool.getPoolType(), storagePool.getCapacity(), 0);
+            storagePool.getPoolType(), storagePool.getCapacity(), storagePool.getCapacity());
     }
 
     @Override


Mime
View raw message