blob: 52e008947b43e481727e85e965c6e695efba8e52 [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.get-server')
14
15try:
16 main()
17except Exception as e:
18 action_fail(repr(e))