pylorax: Add mkqemu_img function, alias mkqcow2 to it.
Preserve the API but add a more descriptive name for the function.
This commit is contained in:
parent
a3097b3085
commit
3d343aace8
@ -127,6 +127,15 @@ def mksparse(outfile, size):
|
|||||||
os.ftruncate(fobj.fileno(), size)
|
os.ftruncate(fobj.fileno(), size)
|
||||||
|
|
||||||
def mkqcow2(outfile, size, options=None):
|
def mkqcow2(outfile, size, options=None):
|
||||||
|
'''use qemu-img to create a file of the given size.
|
||||||
|
options is a list of options passed to qemu-img
|
||||||
|
|
||||||
|
Default format is qcow2, override by passing "-f", fmt
|
||||||
|
in options.
|
||||||
|
'''
|
||||||
|
mkqemu_img(outfile, size, options)
|
||||||
|
|
||||||
|
def mkqemu_img(outfile, size, options=None):
|
||||||
'''use qemu-img to create a file of the given size.
|
'''use qemu-img to create a file of the given size.
|
||||||
options is a list of options passed to qemu-img
|
options is a list of options passed to qemu-img
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user