3
from charmhelpers import fetch
4
from charmhelpers.core import hookenv
6
from lib.hook import Hook
7
from lib.apt import Apt
10
class UpgradeCharmHook(Hook):
11
"""Execute upgrade-charm hook logic."""
13
def __init__(self, hookenv=hookenv, fetch=fetch, subprocess=subprocess):
14
super(UpgradeCharmHook, self).__init__(hookenv=hookenv)
16
self._subprocess = subprocess
19
# Set APT sources and install Landscape packages
21
hookenv=self._hookenv, fetch=self._fetch,
22
subprocess=self._subprocess)
24
apt.install_packages()