~jillrouleau/+junk/collectd-srv-framework

« back to all changes in this revision

Viewing changes to hooks/collectd_helpers.py

  • Committer: Jill Rouleau
  • Date: 2015-04-22 00:17:38 UTC
  • Revision ID: jill.rouleau@canonical.com-20150422001738-dxsruj6ev8s269h3
Fix template to support tuple, underscore instead of dash

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
        super(CollectdGraphiteRelation, self).get_data()
27
27
        if not hookenv.relation_ids(self.name):
28
28
            return
29
 
 
30
29
        self['carbon_host'] = hookenv.relation_get('carbon_host'),
31
 
        print "collectds host value is", hookenv.relation_get('carbon_host'),
32
 
 
33
 
    def provided_data(self):
34
 
        super(CollectdGraphiteRelation, self).provided_data()
35
 
        config = hookenv.config()
36
 
        if not hookenv.relation_id(self.name):
 
30
 
 
31
        self['carbon_server'] = self[self.name]
 
32
 
 
33
    def provide_data(self):
 
34
        super(CollectdGraphiteRelation, self).provide_data()
 
35
        if not hookenv.relation_ids(self.name):
37
36
            return
38
37
        return {
39
38
            'schema_name': hookenv.config('schema_name'),
41
40
 
42
41
 
43
42
 
44
 
 
45
 
 
46
43
"""
47
44
 
48
45
class CollectdAgentRelation(helpers.RelationContext):