Skip to content

Commit d4d7831

Browse files
committed
[Trivial]Remove unused helper get_allocated_disk_size
Helper get_allocated_disk_size is no longer used after d41ea9d, this is to remove it. Change-Id: Ib7a347b4fdb49fce893e227c72bdfbee4cea00ef
1 parent 90401df commit d4d7831

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

nova/tests/unit/virt/libvirt/test_driver.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4932,8 +4932,7 @@ def test_detach_encrypted_volumes(self, mock_get_volume_size,
49324932

49334933
@mock.patch.object(dmcrypt, 'delete_volume')
49344934
@mock.patch.object(conn._host, '_get_domain', return_value=dom)
4935-
@mock.patch.object(libvirt_driver.disk_api, 'get_allocated_disk_size')
4936-
def detach_encrypted_volumes(block_device_info, mock_get_alloc_size,
4935+
def detach_encrypted_volumes(block_device_info,
49374936
mock_get_domain, mock_delete_volume):
49384937
conn._detach_encrypted_volumes(instance, block_device_info)
49394938

nova/virt/disk/api.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,6 @@ def get_disk_size(path):
107107
return images.qemu_img_info(path).virtual_size
108108

109109

110-
def get_allocated_disk_size(path):
111-
"""Get the allocated size of a disk image
112-
113-
:param path: Path to the disk image
114-
:returns: Size (in bytes) of the given disk image as allocated on the
115-
filesystem
116-
"""
117-
return images.qemu_img_info(path).disk_size
118-
119-
120110
def extend(image, size):
121111
"""Increase image to size.
122112

0 commit comments

Comments
 (0)