def main(): # NOTE(jaosorior): This is needed in order for db-sync to also register the # keystonemiddleware options. Those options are used by clients that need a # keystone session in order to be able to register their actions. # This can be removed when mistral moves out of using keystonemiddleware in # favor of keystoneauth1. for group, opts in keystonemw_opts.list_auth_token_opts(): CONF.register_opts(opts, group=group) CONF.register_cli_opt(config.os_actions_mapping_path) logging.register_options(CONF) config.parse_args() if len(CONF.config_file) == 0: print("Usage: sync_db --config-file <path-to-config-file>") return exit(1) logging.setup(CONF, 'Mistral') LOG.info("Starting db_sync") LOG.debug("Setting up db") db_api.setup_db() LOG.debug("populating db") action_manager.sync_db() workflows.sync_db()
def heavy_init(cls): """Runs a long initialization (runs once by class) and can be extended by child classes. """ cfg.CONF.set_default('connection', 'sqlite://', group='database') cfg.CONF.set_default('max_overflow', -1, group='database') cfg.CONF.set_default('max_pool_size', 1000, group='database') db_api_v2.setup_db() action_manager.sync_db()
def main(): config.parse_args() if len(CONF.config_file) == 0: print("Usage: sync_db --config-file <path-to-config-file>") return exit(1) logging.setup(CONF, 'Mistral') db_api.setup_db() action_manager.sync_db() workflows.sync_db()
def main(): config.parse_args() if len(CONF.config_file) == 0: print "Usage: sync_db --config-file <path-to-config-file>" return exit(1) logging.setup('Mistral') db_api.setup_db() action_manager.sync_db() workflows.sync_db()
def heavy_init(cls): """Runs a long initialization (runs once by class) and can be extended by child classes. """ # If using sqlite, change to memory. The default is file based. if cfg.CONF.database.connection.startswith('sqlite'): cfg.CONF.set_default('connection', 'sqlite://', group='database') cfg.CONF.set_default('max_overflow', -1, group='database') cfg.CONF.set_default('max_pool_size', 1000, group='database') db_api_v2.setup_db() action_manager.sync_db()
def heavy_init(cls): """Runs a long initialization. This method runs long initialization once by class and can be extended by child classes. """ # If using sqlite, change to memory. The default is file based. if cfg.CONF.database.connection.startswith('sqlite'): cfg.CONF.set_default('connection', 'sqlite://', group='database') cfg.CONF.set_default("openstack_actions_mapping_path", "tests/resources/openstack/test_mapping.json") cfg.CONF.set_default('max_overflow', -1, group='database') cfg.CONF.set_default('max_pool_size', 1000, group='database') db_api.setup_db() action_manager.sync_db()
def heavy_init(cls): """Runs a long initialization. This method runs long initialization once by class and can be extended by child classes. """ # If using sqlite, change to memory. The default is file based. if cfg.CONF.database.connection.startswith('sqlite'): cfg.CONF.set_default('connection', 'sqlite://', group='database') # This option is normally registered in sync_db.py so we have to # register it here specifically for tests. cfg.CONF.register_opt(config.os_actions_mapping_path) cfg.CONF.set_default('openstack_actions_mapping_path', 'tests/resources/openstack/test_mapping.json') cfg.CONF.set_default('max_overflow', -1, group='database') cfg.CONF.set_default('max_pool_size', 1000, group='database') db_api.setup_db() action_manager.sync_db()
def do_populate(config, cmd): action_manager.sync_db() workflows.sync_db()
def do_populate(config, cmd): LOG.info("Populating db") action_manager.sync_db() workflows.sync_db()
def do_populate_actions(config, cmd): LOG.info("Populating actions db") action_manager.sync_db()