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
78d0358b
authored
Feb 08, 2014
by
Bach Dániel
Committed by
Guba Sándor
Feb 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshot iso images by symlink
parent
1f9af3ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
disk.py
+7
-1
No files found.
disk.py
View file @
78d0358b
...
@@ -106,7 +106,7 @@ class Disk(object):
...
@@ -106,7 +106,7 @@ class Disk(object):
''' Creating qcow2 snapshot with base image.
''' Creating qcow2 snapshot with base image.
'''
'''
# Check if snapshot type and qcow2 format matchmatch
# Check if snapshot type and qcow2 format matchmatch
if
self
.
format
!=
'qcow2'
:
if
self
.
format
not
in
[
'qcow2'
,
'iso'
]
:
raise
Exception
(
'Invalid format:
%
s'
%
self
.
format
)
raise
Exception
(
'Invalid format:
%
s'
%
self
.
format
)
if
self
.
type
!=
'snapshot'
:
if
self
.
type
!=
'snapshot'
:
raise
Exception
(
'Invalid type:
%
s'
%
self
.
format
)
raise
Exception
(
'Invalid type:
%
s'
%
self
.
format
)
...
@@ -117,6 +117,12 @@ class Disk(object):
...
@@ -117,6 +117,12 @@ class Disk(object):
if
not
os
.
path
.
isfile
(
self
.
get_base
()):
if
not
os
.
path
.
isfile
(
self
.
get_base
()):
raise
Exception
(
'Image Base does not exists:
%
s'
%
self
.
get_base
())
raise
Exception
(
'Image Base does not exists:
%
s'
%
self
.
get_base
())
# Build list of Strings as command parameters
# Build list of Strings as command parameters
if
self
.
format
==
'iso'
:
cmdline
=
[
'ln'
,
'-s'
,
self
.
get_base
(),
self
.
get_path
()]
else
:
cmdline
=
[
'qemu-img'
,
cmdline
=
[
'qemu-img'
,
'create'
,
'create'
,
'-b'
,
self
.
get_base
(),
'-b'
,
self
.
get_base
(),
...
...
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