1
# -*- coding: utf-8 -*-
2
"""Gatekeeper WSGI app entry point.
4
Exposes Swift "Sandbox" (supervised container + tempurls) funtionality
6
Access Swift using the environment configuration options (OS_*)
8
from __future__ import unicode_literals
10
from gatekeeper.datastore import DataStore
11
from gatekeeper.datastore.options import DataStoreOptions
12
from gatekeeper.resources.root import make_app
15
def environment_datastore_factory(klass):
16
"""Rely on ``DataStoreOptions` to use 'OS_*' variables."""
17
# XXX cprov 2014-04-25: it will not work for HP until we
18
# can (artificially) define variable for tenant_id, access_key_id
19
# and secret_key values needed for tempurl.
20
options = DataStoreOptions()
21
return DataStore(options)
24
app = make_app(environment_datastore_factory)