[Trivial]Remove unused helper get_allocated_disk_size

Helper get_allocated_disk_size is no longer used after
d41ea9d878, this is to remove it.

Change-Id: Ib7a347b4fdb49fce893e227c72bdfbee4cea00ef
This commit is contained in:
zhufl 2019-08-28 09:44:27 +08:00
parent 90401df566
commit d4d7831236
2 changed files with 1 additions and 12 deletions

View File

@ -4932,8 +4932,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
@mock.patch.object(dmcrypt, 'delete_volume')
@mock.patch.object(conn._host, '_get_domain', return_value=dom)
@mock.patch.object(libvirt_driver.disk_api, 'get_allocated_disk_size')
def detach_encrypted_volumes(block_device_info, mock_get_alloc_size,
def detach_encrypted_volumes(block_device_info,
mock_get_domain, mock_delete_volume):
conn._detach_encrypted_volumes(instance, block_device_info)

View File

@ -107,16 +107,6 @@ def get_disk_size(path):
return images.qemu_img_info(path).virtual_size
def get_allocated_disk_size(path):
"""Get the allocated size of a disk image
:param path: Path to the disk image
:returns: Size (in bytes) of the given disk image as allocated on the
filesystem
"""
return images.qemu_img_info(path).disk_size
def extend(image, size):
"""Increase image to size.