diff options
author | Samuel Munilla <smunilla@redhat.com> | 2016-02-29 14:32:56 -0500 |
---|---|---|
committer | Samuel Munilla <smunilla@redhat.com> | 2016-03-23 13:06:16 -0400 |
commit | 9748415c1be0c0e15b2fb3c37a0d17e0f4672005 (patch) | |
tree | 636ed912d06d3e9e0a4a3b1a778cc4430b33dd84 /utils/src/ooinstall | |
parent | 5d4c9a01cdd4bbb76bf644549ce6efc2ac0cfc8a (diff) | |
download | openshift-9748415c1be0c0e15b2fb3c37a0d17e0f4672005.tar.gz openshift-9748415c1be0c0e15b2fb3c37a0d17e0f4672005.tar.bz2 openshift-9748415c1be0c0e15b2fb3c37a0d17e0f4672005.tar.xz openshift-9748415c1be0c0e15b2fb3c37a0d17e0f4672005.zip |
a-o-i: More flexible upgrade mappings
Change the upgrade logic to allow for more than two types of upgrades.
Diffstat (limited to 'utils/src/ooinstall')
-rw-r--r-- | utils/src/ooinstall/cli_installer.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index c53ca7b18..4f7af0465 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -762,6 +762,9 @@ def uninstall(ctx): oo_cfg = ctx.obj['oo_cfg'] verbose = ctx.obj['verbose'] + upgrade_mappings = {'3.0':'3.1', + '3.1':'3.2'} + if len(oo_cfg.hosts) == 0: click.echo("No hosts defined in: %s" % oo_cfg.config_path) sys.exit(1) @@ -802,8 +805,7 @@ def upgrade(ctx): resp = click.prompt("(1) Update to latest {} (2) Migrate to next relese".format(old_version)) if resp == "2": - # TODO: Make this a lot more flexible - new_version = "3.1" + new_version = upgrade_mappings.get(old_version) # Update config to reflect the version we're targetting, we'll write # to disk once ansible completes successfully, not before. if oo_cfg.settings['variant'] == 'enterprise': |