blob: 750028e0d75ca8a9ade664ab6906bbe0b8f0b909 [file] [log] [blame]
Adam Israelf7d9a2b2016-11-10 11:20:46 -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.iperf3')
14
15try:
16 main()
17except Exception as e:
18 action_fail(repr(e))