Commit 8b41117d authored by Chrysostomos Nanakos's avatar Chrysostomos Nanakos
Browse files

pithos: Remove unused block path and umask variables

parent 2e609c2c
......@@ -10,7 +10,6 @@
# Block storage.
#PITHOS_BACKEND_BLOCK_MODULE = 'pithos.backends.lib.hashfiler'
#PITHOS_BACKEND_BLOCK_UMASK = 0o022
# Default setting for new accounts.
#PITHOS_BACKEND_VERSIONING = 'auto'
......
......@@ -34,8 +34,7 @@ from snf_django.lib import api
from snf_django.lib.api import faults, utils
from pithos.api.settings import (BACKEND_DB_MODULE, BACKEND_DB_CONNECTION,
BACKEND_BLOCK_MODULE, BACKEND_BLOCK_PATH,
BACKEND_BLOCK_UMASK,
BACKEND_BLOCK_MODULE,
BACKEND_QUEUE_MODULE, BACKEND_QUEUE_HOSTS,
BACKEND_QUEUE_EXCHANGE,
ASTAKOSCLIENT_POOLSIZE,
......@@ -1023,8 +1022,6 @@ BACKEND_KWARGS = dict(
db_module=BACKEND_DB_MODULE,
db_connection=BACKEND_DB_CONNECTION,
block_module=BACKEND_BLOCK_MODULE,
block_path=BACKEND_BLOCK_PATH,
block_umask=BACKEND_BLOCK_UMASK,
block_size=BACKEND_BLOCK_SIZE,
hash_algorithm=BACKEND_HASH_ALGORITHM,
queue_module=BACKEND_QUEUE_MODULE,
......
......@@ -22,14 +22,10 @@ from mapper import Mapper
class Store(object):
"""Store.
Required constructor parameters: path, block_size, hash_algorithm,
umask, blockpool, mappool.
blockpool, mappool.
"""
def __init__(self, **params):
umask = params['umask']
if umask is not None:
os.umask(umask)
pb = {'blocksize': params['block_size'],
'hashtype': params['hash_algorithm'],
'archipelago_cfile': params['archipelago_cfile'],
......
......@@ -86,8 +86,6 @@ class HashMap(list):
DEFAULT_DB_MODULE = 'pithos.backends.lib.sqlalchemy'
DEFAULT_DB_CONNECTION = 'sqlite:///backend.db'
DEFAULT_BLOCK_MODULE = 'pithos.backends.lib.hashfiler'
DEFAULT_BLOCK_PATH = 'data/'
DEFAULT_BLOCK_UMASK = 0o022
DEFAULT_BLOCK_SIZE = 4 * 1024 * 1024 # 4MB
DEFAULT_HASH_ALGORITHM = 'sha256'
# DEFAULT_QUEUE_MODULE = 'pithos.backends.lib.rabbitmq'
......@@ -221,8 +219,7 @@ class ModularBackend(BaseBackend):
"""
def __init__(self, db_module=None, db_connection=None,
block_module=None, block_path=None, block_umask=None,
block_size=None, hash_algorithm=None,
block_module=None, block_size=None, hash_algorithm=None,
queue_module=None, queue_hosts=None, queue_exchange=None,
astakos_auth_url=None, service_token=None,
astakosclient_poolsize=None,
......@@ -239,8 +236,6 @@ class ModularBackend(BaseBackend):
db_module = db_module or DEFAULT_DB_MODULE
db_connection = db_connection or DEFAULT_DB_CONNECTION
block_module = block_module or DEFAULT_BLOCK_MODULE
block_path = block_path or DEFAULT_BLOCK_PATH
block_umask = block_umask or DEFAULT_BLOCK_UMASK
block_params = block_params or DEFAULT_BLOCK_PARAMS
block_size = block_size or DEFAULT_BLOCK_SIZE
hash_algorithm = hash_algorithm or DEFAULT_HASH_ALGORITHM
......@@ -306,10 +301,8 @@ class ModularBackend(BaseBackend):
self.ioctx_pool = glue.WorkerGlue.ioctx_pool
self.block_module = load_module(block_module)
self.block_params = block_params
params = {'path': block_path,
'block_size': self.block_size,
params = {'block_size': self.block_size,
'hash_algorithm': self.hash_algorithm,
'umask': block_umask,
'archipelago_cfile': archipelago_conf_file}
params.update(self.block_params)
self.store = self.block_module.Store(**params)
......
......@@ -24,8 +24,7 @@ USAGE_LIMIT = 500
class PithosBackendPool(ObjectPool):
def __init__(self, size=None, db_module=None, db_connection=None,
block_module=None, block_path=None, block_umask=None,
block_size=None, hash_algorithm=None,
block_module=None, block_size=None, hash_algorithm=None,
queue_module=None, queue_hosts=None,
queue_exchange=None, free_versioning=True,
astakos_auth_url=None, service_token=None,
......@@ -44,8 +43,6 @@ class PithosBackendPool(ObjectPool):
self.db_module = db_module
self.db_connection = db_connection
self.block_module = block_module
self.block_path = block_path
self.block_umask = block_umask
self.block_size = block_size
self.hash_algorithm = hash_algorithm
self.queue_module = queue_module
......@@ -71,8 +68,6 @@ class PithosBackendPool(ObjectPool):
db_module=self.db_module,
db_connection=self.db_connection,
block_module=self.block_module,
block_path=self.block_path,
block_umask=self.block_umask,
block_size=self.block_size,
hash_algorithm=self.hash_algorithm,
queue_module=self.queue_module,
......
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 to comment