Remove unused method deleteVbdByPath from KVM storage classes

This commit is contained in:
Wei Zhou 2013-08-13 23:51:05 +02:00
parent 7d89418475
commit c3bc9d65dd
3 changed files with 0 additions and 23 deletions

View File

@ -131,11 +131,6 @@ public class KVMStoragePoolManager {
return true;
}
public boolean deleteVbdByPath(StoragePoolType type, String diskPath) {
StorageAdaptor adaptor = getStorageAdaptor(type);
return adaptor.deleteVbdByPath(diskPath);
}
public KVMPhysicalDisk createDiskFromTemplate(KVMPhysicalDisk template, String name,
KVMStoragePool destPool) {
StorageAdaptor adaptor = getStorageAdaptor(destPool.getType());

View File

@ -1147,22 +1147,6 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
return deleteStoragePool(pool.getUuid());
}
public boolean deleteVbdByPath(String diskPath) {
Connect conn;
try {
conn = LibvirtConnection.getConnection();
StorageVol vol = conn.storageVolLookupByPath(diskPath);
if(vol != null) {
s_logger.debug("requested delete disk " + diskPath);
vol.delete(0);
}
} catch (LibvirtException e) {
s_logger.debug("Libvirt error in attempting to find and delete patch disk:" + e.toString());
return false;
}
return true;
}
// refreshPool and deleteVol are used to fix CLOUDSTACK-2729/CLOUDSTACK-2780
// They are caused by a libvirt bug (https://bugzilla.redhat.com/show_bug.cgi?id=977706)
// However, we also need to fix the issues in CloudStack source code.

View File

@ -61,6 +61,4 @@ public interface StorageAdaptor {
public boolean createFolder(String uuid, String path);
public boolean deleteVbdByPath(String path);
}