Skip to content

Commit 5364b26

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[Trivial]Remove unused helper get_allocated_disk_size"
2 parents 9903c8c + d4d7831 commit 5364b26

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)