~fginther/charms/trusty/jenkaas-slave/add-relation

« back to all changes in this revision

Viewing changes to hooks/services.py

  • Committer: Francis Ginther
  • Date: 2015-06-17 13:34:28 UTC
  • Revision ID: francis.ginther@canonical.com-20150617133428-if1t94ewef75xt3v
Refactor out the __init__ from SlaveToMasterConsumer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
 
19
19
class SlaveToMasterConsumer(RelationContext):
20
 
    """Provide data on the jenkaas-slave relationship."""
 
20
    """Requirements for the jenkaas-slave relationship."""
21
21
    name = 'jenkaas-slave'
22
22
    interface = 'jenkaas-slave'
23
 
 
24
 
    def __init__(self, *args, **kwargs):
25
 
        self.required_keys = ['master-address', 'port']
26
 
        RelationContext.__init__(self, *args, **kwargs)
 
23
    required_keys = [
 
24
        'master-address',
 
25
        'port',
 
26
    ]
27
27
 
28
28
 
29
29
def manage():