Revision 8e057ed0 snf-cyclades-app/synnefo/volume/snapshots.py
b/snf-cyclades-app/synnefo/volume/snapshots.py | ||
---|---|---|
20 | 20 |
if volume.machine is None: |
21 | 21 |
raise faults.BadRequest("Can not snapshot detached volume!") |
22 | 22 |
|
23 |
flavor = volume.machine.flavor |
|
24 |
if not flavor.disk_template.startswith("ext_"): |
|
25 |
msg = ("Snapshots are supported only for volumes of ext_*" |
|
26 |
" disk template") |
|
27 |
raise faults.BadRequest(msg) |
|
28 |
|
|
23 | 29 |
volume.snapshot_counter += 1 |
24 | 30 |
volume.save() |
25 | 31 |
transaction.commit() |
Also available in: Unified diff