From 357d977a0a65fb79c411b926e8f3929f524afd65 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 11 Mar 2013 16:54:21 +0100 Subject: [PATCH] Register DB options independently of engine We need a script that will just manage database migrations (for bug 1072949), so for this purpose we want to register only the DB options, not all of the engine options. Change-Id: I99bb8d5800741d71572a14c3a5a33dcf0e1b0268 --- heat/common/config.py | 5 ++++- heat/db/__init__.py | 4 ++++ heat/engine/__init__.py | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/heat/common/config.py b/heat/common/config.py index 0b433bfe..e84fc749 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -119,9 +119,12 @@ def register_api_opts(): rpc.set_defaults(control_exchange='heat') +def register_db_opts(): + cfg.CONF.register_opts(db_opts) + + def register_engine_opts(): cfg.CONF.register_opts(engine_opts) - cfg.CONF.register_opts(db_opts) cfg.CONF.register_opts(service_opts) cfg.CONF.register_opts(rpc_opts) rpc.set_defaults(control_exchange='heat') diff --git a/heat/db/__init__.py b/heat/db/__init__.py index 99825399..c43bd22c 100644 --- a/heat/db/__init__.py +++ b/heat/db/__init__.py @@ -15,4 +15,8 @@ '''Database abstraction for Heat.''' +from heat.common import config + +config.register_db_opts() + from heat.db.api import * diff --git a/heat/engine/__init__.py b/heat/engine/__init__.py index 024c1d74..7675cc57 100644 --- a/heat/engine/__init__.py +++ b/heat/engine/__init__.py @@ -15,3 +15,5 @@ from heat.common import config config.register_engine_opts() + +from heat import db # pyflakes_bypass register DB options -- 2.45.2