Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7e45262c
authored
Oct 16, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disk: addign filename
parent
d0eab3c8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
disk.py
+3
-0
No files found.
disk.py
View file @
7e45262c
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment