~bigdata-dev/charms/trusty/hdp-accumulo/trunk

« back to all changes in this revision

Viewing changes to hooks/upgrade-charm.py

  • Committer: amir sanjar
  • Date: 2014-09-21 01:58:01 UTC
  • Revision ID: amir.sanjar@canonical.com-20140921015801-y1izcbpyvus287j9
addign relations

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
 
3
 
import os
4
 
import sys
5
 
 
6
 
sys.path.insert(0, os.path.join(os.environ['CHARM_DIR'], 'lib'))
7
 
 
8
 
from charmhelpers.core import (
9
 
    hookenv,
10
 
    host,
11
 
)
12
 
 
13
 
hooks = hookenv.Hooks()
14
 
log = hookenv.log
15
 
 
16
 
SERVICE = 'hdp-tez'
17
 
 
18
 
 
19
 
@hooks.hook('upgrade-charm')
20
 
def upgrade_charm():
21
 
    log('Upgrading hdp-tez')
22
 
 
23
 
 
24
 
if __name__ == "__main__":
25
 
    # execute a hook based on the name the program is called by
26
 
    hooks.execute(sys.argv)