Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3f72953c
authored
Apr 01, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge: added iso handling
parent
a7bfdfd6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
disk.py
+3
-4
No files found.
disk.py
View file @
3f72953c
...
...
@@ -223,13 +223,12 @@ class Disk(object):
def
merge
(
self
,
new_disk
):
''' Merging a new_disk from the actual disk and its base.
'''
# Check if snapshot type match
if
self
.
format
!=
'qcow2'
:
raise
Exception
(
'Invalid format:
%
s'
%
self
.
format
)
# Check if file already exists
if
os
.
path
.
isfile
(
new_disk
.
get_path
()):
raise
Exception
(
'File already exists:
%
s'
%
self
.
get_path
())
if
self
.
base_name
:
if
self
.
format
==
"iso"
:
os
.
symlink
(
self
.
get_path
(),
new_disk
.
get_path
())
elif
self
.
base_name
:
cmdline
=
[
'qemu-img'
,
'convert'
,
self
.
get_path
(),
...
...
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