| Marco Ceppi | c5a5e53 | 2016-03-28 15:21:34 -0400 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
| 2 | import sys |
| 3 | sys.path.append('lib') |
| 4 | |
| 5 | from charms.reactive import main |
| 6 | from charms.reactive import set_state |
| 7 | from charmhelpers.core.hookenv import action_fail |
| 8 | |
| 9 | |
| 10 | """ |
| 11 | `set_state` only works here because it's flushed to disk inside the `main()` |
| 12 | loop. remove_state will need to be called inside the action method. |
| 13 | """ |
| 14 | set_state('vpe.delete-domain-connection') |
| 15 | |
| 16 | try: |
| 17 | main() |
| 18 | except Exception as e: |
| 19 | action_fail(repr(e)) |