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/master to 654c90f
Date Thu, 05 Sep 2013 07:13:49 GMT
Updated Branches:
  refs/heads/master 4db232762 -> 654c90f4e


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/654c90f4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/654c90f4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/654c90f4

Branch: refs/heads/master
Commit: 654c90f4e5432e3837a12e7c5edf7dec425cbab1
Parents: 4db2327
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:43:36 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/654c90f4/engine/schema/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
index 941b952..557c964 100644
--- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
+++ b/engine/schema/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/654c90f4/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 e02d9bc..7c8f49a 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
@@ -358,9 +358,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