Commit 7e45262c by Guba Sándor

disk: addign filename

parent d0eab3c8
import os import os
import subprocess import subprocess
import re import re
import logging
re_qemu_img = re.compile(r'(file format: (?P<format>(qcow2|raw))|' re_qemu_img = re.compile(r'(file format: (?P<format>(qcow2|raw))|'
r'virtual size: \w+ \((?P<size>[0-9]+) bytes\)|' r'virtual size: \w+ \((?P<size>[0-9]+) bytes\)|'
...@@ -91,7 +92,9 @@ class Disk(object): ...@@ -91,7 +92,9 @@ class Disk(object):
cmdline = ['qemu-img', cmdline = ['qemu-img',
'create', 'create',
'-f', self.format, '-f', self.format,
self.get_path(),
str(self.size)] str(self.size)]
logging.info("Create file: %s " % cmdline)
# Call subprocess # Call subprocess
subprocess.check_output(cmdline) subprocess.check_output(cmdline)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment