Change the copyright from GPL-3 to Apache-2.0
[osm/devops.git] / builds / vpe-router / actions / connect-domains
1 #!/usr/bin/env python3
2
3 # Load modules from $CHARM_DIR/lib
4 import sys
5 sys.path.append('lib')
6
7 from charms.reactive import main
8 from charms.reactive import set_state
9 from charmhelpers.core.hookenv import action_fail
10
11 """
12 `set_state` only works here because it's flushed to disk inside the `main()`
13 loop. remove_state will need to be called inside the action method.
14 """
15 set_state('vpe.connect-domains')
16
17 try:
18     main()
19 except Exception as e:
20     action_fail(repr(e))