~lazypower/charms/trusty/keystone/fix_proof

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/core/hookenv.py

  • Committer: Ante Karamatic
  • Date: 2014-02-25 11:34:13 UTC
  • Revision ID: ivoks@ubuntu.com-20140225113413-tlm02x1ibc6xb10d
Rewrite charm to get it more in line with other OpenStack charms.

Added support for contexts and templating. Makes use of charm-helpers
instead of relaying on its own tools (probably could use some additional work).

HA is currently non-functional. ETA for fixing: less than 2 days.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import json
9
9
import yaml
10
10
import subprocess
 
11
import sys
11
12
import UserDict
12
13
from subprocess import CalledProcessError
13
14
 
149
150
    return local_unit().split('/')[0]
150
151
 
151
152
 
 
153
def hook_name():
 
154
    """The name of the currently executing hook"""
 
155
    return os.path.basename(sys.argv[0])
 
156
 
 
157
 
152
158
@cached
153
159
def config(scope=None):
154
160
    """Juju charm configuration"""