Fixes formatting issue in config.yaml. Updated error message output to be more specific and helpful in action code.

This commit is contained in:
David Della Vecchia 2015-08-14 15:55:32 +00:00
parent 947be72d7e
commit 45d4f2f764
3 changed files with 6 additions and 5 deletions

View File

@ -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.'})

View File

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

View File

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