~hazmat/pyjuju/proposed-support

« back to all changes in this revision

Viewing changes to juju/unit/workflow.py

  • Committer: kapil.thangavelu at canonical
  • Date: 2012-05-22 22:08:15 UTC
  • mfrom: (484.1.53 trunk)
  • Revision ID: kapil.thangavelu@canonical.com-20120522220815-acyt8m89i9ybe0w1
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
355
355
        started = (True, True)
356
356
        other = (True, False)
357
357
        state = yield self.get_state()
 
358
 
358
359
        if state == "charm_upgrade_error":
359
360
            returnValue(mid_upgrade)
360
361
        if state == "started":
503
504
    def lifecycle(self):
504
505
        return self._lifecycle
505
506
 
 
507
    def get_relation_info(self):
 
508
        """Return relation info for use in persistence."""
 
509
        rs = {}
 
510
        rs[self._state.internal_relation_id] = dict(
 
511
            relation_name=self.relation_name,
 
512
            relation_scope=self._state.relation_scope)
 
513
        return rs
 
514
 
506
515
    @inlineCallbacks
507
516
    def on_hook_error(self, relation_change, error):
508
517
        """Handle relation-change hook errors.