From a5f3ad5700aa766fec99a184bae1d732d0754491 Mon Sep 17 00:00:00 2001 From: viswesn Date: Wed, 2 Nov 2016 17:11:13 +0530 Subject: [PATCH] Support of HACluster added --- src/reactive/murano_handlers.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/reactive/murano_handlers.py b/src/reactive/murano_handlers.py index e13aae4..55ccf5a 100644 --- a/src/reactive/murano_handlers.py +++ b/src/reactive/murano_handlers.py @@ -46,15 +46,28 @@ def render_config(*args): murano.render_novarc_config(args) reactive.set_state('config.rendered') + # db_sync checks if sync has been done so rerunning is a noop @reactive.when('config.rendered') def init_db(): with charm.provide_charm_instance() as charm_class: charm_class.db_sync() + @reactive.when_not('io-murano.imported') @reactive.when(*COMPLETE_INTERFACE_STATES) @reactive.when('config.rendered') def import_io_murano(*args): murano.import_io_murano() reactive.set_state('io-murano.imported') + + +@reactive.when('ha.connected') +def cluster_connected(hacluster): + murano.configure_ha_resources(hacluster) + murano.assess_status() + + +@reactive.hook('upgrade-charm') +def upgrade_charm(): + murano.install()