From a594a2523e0b19100f3699f502cf617405698fc7 Mon Sep 17 00:00:00 2001 From: apetrich Date: Thu, 19 Mar 2020 14:01:29 +0100 Subject: [PATCH] Keep openstack mapping_path option Removal of this option breaks backwards compatibility When we moved the openstack actions to mistral-extra this option was removed. This adds it back if mistral-extra is installed otherwise it keeps the same Change-Id: I3dbf26e3fdf2d2bd17d99b678172bd9ac02a7323 Closes-bug: #1866621 --- mistral/db/sqlalchemy/migration/cli.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mistral/db/sqlalchemy/migration/cli.py b/mistral/db/sqlalchemy/migration/cli.py index a57c8b139..b08d92da6 100644 --- a/mistral/db/sqlalchemy/migration/cli.py +++ b/mistral/db/sqlalchemy/migration/cli.py @@ -127,6 +127,14 @@ command_opt = cfg.SubCommandOpt('command', CONF.register_cli_opt(command_opt) +# To Keep backwards compatibility we need to accept mapping path +# from mistral-extra if present +try: + import mistral_extra.config as extra_conf + CONF.register_cli_opt(extra_conf.os_actions_mapping_path) +except ImportError: + LOG.debug("Mistral-extra not installed") + def main(): config = alembic_cfg.Config(