seraral fixes for VMFS storage

This commit is contained in:
Kelven Yang 2010-12-11 10:15:06 -08:00 committed by Kelven Yang
parent 1689ed8150
commit dedfe57280
2 changed files with 9 additions and 3 deletions

View File

@ -92,7 +92,8 @@ public class Storage {
IscsiLUN(true), //shared LUN, with a clusterfs overlay
Iscsi(true), //for e.g., ZFS Comstar
ISO(false), // for iso image
LVM(false); // XenServer local LVM SR
LVM(false), // XenServer local LVM SR
VMFS(true); // VMware VMFS storage
boolean shared;

View File

@ -1387,6 +1387,8 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
port = 2049;
}
pool = new StoragePoolVO(StoragePoolType.ISO, storageHost, port, hostPath);
} else if (scheme.equalsIgnoreCase("vmfs")) {
pool = new StoragePoolVO(StoragePoolType.VMFS, storageHost, 0, hostPath);
} else {
s_logger.warn("Unable to figure out the scheme for URI: " + uri);
throw new IllegalArgumentException("Unable to figure out the scheme for URI: " + uri);
@ -1572,9 +1574,12 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
@Override
public boolean addPoolToHost(long hostId, StoragePoolVO pool) {
s_logger.debug("Adding pool " + pool.getName() + " to host " + hostId);
if (pool.getPoolType() != StoragePoolType.NetworkFilesystem && pool.getPoolType() != StoragePoolType.Filesystem && pool.getPoolType() != StoragePoolType.IscsiLUN && pool.getPoolType() != StoragePoolType.Iscsi) {
return true;
if (pool.getPoolType() != StoragePoolType.NetworkFilesystem && pool.getPoolType() != StoragePoolType.Filesystem
&& pool.getPoolType() != StoragePoolType.IscsiLUN && pool.getPoolType() != StoragePoolType.Iscsi && pool.getPoolType() != StoragePoolType.VMFS) {
return true;
}
ModifyStoragePoolCommand cmd = new ModifyStoragePoolCommand(true, pool);
final Answer answer = _agentMgr.easySend(hostId, cmd);