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
This commit is contained in:
apetrich 2020-03-19 14:01:29 +01:00
parent dbfc0bea22
commit a594a2523e
1 changed files with 8 additions and 0 deletions

View File

@ -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(