From 3d343aace842f63723dddbb2462f117f44af05a7 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 18 Dec 2015 15:25:32 -0800 Subject: [PATCH] pylorax: Add mkqemu_img function, alias mkqcow2 to it. Preserve the API but add a more descriptive name for the function. --- src/pylorax/imgutils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pylorax/imgutils.py b/src/pylorax/imgutils.py index bff24723..c3003868 100644 --- a/src/pylorax/imgutils.py +++ b/src/pylorax/imgutils.py @@ -127,6 +127,15 @@ def mksparse(outfile, size): os.ftruncate(fobj.fileno(), size) 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. options is a list of options passed to qemu-img