diff options
-rw-r--r-- | httpd/keystone.py | 9 | ||||
-rw-r--r-- | keystone/common/sql/migrate_repo/migrate.cfg | 14 | ||||
-rw-r--r-- | keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql | 8 | ||||
-rw-r--r-- | keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql | 28 | ||||
-rw-r--r-- | tox.ini | 3 |
5 files changed, 35 insertions, 27 deletions
diff --git a/httpd/keystone.py b/httpd/keystone.py index 245e67b2..c7373549 100644 --- a/httpd/keystone.py +++ b/httpd/keystone.py @@ -5,6 +5,9 @@ from paste import deploy from keystone.common import environment from keystone.common import logging from keystone import config +from keystone.openstack.common import gettextutils + +gettextutils.install('keystone') LOG = logging.getLogger(__name__) CONF = config.CONF @@ -17,4 +20,8 @@ name = os.path.basename(__file__) if CONF.debug: CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG) -deploy.loadapp('config:%s' % config.find_paste_config(), name=name) +# NOTE(ldbragst): 'application' is required in this context by WSGI spec. +# The following is a reference to Python Paste Deploy documentation +# http://pythonpaste.org/deploy/ +application = deploy.loadapp('config:%s' % config.find_paste_config(), + name=name) diff --git a/keystone/common/sql/migrate_repo/migrate.cfg b/keystone/common/sql/migrate_repo/migrate.cfg index a8be6089..db531bb4 100644 --- a/keystone/common/sql/migrate_repo/migrate.cfg +++ b/keystone/common/sql/migrate_repo/migrate.cfg @@ -5,16 +5,16 @@ repository_id=keystone # The name of the database table used to track the schema version. # This name shouldn't already be used by your project. -# If this is changed once a database is under version control, you'll need to -# change the table name in each database too. +# If this is changed once a database is under version control, you'll need to +# change the table name in each database too. version_table=migrate_version -# When committing a change script, Migrate will attempt to generate the +# When committing a change script, Migrate will attempt to generate the # sql for all supported databases; normally, if one of them fails - probably -# because you don't have that database installed - it is ignored and the -# commit continues, perhaps ending successfully. -# Databases in this list MUST compile successfully during a commit, or the -# entire commit will fail. List the databases your application will actually +# because you don't have that database installed - it is ignored and the +# commit continues, perhaps ending successfully. +# Databases in this list MUST compile successfully during a commit, or the +# entire commit will fail. List the databases your application will actually # be using to ensure your updates to that database work properly. # This must be a list; example: ['postgres','sqlite'] required_dbs=[] diff --git a/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql b/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql index cdd5764d..d3ebe92a 100644 --- a/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql +++ b/keystone/common/sql/migrate_repo/versions/002_sqlite_downgrade.sql @@ -1,8 +1,8 @@ drop table token; CREATE TABLE token ( - id VARCHAR(64) NOT NULL, - expires DATETIME, - extra TEXT, - PRIMARY KEY (id) + id VARCHAR(64) NOT NULL, + expires DATETIME, + extra TEXT, + PRIMARY KEY (id) ); diff --git a/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql b/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql index a5c0546e..41225dae 100644 --- a/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql +++ b/keystone/common/sql/migrate_repo/versions/002_sqlite_upgrade.sql @@ -1,25 +1,25 @@ CREATE TABLE token_backup ( - id_hash VARCHAR(64) NOT NULL, - id VARCHAR(1024), - expires DATETIME, - extra TEXT, - PRIMARY KEY (id_hash) + id_hash VARCHAR(64) NOT NULL, + id VARCHAR(1024), + expires DATETIME, + extra TEXT, + PRIMARY KEY (id_hash) ); insert into token_backup - select id as old_id, - '', - expires as old_expires, - extra as old_extra from token; + select id as old_id, + '', + expires as old_expires, + extra as old_extra from token; drop table token; CREATE TABLE token ( - id_hash VARCHAR(64) NOT NULL, - id VARCHAR(1024), - expires DATETIME, - extra TEXT, - PRIMARY KEY (id_hash) + id_hash VARCHAR(64) NOT NULL, + id VARCHAR(1024), + expires DATETIME, + extra TEXT, + PRIMARY KEY (id_hash) ); insert into token select * from token_backup; @@ -23,7 +23,8 @@ commands = downloadcache = ~/cache/pip [testenv:cover] -setenv = NOSE_WITH_COVERAGE=1 +setenv = VIRTUAL_ENV={envdir} + NOSE_WITH_COVERAGE=1 NOSE_COVER_HTML=1 NOSE_COVER_HTML_DIR={toxinidir}/cover |