コード例 #1
0
ファイル: settings.py プロジェクト: mpastyl/websocket-console
# or implied, of GRNET S.A.
#

import synnefo.cyclades_settings as cyclades
from synnefo.cyclades_settings import cyclades_services, astakos_services

from synnefo.lib import join_urls
from synnefo.lib.services import get_public_endpoint as endpoint

from django.conf import settings

BASE_PATH = cyclades.BASE_PATH
if not BASE_PATH.startswith("/"):
    BASE_PATH = "/" + BASE_PATH

GLANCE_URL = endpoint(cyclades_services, 'image', 'v1.0').rstrip('/')
COMPUTE_URL = endpoint(cyclades_services, 'compute', 'v2.0').rstrip('/')
USERDATA_URL = endpoint(cyclades_services, 'cyclades_userdata', '').rstrip('/')
ASTAKOS_UI_URL = endpoint(astakos_services, 'astakos_ui', '').rstrip('/')

if cyclades.PROXY_USER_SERVICES:
    ACCOUNT_URL = join_urls('/', cyclades.BASE_ASTAKOS_PROXY_PATH,
                            cyclades.ASTAKOS_ACCOUNTS_PREFIX, 'v1.0')
else:
    ACCOUNT_URL = endpoint(astakos_services, 'account', 'v1.0')

USER_CATALOG_URL = join_urls(ACCOUNT_URL, 'user_catalogs')
FEEDBACK_URL = join_urls(ACCOUNT_URL, 'feedback')

LOGIN_URL = join_urls(ASTAKOS_UI_URL, 'login')
LOGOUT_REDIRECT = LOGIN_URL
コード例 #2
0
ファイル: settings.py プロジェクト: kins299/mycloud
from astakosclient import AstakosClient

from synnefo import cyclades_settings

from synnefo.lib import join_urls
from synnefo.lib.services import get_public_endpoint as endpoint


logger = logging.getLogger(__name__)

BASE_PATH = cyclades.BASE_PATH
if not BASE_PATH.startswith("/"):
    BASE_PATH = "/" + BASE_PATH

cyclades_services = cyclades_settings.cyclades_services

VOLUME_URL = endpoint(cyclades_services, 'volume', 'v2.0').rstrip('/')
GLANCE_URL = endpoint(cyclades_services, 'image', 'v1.0').rstrip('/')
COMPUTE_URL = endpoint(cyclades_services, 'compute', 'v2.0').rstrip('/')
NETWORK_URL = endpoint(cyclades_services, 'network', 'v2.0').rstrip('/')
USERDATA_URL = endpoint(cyclades_services, 'cyclades_userdata', '').rstrip('/')

ACCOUNT_URL = join_urls('/', cyclades.ASTAKOS_ACCOUNT_PROXY_PATH)
AUTH_URL = join_urls('/', cyclades.ASTAKOS_AUTH_PROXY_PATH)

USER_CATALOG_URL = join_urls(ACCOUNT_URL, 'user_catalogs')
FEEDBACK_URL = join_urls(ACCOUNT_URL, 'feedback')

LOGIN_URL = join_urls('/', cyclades.ASTAKOS_UI_PROXY_PATH, 'login')
LOGOUT_REDIRECT = LOGIN_URL
コード例 #3
0
ファイル: settings.py プロジェクト: cstavr/synnefo
# or implied, of GRNET S.A.
#

import synnefo.cyclades_settings as cyclades
from synnefo.cyclades_settings import cyclades_services, astakos_services

from synnefo.lib import join_urls
from synnefo.lib.services import get_public_endpoint as endpoint

from django.conf import settings

BASE_PATH = cyclades.BASE_PATH
if not BASE_PATH.startswith("/"):
    BASE_PATH = "/" + BASE_PATH

GLANCE_URL = endpoint(cyclades_services, 'image', 'v1.0').rstrip('/')
COMPUTE_URL = endpoint(cyclades_services, 'compute', 'v2.0').rstrip('/')
USERDATA_URL = endpoint(cyclades_services, 'cyclades_userdata', '').rstrip('/')
ASTAKOS_UI_URL = endpoint(astakos_services, 'astakos_ui', '').rstrip('/')


if cyclades.PROXY_USER_SERVICES:
    ACCOUNT_URL = join_urls('/', cyclades.BASE_ASTAKOS_PROXY_PATH,
                            cyclades.ASTAKOS_ACCOUNTS_PREFIX, 'v1.0')
else:
    ACCOUNT_URL = endpoint(astakos_services, 'account', 'v1.0')


USER_CATALOG_URL = join_urls(ACCOUNT_URL, 'user_catalogs')
FEEDBACK_URL = join_urls(ACCOUNT_URL, 'feedback')