make sure volumeUuid is not full path

This commit is contained in:
Anthony Xu 2014-04-08 16:34:59 -07:00
parent 7cd4319eed
commit 73c4e83ace
1 changed files with 6 additions and 1 deletions

View File

@ -123,8 +123,13 @@ public class LibvirtStoragePool implements KVMStoragePool {
}
@Override
public KVMPhysicalDisk getPhysicalDisk(String volumeUuid) {
public KVMPhysicalDisk getPhysicalDisk(String volumeUid) {
KVMPhysicalDisk disk = null;
String volumeUuid = volumeUid;
if ( volumeUid.contains("/") ) {
String[] tokens = volumeUid.split("/");
volumeUuid = tokens[tokens.length -1];
}
try {
disk = this._storageAdaptor.getPhysicalDisk(volumeUuid, this);
} catch (CloudRuntimeException e) {