Move mkfs from libvirt.utils to utils

Related to blueprint xenapi-config-drive

Move mkfs function to nova.utils, so configdrive module does not depend
on the libvirt module. This way, the configdrive module could be used
by other virt modules.

Change-Id: Ibda2aacfa0b66bc087e397df1474b5dfbe86d923
This commit is contained in:
Mate Lakat
2012-10-23 16:00:31 +01:00
parent 1dfe58d4d3
commit ab7c19a7ad
2 changed files with 0 additions and 13 deletions

View File

@@ -48,10 +48,6 @@ def copy_image(src, dest):
pass
def mkfs(fs, path):
pass
def resize2fs(path):
pass

View File

@@ -3566,15 +3566,6 @@ disk size: 4.4M''', ''))
finally:
os.unlink(dst_path)
def test_mkfs(self):
self.mox.StubOutWithMock(utils, 'execute')
utils.execute('mkfs', '-t', 'ext4', '-F', '/my/block/dev')
utils.execute('mkswap', '/my/swap/block/dev')
self.mox.ReplayAll()
libvirt_utils.mkfs('ext4', '/my/block/dev')
libvirt_utils.mkfs('swap', '/my/swap/block/dev')
def test_write_to_file(self):
dst_fd, dst_path = tempfile.mkstemp()
try: