billingstack/tools/dev_resync_db.py
Endre Karlson f4ac9a1484 Major changes on CRUD API
* Introduce message queue / RPC into BS
* Request context available under request.ctxt
* Tests fixed
* Pass down ctxt to storage api
* Remove ID as filter arguments and make it all use criterion for filters
* Move storage api to a new Central service
2013-03-03 22:04:54 +00:00

30 lines
663 B
Python

#!/usr/bin/env python
import sys
from oslo.config import cfg
from billingstack.openstack.common import log as logging
from billingstack import service
from billingstack.storage import get_connection
LOG = logging.getLogger(__name__)
cfg.CONF.import_opt('storage_driver', 'billingstack.central',
group='service:central')
cfg.CONF.import_opt('database_connection', 'billingstack.storage.impl_sqlalchemy',
group='storage:sqlalchemy')
if __name__ == '__main__':
service.prepare_service(sys.argv)
conn = get_connection()
LOG.info("Re-Syncing database")
conn.teardown_schema()
conn.setup_schema()