def __init__(self, path, flags, *mode): self.control = Control.getInstance() self.indirection = Indirection.getInstance() self.logger = logging.getLogger(str(self.__class__.__name__)) self.logger.debug("getting storage name for %s" % (path)) path, name = self.control._breakPath(path) tags = self.indirection._getCanonicalName(path) # get rid of the operators tags = list(set(tags).difference(set(OP))) path = self.control._makeStoragePath(list(tags), name) self.logger.debug("storage name is: %s" % (path)) self.fsopsbaffsfile = FsOpsBaffsFile(path, flags, *mode) # finally, add the file to the database fid, tags = self.indirection.addFile(path, name) self.logger.debug("File added. ID:%s, tags:%s" % (fid, tags))
def __init__(self): self.indirection = Indirection.getInstance() self.fsops = FsOps.getInstance() self.logger = logging.getLogger(str(self.__class__.__name__)) self.logger.debug("Setup!")