
Juju 2.0 provides support for display of the version of an application deployed by a charm in juju status. Insert the os_application_version_set function into the existing assess_status function - this gets called after all hook executions, and periodically after that, so any changes in package versions due to normal system updates will also be reflected in the status output. This review also includes a resync of charm-helpers to pickup hookenv and contrib.openstack support for this feature. Change-Id: I5734e87d39e62c1fb791b0b79ff216e30a784d1f
14 lines
399 B
Python
14 lines
399 B
Python
import subprocess
|
|
|
|
|
|
def persistent_modprobe(module):
|
|
"""Load a kernel module and configure for auto-load on reboot."""
|
|
with open('/etc/modules', 'r+') as modules:
|
|
if module not in modules.read():
|
|
modules.write(module)
|
|
|
|
|
|
def update_initramfs(version='all'):
|
|
"""Updates an initramfs image."""
|
|
return subprocess.check_call(["update-initramfs", "-k", version, "-u"])
|