Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
361c0343
Commit
361c0343
authored
Dec 20, 2012
by
Sofia Papagiannaki
Browse files
Pithos backend should send the token to the quotaholder
parent
0279389f
Changes
4
Hide whitespace changes
Inline
Side-by-side
snf-pithos-app/pithos/api/settings.py
View file @
361c0343
...
...
@@ -46,9 +46,9 @@ BACKEND_QUOTA = getattr(
BACKEND_VERSIONING
=
getattr
(
settings
,
'PITHOS_BACKEND_VERSIONING'
,
'auto'
)
BACKEND_FREE_VERSIONING
=
getattr
(
settings
,
'PITHOS_BACKEND_FREE_VERSIONING'
,
True
)
PITHOS_QUOTAHOLDER_URL
=
getattr
(
settings
,
'PITHOS_QUOTAHOLDER_URL'
,
'http://127.0.0.1/api/quotaholder/v
'
)
# Set the quota holder component URI
QUOTAHOLDER_URL
=
getattr
(
settings
,
'PITHOS_QUOTAHOLDER_URL'
,
''
)
QUOTAHOLDER_TOKEN
=
getattr
(
settings
,
'PITHOS_QUOTAHOLDER_TOKEN'
,
'
'
)
# Update object checksums when using hashmaps.
UPDATE_MD5
=
getattr
(
settings
,
'PITHOS_UPDATE_MD5'
,
True
)
...
...
snf-pithos-app/pithos/api/util.py
View file @
361c0343
...
...
@@ -61,8 +61,8 @@ from pithos.api.settings import (BACKEND_DB_MODULE, BACKEND_DB_CONNECTION,
BACKEND_BLOCK_UMASK
,
BACKEND_QUEUE_MODULE
,
BACKEND_QUEUE_HOSTS
,
BACKEND_QUEUE_EXCHANGE
,
PITHOS_
QUOTAHOLDER_
URL
,
BACKEND_QUOTA
,
BACKEND_VERSIONING
,
QUOTAHOLDER_URL
,
QUOTAHOLDER_
TOKEN
,
BACKEND_QUOTA
,
BACKEND_VERSIONING
,
BACKEND_FREE_VERSIONING
,
AUTHENTICATION_URL
,
AUTHENTICATION_USERS
,
SERVICE_TOKEN
,
COOKIE_NAME
)
...
...
@@ -863,7 +863,8 @@ _pithos_backend_pool = PithosBackendPool(size=POOL_SIZE,
queue_module
=
BACKEND_QUEUE_MODULE
,
queue_hosts
=
BACKEND_QUEUE_HOSTS
,
queue_exchange
=
BACKEND_QUEUE_EXCHANGE
,
quotaholder_url
=
PITHOS_QUOTAHOLDER_URL
,
quotaholder_url
=
QUOTAHOLDER_URL
,
quotaholder_token
=
QUOTAHOLDER_TOKEN
,
free_versioning
=
BACKEND_FREE_VERSIONING
)
...
...
snf-pithos-backend/pithos/backends/modular.py
View file @
361c0343
...
...
@@ -143,8 +143,8 @@ class ModularBackend(BaseBackend):
def
__init__
(
self
,
db_module
=
None
,
db_connection
=
None
,
block_module
=
None
,
block_path
=
None
,
block_umask
=
None
,
queue_module
=
None
,
queue_hosts
=
None
,
qu
eue_exchange
=
None
,
quotaholder_
url
=
None
,
queue_module
=
None
,
queue_hosts
=
None
,
queue_exchange
=
None
,
qu
otaholder_url
=
None
,
quotaholder_
token
=
None
,
free_versioning
=
True
):
db_module
=
db_module
or
DEFAULT_DB_MODULE
db_connection
=
db_connection
or
DEFAULT_DB_CONNECTION
...
...
@@ -202,7 +202,8 @@ class ModularBackend(BaseBackend):
self
.
queue
=
NoQueue
()
self
.
quotaholder_url
=
quotaholder_url
self
.
quotaholder
=
QuotaholderClient
(
quotaholder_url
)
self
.
quotaholder_token
=
quotaholder_token
self
.
quotaholder
=
QuotaholderClient
(
quotaholder_url
,
quotaholder_token
)
self
.
serials
=
[]
self
.
messages
=
[]
...
...
snf-pithos-backend/pithos/backends/util.py
View file @
361c0343
...
...
@@ -44,7 +44,8 @@ class PithosBackendPool(ObjectPool):
def
__init__
(
self
,
size
=
None
,
db_module
=
None
,
db_connection
=
None
,
block_module
=
None
,
block_path
=
None
,
block_umask
=
None
,
queue_module
=
None
,
queue_hosts
=
None
,
queue_exchange
=
None
,
quotaholder_url
=
None
,
queue_exchange
=
None
,
quotaholder_url
=
None
,
quotaholder_token
=
None
,
free_versioning
=
True
):
super
(
PithosBackendPool
,
self
).
__init__
(
size
=
size
)
self
.
db_module
=
db_module
...
...
@@ -55,7 +56,8 @@ class PithosBackendPool(ObjectPool):
self
.
queue_module
=
queue_module
self
.
queue_hosts
=
queue_hosts
self
.
queue_exchange
=
queue_exchange
self
.
quotaholder_url
=
quotaholder_url
self
.
quotaholder_url
=
quotaholder_url
self
.
quotaholder_token
=
quotaholder_token
self
.
free_versioning
=
free_versioning
def
_pool_create
(
self
):
...
...
@@ -68,6 +70,7 @@ class PithosBackendPool(ObjectPool):
queue_hosts
=
self
.
queue_hosts
,
queue_exchange
=
self
.
queue_exchange
,
quotaholder_url
=
self
.
quotaholder_url
,
quotaholder_token
=
self
.
quotaholder_token
,
free_versioning
=
self
.
free_versioning
)
backend
.
_real_close
=
backend
.
close
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment