def main(): dev_conf = os.path.join(possible_topdir, 'etc', 'savanna', 'savanna.conf') config_files = None if os.path.exists(dev_conf): config_files = [dev_conf] config.parse_configs(sys.argv[1:], config_files) logging.setup("savanna") if not db_api.setup_db(): raise RuntimeError('Failed to create database!') app = server.make_app() wsgi.server(eventlet.listen((cfg.CONF.host, cfg.CONF.port), backlog=500), app)
def db_handler(): drop_status = db_api.drop_db() print("Dropping database: %s" % map_status(drop_status)) start_status = db_api.setup_db() print("Creating database: %s" % map_status(start_status))
def setUp(self): super(ConductorApiTestCase, self).setUp() db_api.setup_db() self.api = manager.ConductorManager()
def setUp(self): super(ConductorApiTestCase, self).setUp() db_api.setup_db() self.api = conductor.Api(use_local=True)