Juju Charm - Barbican
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
charm-barbican/charm/reactive/barbican_handlers.py

36 lines
966 B

# this is just for the reactive handlers and calls into the charm.
from __future__ import absolute_import
import charms.reactive as reactive
# This charm's library contains all of the handler code
import charm.openstack.barbican as barbican
# use a synthetic state to ensure that it get it to be installed independent of
# the install hook.
@reactive.when_not('charm.installed')
def install_packages():
barbican.install()
reactive.set_state('charm.installed')
@reactive.when('amqp.connected')
def setup_amqp_req(amqp):
barbican.setup_amqp_req(amqp)
@reactive.when('shared-db.connected')
def setup_database(database):
barbican.setup_database(database)
@reactive.when('identity-service.connected')
def setup_endpoint(keystone):
barbican.setup_endpoint(keystone)
@reactive.when('shared-db.available')
@reactive.when('identity-service.available')
@reactive.when('amqp.available')
def render_stuff(*args):
barbican.render_configs(args)