blob: 9850fe7602a72fad2e32fee1553e5fa010237c53 [file] [log] [blame]
Adam Israel33779282016-10-05 09:08:16 -07001#!/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.ping')
14
15try:
16 main()
17except Exception as e:
18 action_fail(repr(e))