Revision ad8676d2 snf-cyclades-app/synnefo/volume/views.py
b/snf-cyclades-app/synnefo/volume/views.py | ||
---|---|---|
335 | 335 |
if new_name is None and new_description is None: |
336 | 336 |
raise faults.BadRequest("Nothing to update.") |
337 | 337 |
|
338 |
if new_name is not None: |
|
339 |
snapshot = snapshots.rename(snapshot, new_name) |
|
340 |
if new_description is not None: |
|
341 |
snapshot = snapshots.update_description(snapshot, new_description) |
|
338 |
snapshot = snapshots.update(snapshot, name=new_name, |
|
339 |
description=new_description) |
|
342 | 340 |
|
343 | 341 |
data = json.dumps({'snapshot': snapshot_to_dict(snapshot, detail=True)}) |
344 | 342 |
return HttpResponse(data, content_type="application/json", status=200) |
Also available in: Unified diff