further improvements to the sp code, especially for the local storage case

This commit is contained in:
abhishek 2010-09-13 11:59:42 -07:00
parent ab05973b18
commit a03cf45e5d
2 changed files with 2 additions and 2 deletions

View File

@ -181,6 +181,7 @@ public class StoragePoolVO implements StoragePool {
this.path = hostPath;
this.port = port;
this.podId = podId;
this.setStatus(Status.Up);
}
public StoragePoolVO(StoragePoolType type, String hostAddress, int port, String path) {
@ -188,6 +189,7 @@ public class StoragePoolVO implements StoragePool {
this.hostAddress = hostAddress;
this.port = port;
this.path = path;
this.setStatus(Status.Up);
}
public void setStatus(Status status)

View File

@ -91,9 +91,7 @@ public class LocalStoragePoolListener implements Listener {
pool = new StoragePoolVO(poolId, name, pInfo.getUuid(), pInfo.getPoolType(), host.getDataCenterId(),
host.getPodId(), pInfo.getAvailableBytes(), pInfo.getCapacityBytes(), pInfo.getHost(), 0,
pInfo.getHostPath());
pool.setStatus(Status.Up);
pool.setClusterId(host.getClusterId());
pool.setStatus(Status.Up);
_storagePoolDao.persist(pool, pInfo.getDetails());
StoragePoolHostVO poolHost = new StoragePoolHostVO(pool.getId(), host.getId(), pInfo.getLocalPath());
_storagePoolHostDao.persist(poolHost);