Ubuntu Pastebin

Paste from Cory at Wed, 1 Feb 2017 20:53:44 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# reactive/my_charm.py

from charmhelpers.core.hookenv import status_set, log
from charms.reactive import hook


@hook('upgrade-charm')
def replace_war_on_upgrade():
    log("Upgrading Resource")
    status_set('maintenance', "Upgrading resource")
    install_copy_war()
    status_set('active', "Resource upgraded")
Download as text