X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Ffsbase.py;fp=osm_nbi%2Ffsbase.py;h=7b6cd0c9e342997966982e5b80c4905bc1e7d965;hp=0000000000000000000000000000000000000000;hb=c94c3df90aa64298a7935a80b221f80f3c043260;hpb=22ed16460edb54806e9b957be18cbafb2f63b54d diff --git a/osm_nbi/fsbase.py b/osm_nbi/fsbase.py new file mode 100644 index 0000000..7b6cd0c --- /dev/null +++ b/osm_nbi/fsbase.py @@ -0,0 +1,43 @@ + +from http import HTTPStatus + +__author__ = "Alfonso Tierno " + + +class FsException(Exception): + def __init__(self, message, http_code=HTTPStatus.INTERNAL_SERVER_ERROR): + self.http_code = http_code + Exception.__init__(self, "storage exception " + message) + + +class FsBase(object): + def __init__(self): + pass + + def get_params(self): + return {} + + def fs_connect(self, config): + pass + + def fs_disconnect(self): + pass + + def mkdir(self, folder): + pass + + def file_exists(self, storage): + pass + + def file_size(self, storage): + pass + + def file_extract(self, tar_object, path): + pass + + def file_open(self, storage, mode): + pass + + def file_delete(self, storage, ignore_non_exist=False): + pass +