~allanlesage/uci-engine/coverage-extractor

« back to all changes in this revision

Viewing changes to gatekeeper/gatekeeper/wsgi.py

  • Committer: Celso Providelo
  • Date: 2014-04-25 20:53:37 UTC
  • mto: This revision was merged to the branch mainline in revision 456.
  • Revision ID: celso.providelo@canonical.com-20140425205337-980ks06z8bjnv43u
Fix deployment configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
"""Gatekeeper WSGI app entry point.
 
3
 
 
4
Exposes Swift "Sandbox" (supervised container + tempurls) funtionality
 
5
via a REST API.
 
6
Access Swift using the environment configuration options (OS_*)
 
7
"""
 
8
from __future__ import unicode_literals
 
9
 
 
10
from gatekeeper.datastore import DataStore
 
11
from gatekeeper.datastore.options import DataStoreOptions
 
12
from gatekeeper.resources.root import make_app
 
13
 
 
14
 
 
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)
 
22
 
 
23
 
 
24
app = make_app(environment_datastore_factory)