Fixes formatting issue in config.yaml. Updated error message output to be more specific and helpful in action code.
This commit is contained in:
parent
947be72d7e
commit
45d4f2f764
@ -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.'})
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user