2 from http
import HTTPStatus
4 __author__
= "Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>"
7 class FsException(Exception):
8 def __init__(self
, message
, http_code
=HTTPStatus
.INTERNAL_SERVER_ERROR
):
9 self
.http_code
= http_code
10 Exception.__init
__(self
, "storage exception " + message
)
20 def fs_connect(self
, config
):
23 def fs_disconnect(self
):
26 def mkdir(self
, folder
):
27 raise FsException("Method 'mkdir' not implemented")
29 def file_exists(self
, storage
):
30 raise FsException("Method 'file_exists' not implemented")
32 def file_size(self
, storage
):
33 raise FsException("Method 'file_size' not implemented")
35 def file_extract(self
, tar_object
, path
):
36 raise FsException("Method 'file_extract' not implemented")
38 def file_open(self
, storage
, mode
):
39 raise FsException("Method 'file_open' not implemented")
41 def file_delete(self
, storage
, ignore_non_exist
=False):
42 raise FsException("Method 'file_delete' not implemented")