-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for series upgrade (#60)
* Add support for series upgrade We can't actually pause the service because the series upgrade hooks run on the subordinates before the principal so doing so could interfere with the pod drain process. So instead, we just set a status to let the Juju admin know that it's ok to proceed. Part of https://bugs.launchpad.net/charm-flannel/+bug/186994 * Refactor to use layer:status to prevent statuses from being overwritten
- Loading branch information
Showing
6 changed files
with
33 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.tox/ | ||
__pycache__/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,4 @@ | ||
import sys | ||
from unittest.mock import MagicMock | ||
import charms.unit_test | ||
|
||
|
||
def identity(x): | ||
return x | ||
|
||
|
||
charmhelpers = MagicMock() | ||
sys.modules['charmhelpers'] = charmhelpers | ||
sys.modules['charmhelpers.core'] = charmhelpers.core | ||
sys.modules['charmhelpers.core.hookenv'] = charmhelpers.core.hookenv | ||
sys.modules['charmhelpers.core.host'] = charmhelpers.core.host | ||
sys.modules['charmhelpers.contrib'] = charmhelpers.contrib | ||
sys.modules['charmhelpers.contrib.charmsupport'] = \ | ||
charmhelpers.contrib.charmsupport | ||
|
||
reactive = MagicMock() | ||
sys.modules['charms.reactive'] = reactive | ||
sys.modules['charms.reactive.helpers'] = reactive.helpers | ||
reactive.when.return_value = identity | ||
reactive.when_any.return_value = identity | ||
reactive.when_not.return_value = identity | ||
reactive.hook.return_value = identity | ||
|
||
templating = MagicMock() | ||
sys.modules['charms.templating'] = templating | ||
sys.modules['charms.templating.jinja2'] = templating.jinja2 | ||
charms.unit_test.patch_reactive() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters