Change the copyright from GPL-3 to Apache-2.0
[osm/devops.git] / builds / vpe-router / hooks / upgrade-charm
1 #!/usr/bin/env python3
2
3 # Load modules from $CHARM_DIR/lib
4 import os
5 import sys
6 sys.path.append('lib')
7
8 # This is an upgrade-charm context, make sure we install latest deps
9 if not os.path.exists('wheelhouse/.upgrade'):
10     open('wheelhouse/.upgrade', 'w').close()
11     if os.path.exists('wheelhouse/.bootstrapped'):
12         os.unlink('wheelhouse/.bootstrapped')
13 else:
14     os.unlink('wheelhouse/.upgrade')
15
16 from charms.layer import basic
17 basic.bootstrap_charm_deps()
18 basic.init_config_states()
19
20
21 # This will load and run the appropriate @hook and other decorated
22 # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive,
23 # and $CHARM_DIR/hooks/relations.
24 #
25 # See https://jujucharms.com/docs/stable/authors-charm-building
26 # for more information on this pattern.
27 from charms.reactive import main
28 main()