Commit 1f9af3ae by Guba Sándor

storage: adding delete_dump

parent 13f7ec45
import json
import os
import subprocess
import re
......@@ -32,6 +33,9 @@ class Disk(object):
def deserialize(cls, desc):
if isinstance(desc, basestring):
desc = json.loads(desc)
return cls(**desc)
def get_desc(self):
from disk import Disk
from storagecelery import celery
from os import path, unlink
def list(dir):
......@@ -20,6 +20,12 @@ def delete(json_data):
def delete_dump():
if path.endswith(".dump") and os.path.isfile(path):
def snapshot(json_data):
disk = Disk.deserialize(json_data)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment