~johnsca/charms/trusty/cloudfoundry/better-basic-reconciler-status

« back to all changes in this revision

Viewing changes to charmgen/contexts.py

  • Committer: Benjamin Saller
  • Date: 2014-06-19 01:16:33 UTC
  • Revision ID: benjamin.saller@canonical.com-20140619011633-l5ef5ompcighkxn1
initial version of generator lib + 'charm'

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import pkg_resources
 
2
import yaml
 
3
 
 
4
from charmhelpers.core.services import RelationContext
 
5
 
 
6
 
 
7
class OrchestratorRelation(RelationContext):
 
8
    name = "orchestrator"
 
9
    interface = "orchestrator"
 
10
 
 
11
    @property
 
12
    def required_keys(self):
 
13
        config_yaml = pkg_resources.resource_filename(__name__,
 
14
                                                      '../config.yaml')
 
15
        config = yaml.safe_load(open(config_yaml))
 
16
        return [option for option in config['options']]