summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Eagan <sean.eagan@att.com>2019-01-18 15:57:52 -0600
committerSean Eagan <sean.eagan@att.com>2019-01-18 15:57:52 -0600
commit6f76f8bec749e0bfa663570312db85d3b1a87183 (patch)
tree1fd9069082ef44fd9ad8f2a392e9f904af93aeba
parente6f294bacb0295c98d588fffb3640e31a9eea6e2 (diff)
bugfix: Looking in wrong place for upgrade options
Fixes a bug where Armada Was looking for upgrade options (force, recreate_pods currently) underneath `upgrade` directly rather than `upgrade.options` where they are defined in the schema. Change-Id: Ia95129a19c87f5d59eaefccd04a7ac9e2acb0b3b
Notes
Notes (review): Code-Review+2: Scott Hussey <sthussey@att.com> Code-Review+1: Nishant Kumar <nishant.e.kumar@ericsson.com> Code-Review+2: Aaron Sheffield <ajs@sheffieldfamily.net> Workflow+1: Aaron Sheffield <ajs@sheffieldfamily.net> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 18 Jan 2019 22:52:15 +0000 Reviewed-on: https://review.openstack.org/631891 Project: openstack/airship-armada Branch: refs/heads/master
-rw-r--r--armada/handlers/chart_deploy.py5
-rw-r--r--armada/tests/unit/handlers/test_armada.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/armada/handlers/chart_deploy.py b/armada/handlers/chart_deploy.py
index 30671fd..203a145 100644
--- a/armada/handlers/chart_deploy.py
+++ b/armada/handlers/chart_deploy.py
@@ -121,8 +121,9 @@ class ChartDeploy(object):
121 121
122 upgrade = chart.get('upgrade', {}) 122 upgrade = chart.get('upgrade', {})
123 disable_hooks = upgrade.get('no_hooks', False) 123 disable_hooks = upgrade.get('no_hooks', False)
124 force = upgrade.get('force', False) 124 options = upgrade.get('options', {})
125 recreate_pods = upgrade.get('recreate_pods', False) 125 force = options.get('force', False)
126 recreate_pods = options.get('recreate_pods', False)
126 127
127 if upgrade: 128 if upgrade:
128 upgrade_pre = upgrade.get('pre', {}) 129 upgrade_pre = upgrade.get('pre', {})
diff --git a/armada/tests/unit/handlers/test_armada.py b/armada/tests/unit/handlers/test_armada.py
index 06321da..d1a35dc 100644
--- a/armada/tests/unit/handlers/test_armada.py
+++ b/armada/tests/unit/handlers/test_armada.py
@@ -437,8 +437,9 @@ class ArmadaHandlerTestCase(base.ArmadaTestCase):
437 if diff: 437 if diff:
438 upgrade = chart.get('upgrade', {}) 438 upgrade = chart.get('upgrade', {})
439 disable_hooks = upgrade.get('no_hooks', False) 439 disable_hooks = upgrade.get('no_hooks', False)
440 force = upgrade.get('force', False) 440 options = upgrade.get('options', {})
441 recreate_pods = upgrade.get( 441 force = options.get('force', False)
442 recreate_pods = options.get(
442 'recreate_pods', False) 443 'recreate_pods', False)
443 444
444 expected_update_release_calls.append( 445 expected_update_release_calls.append(