Commit 3e941c3a authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Add ASTAKOS_URL to pithos.api.settings

parent 134e03c2
......@@ -62,7 +62,7 @@ from pithos.api.util import (
)
from pithos.api.settings import (UPDATE_MD5, TRANSLATE_UUIDS,
SERVICE_TOKEN)
SERVICE_TOKEN, ASTAKOS_URL)
from pithos.backends.base import (
NotAllowedError, QuotaError, ContainerNotEmpty, ItemNotExists,
......@@ -78,7 +78,7 @@ logger = logging.getLogger(__name__)
def get_uuids(names):
try:
url = settings.ASTAKOS_URL + "/service/api/user_catalogs"
url = ASTAKOS_URL + "/service/api/user_catalogs"
uuids = _get_uuids(SERVICE_TOKEN, names, url=url)
except Exception, e:
logger.exception(e)
......
#coding=utf8
from django.conf import settings
ASTAKOS_URL = getattr(settings, "ASTAKOS_URL",
"https://accounts.example.synnefo.org/")
COOKIE_NAME = getattr(settings, 'PITHOS_ASTAKOS_COOKIE_NAME', '_pithos2_a')
# SQLAlchemy (choose SQLite/MySQL/PostgreSQL).
......
......@@ -57,6 +57,7 @@ from pithos.api.settings import (BACKEND_DB_MODULE, BACKEND_DB_CONNECTION,
BACKEND_QUEUE_EXCHANGE, USE_QUOTAHOLDER,
QUOTAHOLDER_URL, QUOTAHOLDER_TOKEN,
QUOTAHOLDER_POOLSIZE,
ASTAKOS_URL,
BACKEND_QUOTA, BACKEND_VERSIONING,
BACKEND_FREE_VERSIONING, BACKEND_POOL_SIZE,
COOKIE_NAME, USER_CATALOG_URL,
......@@ -1002,7 +1003,7 @@ def update_response_headers(request, response):
def get_pithos_usage(token):
"""Get Pithos Usage from astakos."""
astakos_url = settings.ASTAKOS_URL + "im/authenticate"
astakos_url = ASTAKOS_URL + "im/authenticate"
user_info = user_for_token(token, astakos_url, usage=True)
usage = user_info.get("usage", [])
for u in usage:
......
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