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>
This commit is contained in:
Nitin Mehta 2013-09-05 12:41:05 +05:30
parent 4db232762c
commit 654c90f4e5
2 changed files with 6 additions and 3 deletions

View File

@ -340,7 +340,6 @@ public class StoragePoolVO implements StoragePool {
@Override @Override
public boolean isInMaintenance() { public boolean isInMaintenance() {
// TODO Auto-generated method stub return status == StoragePoolStatus.PrepareForMaintenance || status == StoragePoolStatus.Maintenance || status == StoragePoolStatus.ErrorInMaintenance || removed != null;
return false;
} }
} }

View File

@ -358,9 +358,13 @@ public class PrimaryDataStoreImpl implements PrimaryDataStore {
return this.pdsv.getPodId(); return this.pdsv.getPodId();
} }
public Date getRemoved() {
return this.pdsv.getRemoved();
}
@Override @Override
public boolean isInMaintenance() { 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 @Override