X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fapplication.py;h=4e0154aa4cd9505389a6e968ea7dd8020a75a9e1;hb=a0aff95b67e6acf775405633b205fc04e3c4ecd3;hp=c3d2f0d643310d09f5d11911ae31cfb06b5f1d0c;hpb=4c1f68ce9871fa965fe9683aeeb5ddd66b42a5bc;p=osm%2FN2VC.git diff --git a/juju/application.py b/juju/application.py index c3d2f0d..4e0154a 100644 --- a/juju/application.py +++ b/juju/application.py @@ -35,6 +35,18 @@ class Application(model.ModelEntity): 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. @@ -185,7 +197,7 @@ class Application(model.ModelEntity): 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,