Skip to content
This repository was archived by the owner on Jul 9, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions reactive/charms_openstack_handlers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# handle the update-status hook for all openstack charms

from __future__ import absolute_import

import charms.reactive as reactive
import charmhelpers.core.hookenv as hookenv

import charms_openstack.charm as charm


@reactive.hook('update-status')
def update_status():
"""Use the update-status hook to run the assess_status() function for the
unit.

This runs, via the singleton, the assess_status() on the derived class,
which is auto-instantiated according the the release.

To deactivate this function override the assess_status in the derived class
to a NOP.
"""
charm.OpenStackCharm.singleton.assess_status()