mirror of https://github.com/apache/cloudstack.git
Remove unused method deleteVbdByPath from KVM storage classes
This commit is contained in:
parent
7d89418475
commit
c3bc9d65dd
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -61,6 +61,4 @@ public interface StorageAdaptor {
|
|||
|
||||
public boolean createFolder(String uuid, String path);
|
||||
|
||||
public boolean deleteVbdByPath(String path);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue