if unit.application == self.name
]
+ @property
+ def status(self):
+ """Get the application status, as set by the charm's leader.
+ """
+ return self.data['status']['current']
+
+ @property
+ def status_message(self):
+ """Get the application status message, as set by the charm's leader.
+ """
+ return self.data['status']['message']
+
def add_relation(self, local_relation, remote_relation):
"""Add a relation to another application.
log.debug('Updating annotations on application %s', self.name)
self.ann_facade = client.AnnotationsFacade()
- self.ann_facade.connect(model.connection)
+ self.ann_facade.connect(self.connection)
ann = client.EntityAnnotations(
entity=self.name,