blob: d1e908f5b5cbdc1c1b2bd204353ce6cdd1dd3538 [file] [log] [blame]
Adam Israel32e2fa52016-12-14 22:50:51 -05001#!/usr/bin/env python3
2import sys
3sys.path.append('lib')
4
5from charms.reactive import main
6from charms.reactive import set_state
7from charmhelpers.core.hookenv import action_fail
8
9"""
10`set_state` only works here because it's flushed to disk inside the `main()`
11loop. remove_state will need to be called inside the action method.
12"""
13set_state('actions.set-server')
14
15try:
16 main()
17except Exception as e:
18 action_fail(repr(e))