From 45d4f2f764b87c9ab296b21f19898b93485f2375 Mon Sep 17 00:00:00 2001 From: David Della Vecchia Date: Fri, 14 Aug 2015 15:55:32 +0000 Subject: [PATCH] Fixes formatting issue in config.yaml. Updated error message output to be more specific and helpful in action code. --- actions/openstack_upgrade.py | 3 ++- config.yaml | 6 +++--- unit_tests/test_actions_openstack_upgrade.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/actions/openstack_upgrade.py b/actions/openstack_upgrade.py index b8b5c2e5..b4331753 100755 --- a/actions/openstack_upgrade.py +++ b/actions/openstack_upgrade.py @@ -53,7 +53,8 @@ def openstack_upgrade(): config_changed() else: - action_set({'outcome': 'invalid config, skipped upgrade.'}) + action_set({'outcome': 'action-managed-upgrade config is ' + 'False, skipped upgrade.'}) else: action_set({'outcome': 'no upgrade available.'}) diff --git a/config.yaml b/config.yaml index 79478189..df71fcfd 100644 --- a/config.yaml +++ b/config.yaml @@ -237,9 +237,9 @@ options: type: boolean default: False description: | - If True enables openstack upgrades for this charm via juju actions. + If True enables openstack upgrades for this charm via juju actions. You will still need to set the config variable for the openstack version but instead of an upgrade running automatically across all units, it will - wait for you to execute the openstack-upgrade action for this charm on each + wait for you to execute the openstack-upgrade action for this charm on each unit. If False it will revert to existing behavior of upgrading all units on - config change. + config change. diff --git a/unit_tests/test_actions_openstack_upgrade.py b/unit_tests/test_actions_openstack_upgrade.py index f0f40361..fed22ec2 100644 --- a/unit_tests/test_actions_openstack_upgrade.py +++ b/unit_tests/test_actions_openstack_upgrade.py @@ -57,7 +57,7 @@ class TestGlanceUpgradeActions(CharmTestCase): openstack_upgrade.openstack_upgrade() - msg = ('invalid config, skipped upgrade.') + msg = ('action-managed-upgrade config is False, skipped upgrade.') action_set.assert_called_with({'outcome': msg}) self.assertFalse(do_openstack_upgrade.called)