@@ -987,6 +987,8 @@ public StoragePoolVO createPool(CreateStoragePoolCmd cmd) throws ResourceInUseEx
987987 pool = new StoragePoolVO (StoragePoolType .Filesystem , "localhost" , 0 , hostPath );
988988 } else if (scheme .equalsIgnoreCase ("sharedMountPoint" )) {
989989 pool = new StoragePoolVO (StoragePoolType .SharedMountPoint , storageHost , 0 , hostPath );
990+ } else if (scheme .equalsIgnoreCase ("PreSetup" )) {
991+ pool = new StoragePoolVO (StoragePoolType .PreSetup , storageHost , 0 , hostPath );
990992 } else if (scheme .equalsIgnoreCase ("iscsi" )) {
991993 String [] tokens = hostPath .split ("/" );
992994 int lun = NumbersUtil .parseInt (tokens [tokens .length - 1 ], -1 );
@@ -1052,6 +1054,8 @@ public StoragePoolVO createPool(CreateStoragePoolCmd cmd) throws ResourceInUseEx
10521054 String uuid = null ;
10531055 if (scheme .equalsIgnoreCase ("sharedmountpoint" )) {
10541056 uuid = UUID .randomUUID ().toString ();
1057+ } else if (scheme .equalsIgnoreCase ("PreSetup" )) {
1058+ uuid = hostPath .replace ("/" , "" );
10551059 } else {
10561060 uuid = UUID .nameUUIDFromBytes (new String (storageHost + hostPath ).getBytes ()).toString ();
10571061 }
@@ -1233,8 +1237,8 @@ public boolean addPoolToHost(long hostId, StoragePoolVO pool) {
12331237 s_logger .debug ("Adding pool " + pool .getName () + " to host " + hostId );
12341238 if (pool .getPoolType () != StoragePoolType .NetworkFilesystem && pool .getPoolType () != StoragePoolType .Filesystem
12351239 && pool .getPoolType () != StoragePoolType .IscsiLUN && pool .getPoolType () != StoragePoolType .Iscsi && pool .getPoolType () != StoragePoolType .VMFS
1236- && pool .getPoolType () != StoragePoolType .SharedMountPoint ) {
1237-
1240+ && pool .getPoolType () != StoragePoolType .SharedMountPoint && pool . getPoolType () != StoragePoolType . PreSetup ) {
1241+ s_logger . warn ( " Doesn't support storage pool type " + pool . getPoolType ());
12381242 return true ;
12391243 }
12401244
0 commit comments