cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/4.2-forward to 65e8596
Date Thu, 05 Sep 2013 07:11:20 GMT
Updated Branches:
  refs/heads/4.2-forward e1f6fde41 -> 65e85962d


CLOUDSTACK-4327:
Check for the all the transition states for Maintenance. Also corrected the isMaintenance
function for StoragePoolVo
Signed off by : nitin mehta<nitin.mehta@citrix.com>


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

Branch: refs/heads/4.2-forward
Commit: 65e85962db462cc9728e204abeaa13bb0e4a9a8f
Parents: e1f6fde
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Thu Sep 5 12:41:05 2013 +0530
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Thu Sep 5 12:41:05 2013 +0530

----------------------------------------------------------------------
 .../apache/cloudstack/storage/datastore/db/StoragePoolVO.java  | 3 +--
 .../cloudstack/storage/datastore/PrimaryDataStoreImpl.java     | 6 +++++-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65e85962/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
index 941b952..557c964 100644
--- a/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
+++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
@@ -340,7 +340,6 @@ public class StoragePoolVO implements StoragePool {
 
     @Override
     public boolean isInMaintenance() {
-        // TODO Auto-generated method stub
-        return false;
+        return status == StoragePoolStatus.PrepareForMaintenance || status == StoragePoolStatus.Maintenance
|| status == StoragePoolStatus.ErrorInMaintenance || removed != null;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65e85962/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
index bbccfcd..22ff220 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
@@ -364,9 +364,13 @@ public class PrimaryDataStoreImpl implements PrimaryDataStore {
         return this.pdsv.getPodId();
     }
 
+    public Date getRemoved() {
+        return this.pdsv.getRemoved();
+    }
+
     @Override
     public boolean isInMaintenance() {
-        return this.getStatus() == StoragePoolStatus.Maintenance ? true : false;
+        return this.getStatus() == StoragePoolStatus.PrepareForMaintenance || this.getStatus()
== StoragePoolStatus.Maintenance || this.getStatus() == StoragePoolStatus.ErrorInMaintenance
|| this.getRemoved() != null;
     }
 
     @Override


Mime
View raw message